bearcat 1.6.10 → 1.7.0
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/Rakefile +0 -0
- data/bearcat.gemspec +5 -3
- data/lib/badgrcat/api_array.rb +0 -0
- data/lib/badgrcat/client.rb +15 -2
- data/lib/badgrcat/version.rb +0 -0
- data/lib/bearcat/api_array.rb +1 -0
- data/lib/bearcat/client/account_reports.rb +0 -0
- data/lib/bearcat/client/analytics.rb +0 -0
- data/lib/bearcat/client/assignment_groups.rb +0 -0
- data/lib/bearcat/client/assignments.rb +0 -0
- data/lib/bearcat/client/blueprint_courses.rb +0 -0
- data/lib/bearcat/client/calendar_events.rb +0 -0
- data/lib/bearcat/client/canvas_files.rb +0 -0
- data/lib/bearcat/client/conferences.rb +0 -0
- data/lib/bearcat/client/content_exports.rb +0 -0
- data/lib/bearcat/client/content_migrations.rb +0 -0
- data/lib/bearcat/client/conversations.rb +0 -0
- data/lib/bearcat/client/custom_gradebook_columns.rb +0 -0
- data/lib/bearcat/client/discussions.rb +0 -0
- data/lib/bearcat/client/enrollments.rb +0 -0
- data/lib/bearcat/client/external_tools.rb +0 -0
- data/lib/bearcat/client/file_helper.rb +1 -1
- data/lib/bearcat/client/files.rb +0 -0
- data/lib/bearcat/client/folders.rb +0 -0
- data/lib/bearcat/client/group_categories.rb +0 -0
- data/lib/bearcat/client/group_memberships.rb +0 -0
- data/lib/bearcat/client/groups.rb +0 -0
- data/lib/bearcat/client/learning_outcomes.rb +0 -0
- data/lib/bearcat/client/logins.rb +0 -0
- data/lib/bearcat/client/module_items.rb +0 -0
- data/lib/bearcat/client/modules.rb +0 -0
- data/lib/bearcat/client/o_auth2.rb +0 -0
- data/lib/bearcat/client/outcome_groups.rb +0 -0
- data/lib/bearcat/client/outcome_imports.rb +1 -1
- data/lib/bearcat/client/outcomes.rb +0 -0
- data/lib/bearcat/client/progresses.rb +0 -0
- data/lib/bearcat/client/quizzes.rb +0 -0
- data/lib/bearcat/client/roles.rb +0 -0
- data/lib/bearcat/client/rubric.rb +0 -0
- data/lib/bearcat/client/rubric_assessment.rb +0 -0
- data/lib/bearcat/client/rubric_association.rb +0 -0
- data/lib/bearcat/client/search.rb +0 -0
- data/lib/bearcat/client/sections.rb +0 -0
- data/lib/bearcat/client/sis_imports.rb +1 -1
- data/lib/bearcat/client/tabs.rb +0 -0
- data/lib/bearcat/client.rb +14 -0
- data/lib/bearcat/client_module.rb +0 -0
- data/lib/bearcat/rate_limiting/functions.lua +11 -0
- data/lib/bearcat/rate_limiting/increment_bucket.lua +0 -0
- data/lib/bearcat/rate_limiting/redis_script.rb +0 -0
- data/lib/bearcat/rate_limiting.rb +0 -0
- data/lib/bearcat/version.rb +1 -1
- data/lib/catalogcat/api_array.rb +1 -1
- data/lib/catalogcat/client/catalogs.rb +0 -0
- data/lib/catalogcat/client/certificates.rb +0 -0
- data/lib/catalogcat/client/courses.rb +0 -0
- data/lib/catalogcat/client/email_domain_sets.rb +0 -0
- data/lib/catalogcat/client/enrollments.rb +0 -0
- data/lib/catalogcat/client/orders.rb +0 -0
- data/lib/catalogcat/client/user_registrations.rb +1 -1
- data/lib/catalogcat/client.rb +0 -0
- data/lib/catalogcat/version.rb +0 -0
- data/lib/catalogcat.rb +0 -0
- data/spec/badgrcat/client_spec.rb +151 -0
- data/spec/bearcat/api_array_spec.rb +8 -8
- data/spec/bearcat/client/analytics_spec.rb +0 -0
- data/spec/bearcat/client/assignment_groups_spec.rb +0 -0
- data/spec/bearcat/client/assignments_spec.rb +0 -0
- data/spec/bearcat/client/blueprint_courses_spec.rb +0 -0
- data/spec/bearcat/client/calendar_events_spec.rb +0 -0
- data/spec/bearcat/client/canvas_files_spec.rb +0 -0
- data/spec/bearcat/client/conferences_spec.rb +0 -0
- data/spec/bearcat/client/content_exports_spec.rb +0 -0
- data/spec/bearcat/client/content_migrations_spec.rb +0 -0
- data/spec/bearcat/client/conversations_spec.rb +0 -0
- data/spec/bearcat/client/courses_spec.rb +0 -0
- data/spec/bearcat/client/custom_gradebook_columns_spec.rb +0 -0
- data/spec/bearcat/client/discussions_spec.rb +0 -0
- data/spec/bearcat/client/enrollments_spec.rb +0 -0
- data/spec/bearcat/client/external_tools_spec.rb +0 -0
- data/spec/bearcat/client/files_spec.rb +0 -0
- data/spec/bearcat/client/folders_spec.rb +0 -0
- data/spec/bearcat/client/graph_ql_spec.rb +0 -0
- data/spec/bearcat/client/group_categories_spec.rb +0 -0
- data/spec/bearcat/client/group_membership_spec.rb +0 -0
- data/spec/bearcat/client/group_memberships_spec.rb +0 -0
- data/spec/bearcat/client/groups_spec.rb +0 -0
- data/spec/bearcat/client/learning_outcomes_spec.rb +0 -0
- data/spec/bearcat/client/module_items_spec.rb +0 -0
- data/spec/bearcat/client/modules_spec.rb +0 -0
- data/spec/bearcat/client/new_quizzes_spec.rb +111 -0
- data/spec/bearcat/client/o_auth2_spec.rb +0 -0
- data/spec/bearcat/client/outcome_groups_spec.rb +0 -0
- data/spec/bearcat/client/outcomes_spec.rb +0 -0
- data/spec/bearcat/client/quizzes_spec.rb +0 -0
- data/spec/bearcat/client/roles_spec.rb +0 -0
- data/spec/bearcat/client/rubric_assessment_spec.rb +0 -0
- data/spec/bearcat/client/rubric_association_spec.rb +0 -0
- data/spec/bearcat/client/rubric_spec.rb +0 -0
- data/spec/bearcat/client/search_spec.rb +0 -0
- data/spec/bearcat/client/sections_spec.rb +0 -0
- data/spec/bearcat/client/submissions_spec.rb +0 -0
- data/spec/bearcat/client/users_spec.rb +0 -0
- data/spec/bearcat/rate_limiting_spec.rb +0 -0
- data/spec/bearcat/stub_bearcat_spec.rb +0 -0
- data/spec/bearcat_spec.rb +0 -0
- data/spec/fixtures/access_token.json +0 -0
- data/spec/fixtures/account_admin_create.json +0 -0
- data/spec/fixtures/account_admin_delete.json +0 -0
- data/spec/fixtures/account_admins.json +0 -0
- data/spec/fixtures/account_courses.json +0 -0
- data/spec/fixtures/account_grading_standards.json +0 -0
- data/spec/fixtures/account_groups.json +0 -0
- data/spec/fixtures/account_reports.json +0 -0
- data/spec/fixtures/account_reports_index.json +0 -0
- data/spec/fixtures/account_reports_result_success.json +0 -0
- data/spec/fixtures/account_reports_start_result.json +0 -0
- data/spec/fixtures/account_role.json +0 -0
- data/spec/fixtures/account_roles.json +0 -0
- data/spec/fixtures/account_sis_imports.json +0 -0
- data/spec/fixtures/account_sub_accounts.json +0 -0
- data/spec/fixtures/account_user.json +0 -0
- data/spec/fixtures/account_users.json +0 -0
- data/spec/fixtures/accounts.json +0 -0
- data/spec/fixtures/add_custom_user_data.json +0 -0
- data/spec/fixtures/add_user.json +0 -0
- data/spec/fixtures/assignment.json +0 -0
- data/spec/fixtures/assignment_group.json +0 -0
- data/spec/fixtures/assignment_groups.json +0 -0
- data/spec/fixtures/assignment_section_override.json +0 -0
- data/spec/fixtures/assignments.json +0 -0
- data/spec/fixtures/bearcat.jpg +0 -0
- data/spec/fixtures/blueprint_migration.json +0 -0
- data/spec/fixtures/blueprint_subscriptions.json +0 -0
- data/spec/fixtures/blueprint_template.json +0 -0
- data/spec/fixtures/blueprint_update_assocations_success.json +0 -0
- data/spec/fixtures/calendar_event.json +0 -0
- data/spec/fixtures/calendar_events.json +0 -0
- data/spec/fixtures/canvas_files/declare_file.json +0 -0
- data/spec/fixtures/canvas_files/upload_success.json +0 -0
- data/spec/fixtures/cc.imscc +0 -0
- data/spec/fixtures/communication_channels.json +0 -0
- data/spec/fixtures/conclude_enrollment.json +0 -0
- data/spec/fixtures/content_export.json +0 -0
- data/spec/fixtures/content_migration_files/content_migration.json +0 -0
- data/spec/fixtures/content_migration_files/response.json +0 -0
- data/spec/fixtures/content_migration_files/upload_success.json +0 -0
- data/spec/fixtures/conversation.json +0 -0
- data/spec/fixtures/course.json +0 -0
- data/spec/fixtures/course_conferences.json +0 -0
- data/spec/fixtures/course_copy.json +0 -0
- data/spec/fixtures/course_enrollments.json +0 -0
- data/spec/fixtures/course_files.json +0 -0
- data/spec/fixtures/course_folder.json +0 -0
- data/spec/fixtures/course_folders.json +0 -0
- data/spec/fixtures/course_grading_standards.json +0 -0
- data/spec/fixtures/course_groups.json +0 -0
- data/spec/fixtures/course_sections.json +0 -0
- data/spec/fixtures/course_settings.json +0 -0
- data/spec/fixtures/course_students.json +0 -0
- data/spec/fixtures/create_course_discussion.json +0 -0
- data/spec/fixtures/create_group_discussion.json +0 -0
- data/spec/fixtures/create_outcome_in_group.json +0 -0
- data/spec/fixtures/create_section.json +0 -0
- data/spec/fixtures/created_assignment.json +0 -0
- data/spec/fixtures/created_course.json +0 -0
- data/spec/fixtures/created_group.json +0 -0
- data/spec/fixtures/created_group_category.json +0 -0
- data/spec/fixtures/created_group_membership.json +0 -0
- data/spec/fixtures/created_module.json +0 -0
- data/spec/fixtures/custom_data.json +0 -0
- data/spec/fixtures/custom_food_data.json +0 -0
- data/spec/fixtures/custom_gradebook_columns/column_data.json +0 -0
- data/spec/fixtures/custom_gradebook_columns/custom_gradebook_column.json +0 -0
- data/spec/fixtures/custom_gradebook_columns/custom_gradebook_columns.json +0 -0
- data/spec/fixtures/custom_gradebook_columns/gradebook_column_progress.json +0 -0
- data/spec/fixtures/dashboard.json +0 -0
- data/spec/fixtures/delete_course.json +0 -0
- data/spec/fixtures/delete_custom_data_scope.json +0 -0
- data/spec/fixtures/delete_group_category.json +0 -0
- data/spec/fixtures/delete_section.json +0 -0
- data/spec/fixtures/deleted_conversation.json +0 -0
- data/spec/fixtures/deleted_group.json +0 -0
- data/spec/fixtures/department_level_participation.json +0 -0
- data/spec/fixtures/department_level_statistics.json +0 -0
- data/spec/fixtures/discussion_entries.json +0 -0
- data/spec/fixtures/discussion_entry_replies.json +0 -0
- data/spec/fixtures/discussion_topic.json +0 -0
- data/spec/fixtures/discussion_topics.json +0 -0
- data/spec/fixtures/edited_group.json +0 -0
- data/spec/fixtures/edited_group_category.json +0 -0
- data/spec/fixtures/enroll_student.json +0 -0
- data/spec/fixtures/enrollment_terms.json +0 -0
- data/spec/fixtures/external_tool.json +0 -0
- data/spec/fixtures/external_tools.json +0 -0
- data/spec/fixtures/file.csv +0 -0
- data/spec/fixtures/gradebook_history.json +0 -0
- data/spec/fixtures/graph_ql_scores.json +0 -0
- data/spec/fixtures/group.json +0 -0
- data/spec/fixtures/group_categories.json +0 -0
- data/spec/fixtures/group_category.json +0 -0
- data/spec/fixtures/group_category_groups.json +0 -0
- data/spec/fixtures/group_conferences.json +0 -0
- data/spec/fixtures/group_membership.json +0 -0
- data/spec/fixtures/learning_outcome.json +0 -0
- data/spec/fixtures/link_unlink_outcome.json +0 -0
- data/spec/fixtures/merge_user.json +0 -0
- data/spec/fixtures/module.json +0 -0
- data/spec/fixtures/module_item.json +0 -0
- data/spec/fixtures/module_item_sequence.json +0 -0
- data/spec/fixtures/module_items.json +0 -0
- data/spec/fixtures/modules.json +0 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_categorization.json +44 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_essay.json +29 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_file_upload.json +32 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_fill_in_multiple_blanks.json +65 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_formula.json +50 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_hot_spot.json +42 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_matching.json +52 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_multiple_answer.json +38 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_numeric.json +30 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_ordering.json +40 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_short_answer.json +31 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_stimulus.json +26 -0
- data/spec/fixtures/new_quizzes/new_quiz_item_true_false.json +29 -0
- data/spec/fixtures/no_custom_data.json +0 -0
- data/spec/fixtures/ok.json +0 -0
- data/spec/fixtures/outcome_group_import.json +0 -0
- data/spec/fixtures/outcome_groups.json +0 -0
- data/spec/fixtures/outcome_result.json +0 -0
- data/spec/fixtures/outcome_subgroup.json +0 -0
- data/spec/fixtures/outcome_subgroups.json +0 -0
- data/spec/fixtures/outcomes.json +0 -0
- data/spec/fixtures/paged_body.json +0 -0
- data/spec/fixtures/pages.json +0 -0
- data/spec/fixtures/progress.json +0 -0
- data/spec/fixtures/quizzes/course_quiz.json +0 -0
- data/spec/fixtures/quizzes/course_quiz_questions.json +0 -0
- data/spec/fixtures/quizzes/course_quizzes.json +0 -0
- data/spec/fixtures/quizzes/quiz_assignment_override.json +0 -0
- data/spec/fixtures/quizzes/quiz_extension.json +0 -0
- data/spec/fixtures/reactivate_enrollment.json +0 -0
- data/spec/fixtures/report_history.json +0 -0
- data/spec/fixtures/report_list.json +0 -0
- data/spec/fixtures/report_status.json +0 -0
- data/spec/fixtures/rubric.json +0 -0
- data/spec/fixtures/rubric_assessment.json +0 -0
- data/spec/fixtures/rubric_association.json +0 -0
- data/spec/fixtures/search_find_recipients.json +0 -0
- data/spec/fixtures/section.json +0 -0
- data/spec/fixtures/section_enrollments.json +0 -0
- data/spec/fixtures/single_account.json +0 -0
- data/spec/fixtures/start_report.json +0 -0
- data/spec/fixtures/submissions/submission.json +0 -0
- data/spec/fixtures/update_outcome.json +0 -0
- data/spec/fixtures/update_outcome_group.json +0 -0
- data/spec/fixtures/update_section.json +0 -0
- data/spec/fixtures/updated_course.json +0 -0
- data/spec/fixtures/user_avatars.json +0 -0
- data/spec/fixtures/user_details.json +0 -0
- data/spec/fixtures/user_enrollments.json +0 -0
- data/spec/fixtures/user_logins.json +0 -0
- data/spec/fixtures/user_page_views.json +0 -0
- data/spec/fixtures/user_profile.json +0 -0
- data/spec/helper.rb +7 -0
- metadata +235 -182
|
@@ -83,6 +83,117 @@ describe Bearcat::Client::NewQuizzes do
|
|
|
83
83
|
expect { @client.delete_new_quiz_item('1', '1', '1') }.not_to raise_error
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
# Item types
|
|
87
|
+
it 'returns a true/false item' do
|
|
88
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/2').to_return(json_response('new_quizzes/new_quiz_item_true_false.json'))
|
|
89
|
+
item = @client.new_quiz_item('1', '1', '2')
|
|
90
|
+
item['entry']['interaction_type_slug'].should == 'true-false'
|
|
91
|
+
item['entry']['interaction_data']['true_choice'].should == 'True'
|
|
92
|
+
item['entry']['interaction_data']['false_choice'].should == 'False'
|
|
93
|
+
item['entry']['scoring_data']['value'].should == true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it 'returns a matching item' do
|
|
97
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/3').to_return(json_response('new_quizzes/new_quiz_item_matching.json'))
|
|
98
|
+
item = @client.new_quiz_item('1', '1', '3')
|
|
99
|
+
item['entry']['interaction_type_slug'].should == 'matching'
|
|
100
|
+
item['entry']['interaction_data']['questions'].count.should == 4
|
|
101
|
+
item['entry']['interaction_data']['answers'].count.should == 5
|
|
102
|
+
item['entry']['scoring_data']['value'].should be_a(Hash)
|
|
103
|
+
item['entry']['scoring_data']['value']['q1'].should == 'Mammal'
|
|
104
|
+
item['entry']['scoring_algorithm'].should == 'PartialDeep'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
it 'returns a categorization item' do
|
|
108
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/4').to_return(json_response('new_quizzes/new_quiz_item_categorization.json'))
|
|
109
|
+
item = @client.new_quiz_item('1', '1', '4')
|
|
110
|
+
item['entry']['interaction_type_slug'].should == 'categorization'
|
|
111
|
+
item['entry']['interaction_data']['categories'].count.should == 2
|
|
112
|
+
item['entry']['interaction_data']['choices'].count.should == 3
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
it 'returns a rich-fill-blank item' do
|
|
116
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/5').to_return(json_response('new_quizzes/new_quiz_item_fill_in_multiple_blanks.json'))
|
|
117
|
+
item = @client.new_quiz_item('1', '1', '5')
|
|
118
|
+
item['entry']['interaction_type_slug'].should == 'rich-fill-blank'
|
|
119
|
+
item['entry']['interaction_data']['blanks'].count.should == 2
|
|
120
|
+
item['entry']['interaction_data']['blanks'].first['answer_type'].should == 'openEntry'
|
|
121
|
+
item['entry']['interaction_data']['blanks'].last['answer_type'].should == 'dropdown'
|
|
122
|
+
item['entry']['scoring_algorithm'].should == 'MultipleMethods'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
it 'returns a multi-answer item' do
|
|
126
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/6').to_return(json_response('new_quizzes/new_quiz_item_multiple_answer.json'))
|
|
127
|
+
item = @client.new_quiz_item('1', '1', '6')
|
|
128
|
+
item['entry']['interaction_type_slug'].should == 'multi-answer'
|
|
129
|
+
item['entry']['scoring_data']['value'].count.should == 3
|
|
130
|
+
item['entry']['scoring_algorithm'].should == 'PartialScore'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
it 'returns an ordering item' do
|
|
134
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/7').to_return(json_response('new_quizzes/new_quiz_item_ordering.json'))
|
|
135
|
+
item = @client.new_quiz_item('1', '1', '7')
|
|
136
|
+
item['entry']['interaction_type_slug'].should == 'ordering'
|
|
137
|
+
item['entry']['interaction_data']['choices'].should be_a(Hash)
|
|
138
|
+
item['entry']['scoring_data']['value'].should == ['choice1', 'choice2', 'choice3', 'choice4']
|
|
139
|
+
item['entry']['scoring_algorithm'].should == 'DeepEquals'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
it 'returns a short_answer item' do
|
|
143
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/8').to_return(json_response('new_quizzes/new_quiz_item_short_answer.json'))
|
|
144
|
+
item = @client.new_quiz_item('1', '1', '8')
|
|
145
|
+
item['entry']['interaction_type_slug'].should == 'short_answer'
|
|
146
|
+
item['entry']['interaction_data']['answers'].first['item_body'].should == 'photosynthesis'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
it 'returns an essay item' do
|
|
150
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/9').to_return(json_response('new_quizzes/new_quiz_item_essay.json'))
|
|
151
|
+
item = @client.new_quiz_item('1', '1', '9')
|
|
152
|
+
item['entry']['interaction_type_slug'].should == 'essay'
|
|
153
|
+
item['entry']['scoring_algorithm'].should == 'None'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
it 'returns a file-upload item' do
|
|
157
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/10').to_return(json_response('new_quizzes/new_quiz_item_file_upload.json'))
|
|
158
|
+
item = @client.new_quiz_item('1', '1', '10')
|
|
159
|
+
item['entry']['interaction_type_slug'].should == 'file-upload'
|
|
160
|
+
item['entry']['interaction_data']['files_count'].should == '1'
|
|
161
|
+
item['entry']['scoring_algorithm'].should == 'None'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
it 'returns a numeric item' do
|
|
165
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/11').to_return(json_response('new_quizzes/new_quiz_item_numeric.json'))
|
|
166
|
+
item = @client.new_quiz_item('1', '1', '11')
|
|
167
|
+
item['entry']['interaction_type_slug'].should == 'numeric'
|
|
168
|
+
item['entry']['interaction_data'].should == {}
|
|
169
|
+
item['entry']['scoring_data']['value'].first['type'].should == 'exactResponse'
|
|
170
|
+
item['entry']['scoring_algorithm'].should == 'Numeric'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
it 'returns a formula item' do
|
|
174
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/12').to_return(json_response('new_quizzes/new_quiz_item_formula.json'))
|
|
175
|
+
item = @client.new_quiz_item('1', '1', '12')
|
|
176
|
+
item['entry']['interaction_type_slug'].should == 'formula'
|
|
177
|
+
item['entry']['interaction_data'].should == {}
|
|
178
|
+
item['entry']['scoring_data']['value']['variables'].count.should == 2
|
|
179
|
+
item['entry']['scoring_algorithm'].should == 'Numeric'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
it 'returns a hot_spot item' do
|
|
183
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/13').to_return(json_response('new_quizzes/new_quiz_item_hot_spot.json'))
|
|
184
|
+
item = @client.new_quiz_item('1', '1', '13')
|
|
185
|
+
item['entry']['interaction_type_slug'].should == 'hot_spot'
|
|
186
|
+
item['entry']['interaction_data']['regions'].first['shape'].should == 'rectangle'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
it 'returns a stimulus item' do
|
|
190
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/14').to_return(json_response('new_quizzes/new_quiz_item_stimulus.json'))
|
|
191
|
+
item = @client.new_quiz_item('1', '1', '14')
|
|
192
|
+
item['entry_type'].should == 'Stimulus'
|
|
193
|
+
item['entry']['interaction_type_slug'].should == 'stimulus'
|
|
194
|
+
item['points_possible'].should == 0.0
|
|
195
|
+
end
|
|
196
|
+
|
|
86
197
|
# Submissions
|
|
87
198
|
it 'returns a list of submissions for a new quiz' do
|
|
88
199
|
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/submissions').to_return(json_response('new_quizzes/new_quiz_submissions.json'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/bearcat_spec.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/accounts.json
CHANGED
|
File without changes
|
|
File without changes
|
data/spec/fixtures/add_user.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/bearcat.jpg
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/cc.imscc
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/course.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/file.csv
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/group.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/module.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/fixtures/modules.json
CHANGED
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "4",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"points_possible": 3.0,
|
|
5
|
+
"properties": {},
|
|
6
|
+
"entry_type": "Item",
|
|
7
|
+
"entry_editable": true,
|
|
8
|
+
"stimulus_quiz_entry_id": "",
|
|
9
|
+
"status": "mutable",
|
|
10
|
+
"entry": {
|
|
11
|
+
"id": "4",
|
|
12
|
+
"title": "Sort each item into the correct category.",
|
|
13
|
+
"item_body": "<p>Sort each item into the correct category.</p>",
|
|
14
|
+
"calculator_type": "none",
|
|
15
|
+
"interaction_data": {
|
|
16
|
+
"categories": [
|
|
17
|
+
{ "id": "cat1", "position": 1, "item_body": "Mammals" },
|
|
18
|
+
{ "id": "cat2", "position": 2, "item_body": "Reptiles" }
|
|
19
|
+
],
|
|
20
|
+
"choices": [
|
|
21
|
+
{ "id": "choice1", "position": 1, "item_body": "Dog" },
|
|
22
|
+
{ "id": "choice2", "position": 2, "item_body": "Snake" },
|
|
23
|
+
{ "id": "choice3", "position": 3, "item_body": "Whale" }
|
|
24
|
+
],
|
|
25
|
+
"distractors": []
|
|
26
|
+
},
|
|
27
|
+
"properties": {
|
|
28
|
+
"shuffle_rules": { "choices": { "shuffled": true } }
|
|
29
|
+
},
|
|
30
|
+
"scoring_data": {
|
|
31
|
+
"value": [
|
|
32
|
+
{ "category_id": "cat1", "choice_ids": ["choice1", "choice3"] },
|
|
33
|
+
{ "category_id": "cat2", "choice_ids": ["choice2"] }
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"answer_feedback": {},
|
|
37
|
+
"scoring_algorithm": "PartialDeep",
|
|
38
|
+
"created_at": "2026-04-23T10:00:00.000Z",
|
|
39
|
+
"updated_at": "2026-04-23T10:00:00.000Z",
|
|
40
|
+
"tag_associations": [],
|
|
41
|
+
"interaction_type_slug": "categorization",
|
|
42
|
+
"feedback": {}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "9",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"points_possible": 10.0,
|
|
5
|
+
"properties": {},
|
|
6
|
+
"entry_type": "Item",
|
|
7
|
+
"entry_editable": true,
|
|
8
|
+
"stimulus_quiz_entry_id": "",
|
|
9
|
+
"status": "mutable",
|
|
10
|
+
"entry": {
|
|
11
|
+
"id": "9",
|
|
12
|
+
"title": "Describe the causes of World War I.",
|
|
13
|
+
"item_body": "<p>In 3-5 paragraphs, describe the primary causes of World War I.</p>",
|
|
14
|
+
"calculator_type": "none",
|
|
15
|
+
"interaction_data": {},
|
|
16
|
+
"properties": {
|
|
17
|
+
"word_count_minimum": 100,
|
|
18
|
+
"word_count_maximum": 500
|
|
19
|
+
},
|
|
20
|
+
"scoring_data": { "value": "" },
|
|
21
|
+
"answer_feedback": {},
|
|
22
|
+
"scoring_algorithm": "None",
|
|
23
|
+
"created_at": "2026-04-23T10:00:00.000Z",
|
|
24
|
+
"updated_at": "2026-04-23T10:00:00.000Z",
|
|
25
|
+
"tag_associations": [],
|
|
26
|
+
"interaction_type_slug": "essay",
|
|
27
|
+
"feedback": {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "10",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"points_possible": 5.0,
|
|
5
|
+
"properties": { "required": false },
|
|
6
|
+
"entry_type": "Item",
|
|
7
|
+
"entry_editable": true,
|
|
8
|
+
"stimulus_quiz_entry_id": "",
|
|
9
|
+
"status": "mutable",
|
|
10
|
+
"entry": {
|
|
11
|
+
"id": "10",
|
|
12
|
+
"title": "Upload your completed worksheet.",
|
|
13
|
+
"item_body": "<p>Upload your completed worksheet as a PDF or image file.</p>",
|
|
14
|
+
"calculator_type": "none",
|
|
15
|
+
"interaction_data": {
|
|
16
|
+
"files_count": "1",
|
|
17
|
+
"restrict_count": false
|
|
18
|
+
},
|
|
19
|
+
"properties": {
|
|
20
|
+
"allowed_types": null,
|
|
21
|
+
"restrict_types": false
|
|
22
|
+
},
|
|
23
|
+
"scoring_data": { "value": "" },
|
|
24
|
+
"answer_feedback": {},
|
|
25
|
+
"scoring_algorithm": "None",
|
|
26
|
+
"created_at": "2026-04-23T10:00:00.000Z",
|
|
27
|
+
"updated_at": "2026-04-23T10:00:00.000Z",
|
|
28
|
+
"tag_associations": [],
|
|
29
|
+
"interaction_type_slug": "file-upload",
|
|
30
|
+
"feedback": {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "5",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"points_possible": 2.0,
|
|
5
|
+
"properties": { "required": false },
|
|
6
|
+
"entry_type": "Item",
|
|
7
|
+
"entry_editable": true,
|
|
8
|
+
"stimulus_quiz_entry_id": "",
|
|
9
|
+
"status": "mutable",
|
|
10
|
+
"entry": {
|
|
11
|
+
"id": "5",
|
|
12
|
+
"title": "Fill in the blanks.",
|
|
13
|
+
"item_body": "<p>The <span id=\"blank_blank1\"></span> jumped over the fence. Roses are <span id=\"blank_blank2\"></span></p>",
|
|
14
|
+
"calculator_type": "none",
|
|
15
|
+
"interaction_data": {
|
|
16
|
+
"blanks": [
|
|
17
|
+
{
|
|
18
|
+
"id": "blank1",
|
|
19
|
+
"answer_type": "openEntry"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "blank2",
|
|
23
|
+
"choices": [
|
|
24
|
+
{ "id": "ans1", "position": 1, "item_body": "red" },
|
|
25
|
+
{ "id": "ans2", "position": 2, "item_body": "blue" },
|
|
26
|
+
{ "id": "ans3", "position": 3, "item_body": "purple" }
|
|
27
|
+
],
|
|
28
|
+
"answer_type": "dropdown"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"properties": {
|
|
33
|
+
"shuffle_rules": {
|
|
34
|
+
"blanks": {
|
|
35
|
+
"children": {
|
|
36
|
+
"0": { "children": null },
|
|
37
|
+
"1": { "children": { "choices": { "shuffled": true } } }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"scoring_data": {
|
|
43
|
+
"value": [
|
|
44
|
+
{
|
|
45
|
+
"id": "blank1",
|
|
46
|
+
"scoring_data": { "value": "fox", "blank_text": "fox" },
|
|
47
|
+
"scoring_algorithm": "TextContainsAnswer"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "blank2",
|
|
51
|
+
"scoring_data": { "value": "ans1", "blank_text": "red" },
|
|
52
|
+
"scoring_algorithm": "Equivalence"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"working_item_body": "<p>The `fox` jumped over the fence. Roses are `red`</p>"
|
|
56
|
+
},
|
|
57
|
+
"answer_feedback": {},
|
|
58
|
+
"scoring_algorithm": "MultipleMethods",
|
|
59
|
+
"created_at": "2026-04-23T10:00:00.000Z",
|
|
60
|
+
"updated_at": "2026-04-23T10:00:00.000Z",
|
|
61
|
+
"tag_associations": [],
|
|
62
|
+
"interaction_type_slug": "rich-fill-blank",
|
|
63
|
+
"feedback": {}
|
|
64
|
+
}
|
|
65
|
+
}
|