@easyedu/js-lsm-api 1.139.0 → 1.140.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.
- package/.openapi-generator/FILES +10 -0
- package/README.md +15 -2
- package/dist/apis/ContentLibraryQuizApi.d.ts +86 -0
- package/dist/apis/ContentLibraryQuizApi.js +216 -0
- package/dist/apis/DispatchApi.d.ts +53 -0
- package/dist/apis/DispatchApi.js +135 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +86 -0
- package/dist/esm/apis/ContentLibraryQuizApi.js +216 -0
- package/dist/esm/apis/DispatchApi.d.ts +53 -0
- package/dist/esm/apis/DispatchApi.js +135 -0
- package/dist/esm/models/GetAttemptAllowance.d.ts +9 -3
- package/dist/esm/models/GetAttemptAllowance.js +4 -0
- package/dist/esm/models/GetCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/GetLibraryQuizResult.d.ts +30 -0
- package/dist/esm/models/GetLibraryQuizResult.js +20 -0
- package/dist/esm/models/GetLibraryQuizSession.d.ts +43 -0
- package/dist/esm/models/GetLibraryQuizSession.js +27 -0
- package/dist/esm/models/GetLibraryQuizVersion.d.ts +19 -0
- package/dist/esm/models/GetLibraryQuizVersion.js +13 -0
- package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/esm/models/GetQuestionAnswerChoicesInner.js +4 -0
- package/dist/esm/models/GetQuizSettings.d.ts +56 -0
- package/dist/esm/models/GetQuizSettings.js +57 -0
- package/dist/esm/models/HostedScormOutlineEntry.d.ts +1 -1
- package/dist/esm/models/LibraryQuizQuestionFeedback.d.ts +78 -0
- package/dist/esm/models/LibraryQuizQuestionFeedback.js +66 -0
- package/dist/esm/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
- package/dist/esm/models/LibraryQuizSessionAnswerChoice.js +2 -0
- package/dist/esm/models/LibraryQuizSessionQuestion.d.ts +19 -0
- package/dist/esm/models/LibraryQuizSessionQuestion.js +11 -0
- package/dist/esm/models/PostCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/PostLibraryQuiz.d.ts +21 -2
- package/dist/esm/models/PostLibraryQuiz.js +7 -0
- package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/esm/models/PostQuestionAnswerChoicesInner.js +2 -0
- package/dist/esm/models/PutCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
- package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.js +43 -0
- package/dist/esm/models/PutLibraryQuizVersion.d.ts +19 -0
- package/dist/esm/models/PutLibraryQuizVersion.js +7 -0
- package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/esm/models/PutQuestionAnswerChoicesInner.js +2 -0
- package/dist/esm/models/PutQuizSettings.d.ts +44 -0
- package/dist/esm/models/PutQuizSettings.js +51 -0
- package/dist/esm/models/QuizFeedbackTiming.d.ts +25 -0
- package/dist/esm/models/QuizFeedbackTiming.js +43 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/GetAttemptAllowance.d.ts +9 -3
- package/dist/models/GetAttemptAllowance.js +4 -0
- package/dist/models/GetCourseVersionItem.d.ts +1 -1
- package/dist/models/GetLibraryQuizResult.d.ts +30 -0
- package/dist/models/GetLibraryQuizResult.js +20 -0
- package/dist/models/GetLibraryQuizSession.d.ts +43 -0
- package/dist/models/GetLibraryQuizSession.js +27 -0
- package/dist/models/GetLibraryQuizVersion.d.ts +19 -0
- package/dist/models/GetLibraryQuizVersion.js +13 -0
- package/dist/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/models/GetQuestionAnswerChoicesInner.js +4 -0
- package/dist/models/GetQuizSettings.d.ts +56 -0
- package/dist/models/GetQuizSettings.js +64 -0
- package/dist/models/HostedScormOutlineEntry.d.ts +1 -1
- package/dist/models/LibraryQuizQuestionFeedback.d.ts +78 -0
- package/dist/models/LibraryQuizQuestionFeedback.js +74 -0
- package/dist/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
- package/dist/models/LibraryQuizSessionAnswerChoice.js +2 -0
- package/dist/models/LibraryQuizSessionQuestion.d.ts +19 -0
- package/dist/models/LibraryQuizSessionQuestion.js +11 -0
- package/dist/models/PostCourseVersionItem.d.ts +1 -1
- package/dist/models/PostLibraryQuiz.d.ts +21 -2
- package/dist/models/PostLibraryQuiz.js +7 -0
- package/dist/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/models/PostQuestionAnswerChoicesInner.js +2 -0
- package/dist/models/PutCourseVersionItem.d.ts +1 -1
- package/dist/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
- package/dist/models/PutLibraryQuizSessionQuestionFlag.js +50 -0
- package/dist/models/PutLibraryQuizVersion.d.ts +19 -0
- package/dist/models/PutLibraryQuizVersion.js +7 -0
- package/dist/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/models/PutQuestionAnswerChoicesInner.js +2 -0
- package/dist/models/PutQuizSettings.d.ts +44 -0
- package/dist/models/PutQuizSettings.js +58 -0
- package/dist/models/QuizFeedbackTiming.d.ts +25 -0
- package/dist/models/QuizFeedbackTiming.js +51 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/ContentLibraryQuizApi.md +343 -0
- package/docs/DispatchApi.md +214 -0
- package/docs/GetAttemptAllowance.md +2 -0
- package/docs/GetLibraryQuizResult.md +10 -0
- package/docs/GetLibraryQuizSession.md +14 -0
- package/docs/GetLibraryQuizVersion.md +6 -0
- package/docs/GetQuestionAnswerChoicesInner.md +2 -0
- package/docs/GetQuizSettings.md +43 -0
- package/docs/LibraryQuizQuestionFeedback.md +47 -0
- package/docs/LibraryQuizSessionAnswerChoice.md +2 -0
- package/docs/LibraryQuizSessionQuestion.md +6 -0
- package/docs/PostLibraryQuiz.md +6 -0
- package/docs/PostQuestionAnswerChoicesInner.md +2 -0
- package/docs/PutLibraryQuizSessionQuestionFlag.md +34 -0
- package/docs/PutLibraryQuizVersion.md +6 -0
- package/docs/PutQuestionAnswerChoicesInner.md +2 -0
- package/docs/PutQuizSettings.md +38 -0
- package/docs/QuizFeedbackTiming.md +33 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryQuizApi.ts +287 -0
- package/src/apis/DispatchApi.ts +185 -0
- package/src/models/GetAttemptAllowance.ts +12 -3
- package/src/models/GetCourseVersionItem.ts +1 -1
- package/src/models/GetLibraryQuizResult.ts +45 -0
- package/src/models/GetLibraryQuizSession.ts +69 -0
- package/src/models/GetLibraryQuizVersion.ts +34 -0
- package/src/models/GetQuestionAnswerChoicesInner.ts +9 -0
- package/src/models/GetQuizSettings.ts +101 -0
- package/src/models/HostedScormOutlineEntry.ts +1 -1
- package/src/models/LibraryQuizQuestionFeedback.ts +135 -0
- package/src/models/LibraryQuizSessionAnswerChoice.ts +8 -0
- package/src/models/LibraryQuizSessionQuestion.ts +33 -0
- package/src/models/PostCourseVersionItem.ts +1 -1
- package/src/models/PostLibraryQuiz.ts +33 -2
- package/src/models/PostQuestionAnswerChoicesInner.ts +8 -0
- package/src/models/PutCourseVersionItem.ts +1 -1
- package/src/models/PutLibraryQuizSessionQuestionFlag.ts +66 -0
- package/src/models/PutLibraryQuizVersion.ts +31 -0
- package/src/models/PutQuestionAnswerChoicesInner.ts +8 -0
- package/src/models/PutQuizSettings.ts +84 -0
- package/src/models/QuizFeedbackTiming.ts +53 -0
- package/src/models/index.ts +5 -0
|
@@ -79,8 +79,38 @@ export interface GetLibraryQuizResult {
|
|
|
79
79
|
* @memberof GetLibraryQuizResult
|
|
80
80
|
*/
|
|
81
81
|
pendingManualGrading: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The attempt was submitted automatically when its time limit ran out.
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
* @memberof GetLibraryQuizResult
|
|
86
|
+
*/
|
|
87
|
+
timedOut: boolean;
|
|
82
88
|
/**
|
|
83
89
|
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof GetLibraryQuizResult
|
|
92
|
+
*/
|
|
93
|
+
passingScore: number;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof GetLibraryQuizResult
|
|
98
|
+
*/
|
|
99
|
+
attemptNumber: number;
|
|
100
|
+
/**
|
|
101
|
+
* Attempts this learner may take, including any extra attempts granted to them. Zero means unlimited.
|
|
102
|
+
* @type {number}
|
|
103
|
+
* @memberof GetLibraryQuizResult
|
|
104
|
+
*/
|
|
105
|
+
maxAttempts: number;
|
|
106
|
+
/**
|
|
107
|
+
* The learner has at least one attempt left.
|
|
108
|
+
* @type {boolean}
|
|
109
|
+
* @memberof GetLibraryQuizResult
|
|
110
|
+
*/
|
|
111
|
+
canRetake: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Per-question review, present when the quiz allows review. Each entry has the learner's answer and whether it was correct. `correct_choice_ids`, `correct_answer`, and `answer_choices` are added when the quiz shows correct answers; `explanation` and `explanation_rich` are added when the quiz shows explanations.
|
|
84
114
|
* @type {Array<{ [key: string]: any; }>}
|
|
85
115
|
* @memberof GetLibraryQuizResult
|
|
86
116
|
*/
|
|
@@ -99,6 +129,11 @@ export function instanceOfGetLibraryQuizResult(value: object): value is GetLibra
|
|
|
99
129
|
if (!('totalPoints' in value) || value['totalPoints'] === undefined) return false;
|
|
100
130
|
if (!('pointsEarned' in value) || value['pointsEarned'] === undefined) return false;
|
|
101
131
|
if (!('pendingManualGrading' in value) || value['pendingManualGrading'] === undefined) return false;
|
|
132
|
+
if (!('timedOut' in value) || value['timedOut'] === undefined) return false;
|
|
133
|
+
if (!('passingScore' in value) || value['passingScore'] === undefined) return false;
|
|
134
|
+
if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
|
|
135
|
+
if (!('maxAttempts' in value) || value['maxAttempts'] === undefined) return false;
|
|
136
|
+
if (!('canRetake' in value) || value['canRetake'] === undefined) return false;
|
|
102
137
|
if (!('questions' in value) || value['questions'] === undefined) return false;
|
|
103
138
|
return true;
|
|
104
139
|
}
|
|
@@ -123,6 +158,11 @@ export function GetLibraryQuizResultFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
123
158
|
'scorePercentage': json['score_percentage'] == null ? undefined : json['score_percentage'],
|
|
124
159
|
'passed': json['passed'] == null ? undefined : json['passed'],
|
|
125
160
|
'pendingManualGrading': json['pending_manual_grading'],
|
|
161
|
+
'timedOut': json['timed_out'],
|
|
162
|
+
'passingScore': json['passing_score'],
|
|
163
|
+
'attemptNumber': json['attempt_number'],
|
|
164
|
+
'maxAttempts': json['max_attempts'],
|
|
165
|
+
'canRetake': json['can_retake'],
|
|
126
166
|
'questions': json['questions'],
|
|
127
167
|
};
|
|
128
168
|
}
|
|
@@ -148,6 +188,11 @@ export function GetLibraryQuizResultToJSONTyped(value?: GetLibraryQuizResult | n
|
|
|
148
188
|
'score_percentage': value['scorePercentage'],
|
|
149
189
|
'passed': value['passed'],
|
|
150
190
|
'pending_manual_grading': value['pendingManualGrading'],
|
|
191
|
+
'timed_out': value['timedOut'],
|
|
192
|
+
'passing_score': value['passingScore'],
|
|
193
|
+
'attempt_number': value['attemptNumber'],
|
|
194
|
+
'max_attempts': value['maxAttempts'],
|
|
195
|
+
'can_retake': value['canRetake'],
|
|
151
196
|
'questions': value['questions'],
|
|
152
197
|
};
|
|
153
198
|
}
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
LibraryQuizSessionQuestionToJSON,
|
|
28
28
|
LibraryQuizSessionQuestionToJSONTyped,
|
|
29
29
|
} from './LibraryQuizSessionQuestion';
|
|
30
|
+
import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
|
|
31
|
+
import {
|
|
32
|
+
QuizFeedbackTimingFromJSON,
|
|
33
|
+
QuizFeedbackTimingFromJSONTyped,
|
|
34
|
+
QuizFeedbackTimingToJSON,
|
|
35
|
+
QuizFeedbackTimingToJSONTyped,
|
|
36
|
+
} from './QuizFeedbackTiming';
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
39
|
*
|
|
@@ -94,6 +101,48 @@ export interface GetLibraryQuizSession {
|
|
|
94
101
|
* @memberof GetLibraryQuizSession
|
|
95
102
|
*/
|
|
96
103
|
quizName: string;
|
|
104
|
+
/**
|
|
105
|
+
* The quiz description, shown as instructions on the introduction page.
|
|
106
|
+
* @type {string}
|
|
107
|
+
* @memberof GetLibraryQuizSession
|
|
108
|
+
*/
|
|
109
|
+
description: string;
|
|
110
|
+
/**
|
|
111
|
+
* False until the learner leaves the introduction page. The time limit starts counting when the attempt starts.
|
|
112
|
+
* @type {boolean}
|
|
113
|
+
* @memberof GetLibraryQuizSession
|
|
114
|
+
*/
|
|
115
|
+
hasStarted: boolean;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @type {number}
|
|
119
|
+
* @memberof GetLibraryQuizSession
|
|
120
|
+
*/
|
|
121
|
+
passingScore: number;
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @type {number}
|
|
125
|
+
* @memberof GetLibraryQuizSession
|
|
126
|
+
*/
|
|
127
|
+
timeLimitMinutes?: number | null;
|
|
128
|
+
/**
|
|
129
|
+
* Attempts this learner may take, including any extra attempts granted to them. Zero means unlimited.
|
|
130
|
+
* @type {number}
|
|
131
|
+
* @memberof GetLibraryQuizSession
|
|
132
|
+
*/
|
|
133
|
+
maxAttempts: number;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @type {QuizFeedbackTiming}
|
|
137
|
+
* @memberof GetLibraryQuizSession
|
|
138
|
+
*/
|
|
139
|
+
feedbackTiming: QuizFeedbackTiming;
|
|
140
|
+
/**
|
|
141
|
+
*
|
|
142
|
+
* @type {boolean}
|
|
143
|
+
* @memberof GetLibraryQuizSession
|
|
144
|
+
*/
|
|
145
|
+
requireAllQuestions: boolean;
|
|
97
146
|
/**
|
|
98
147
|
*
|
|
99
148
|
* @type {number}
|
|
@@ -205,6 +254,12 @@ export function instanceOfGetLibraryQuizSession(value: object): value is GetLibr
|
|
|
205
254
|
if (!('quizVersionId' in value) || value['quizVersionId'] === undefined) return false;
|
|
206
255
|
if (!('quizVersionNumber' in value) || value['quizVersionNumber'] === undefined) return false;
|
|
207
256
|
if (!('quizName' in value) || value['quizName'] === undefined) return false;
|
|
257
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
258
|
+
if (!('hasStarted' in value) || value['hasStarted'] === undefined) return false;
|
|
259
|
+
if (!('passingScore' in value) || value['passingScore'] === undefined) return false;
|
|
260
|
+
if (!('maxAttempts' in value) || value['maxAttempts'] === undefined) return false;
|
|
261
|
+
if (!('feedbackTiming' in value) || value['feedbackTiming'] === undefined) return false;
|
|
262
|
+
if (!('requireAllQuestions' in value) || value['requireAllQuestions'] === undefined) return false;
|
|
208
263
|
if (!('attemptNumber' in value) || value['attemptNumber'] === undefined) return false;
|
|
209
264
|
if (!('isCurrent' in value) || value['isCurrent'] === undefined) return false;
|
|
210
265
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -238,6 +293,13 @@ export function GetLibraryQuizSessionFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
238
293
|
'quizVersionId': json['quiz_version_id'],
|
|
239
294
|
'quizVersionNumber': json['quiz_version_number'],
|
|
240
295
|
'quizName': json['quiz_name'],
|
|
296
|
+
'description': json['description'],
|
|
297
|
+
'hasStarted': json['has_started'],
|
|
298
|
+
'passingScore': json['passing_score'],
|
|
299
|
+
'timeLimitMinutes': json['time_limit_minutes'] == null ? undefined : json['time_limit_minutes'],
|
|
300
|
+
'maxAttempts': json['max_attempts'],
|
|
301
|
+
'feedbackTiming': QuizFeedbackTimingFromJSON(json['feedback_timing']),
|
|
302
|
+
'requireAllQuestions': json['require_all_questions'],
|
|
241
303
|
'attemptNumber': json['attempt_number'],
|
|
242
304
|
'isCurrent': json['is_current'],
|
|
243
305
|
'status': json['status'],
|
|
@@ -276,6 +338,13 @@ export function GetLibraryQuizSessionToJSONTyped(value?: GetLibraryQuizSession |
|
|
|
276
338
|
'quiz_version_id': value['quizVersionId'],
|
|
277
339
|
'quiz_version_number': value['quizVersionNumber'],
|
|
278
340
|
'quiz_name': value['quizName'],
|
|
341
|
+
'description': value['description'],
|
|
342
|
+
'has_started': value['hasStarted'],
|
|
343
|
+
'passing_score': value['passingScore'],
|
|
344
|
+
'time_limit_minutes': value['timeLimitMinutes'],
|
|
345
|
+
'max_attempts': value['maxAttempts'],
|
|
346
|
+
'feedback_timing': QuizFeedbackTimingToJSON(value['feedbackTiming']),
|
|
347
|
+
'require_all_questions': value['requireAllQuestions'],
|
|
279
348
|
'attempt_number': value['attemptNumber'],
|
|
280
349
|
'is_current': value['isCurrent'],
|
|
281
350
|
'status': value['status'],
|
|
@@ -41,6 +41,13 @@ import {
|
|
|
41
41
|
LibraryQuizQuestionToJSON,
|
|
42
42
|
LibraryQuizQuestionToJSONTyped,
|
|
43
43
|
} from './LibraryQuizQuestion';
|
|
44
|
+
import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
|
|
45
|
+
import {
|
|
46
|
+
QuizFeedbackTimingFromJSON,
|
|
47
|
+
QuizFeedbackTimingFromJSONTyped,
|
|
48
|
+
QuizFeedbackTimingToJSON,
|
|
49
|
+
QuizFeedbackTimingToJSONTyped,
|
|
50
|
+
} from './QuizFeedbackTiming';
|
|
44
51
|
|
|
45
52
|
/**
|
|
46
53
|
*
|
|
@@ -132,6 +139,24 @@ export interface GetLibraryQuizVersion {
|
|
|
132
139
|
* @memberof GetLibraryQuizVersion
|
|
133
140
|
*/
|
|
134
141
|
requireAllQuestions: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Default number of attempts for this quiz. Zero means unlimited. The value is copied to a course placement when the quiz is added to a course, where it can be overridden.
|
|
144
|
+
* @type {number}
|
|
145
|
+
* @memberof GetLibraryQuizVersion
|
|
146
|
+
*/
|
|
147
|
+
maxAttempts: number;
|
|
148
|
+
/**
|
|
149
|
+
* Show each question's explanation alongside the learner's feedback.
|
|
150
|
+
* @type {boolean}
|
|
151
|
+
* @memberof GetLibraryQuizVersion
|
|
152
|
+
*/
|
|
153
|
+
showExplanations: boolean;
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @type {QuizFeedbackTiming}
|
|
157
|
+
* @memberof GetLibraryQuizVersion
|
|
158
|
+
*/
|
|
159
|
+
feedbackTiming: QuizFeedbackTiming;
|
|
135
160
|
/**
|
|
136
161
|
*
|
|
137
162
|
* @type {{ [key: string]: any; }}
|
|
@@ -205,6 +230,9 @@ export function instanceOfGetLibraryQuizVersion(value: object): value is GetLibr
|
|
|
205
230
|
if (!('showCorrectAnswers' in value) || value['showCorrectAnswers'] === undefined) return false;
|
|
206
231
|
if (!('allowReview' in value) || value['allowReview'] === undefined) return false;
|
|
207
232
|
if (!('requireAllQuestions' in value) || value['requireAllQuestions'] === undefined) return false;
|
|
233
|
+
if (!('maxAttempts' in value) || value['maxAttempts'] === undefined) return false;
|
|
234
|
+
if (!('showExplanations' in value) || value['showExplanations'] === undefined) return false;
|
|
235
|
+
if (!('feedbackTiming' in value) || value['feedbackTiming'] === undefined) return false;
|
|
208
236
|
if (!('settings' in value) || value['settings'] === undefined) return false;
|
|
209
237
|
if (!('questions' in value) || value['questions'] === undefined) return false;
|
|
210
238
|
if (!('criteria' in value) || value['criteria'] === undefined) return false;
|
|
@@ -239,6 +267,9 @@ export function GetLibraryQuizVersionFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
239
267
|
'showCorrectAnswers': json['show_correct_answers'],
|
|
240
268
|
'allowReview': json['allow_review'],
|
|
241
269
|
'requireAllQuestions': json['require_all_questions'],
|
|
270
|
+
'maxAttempts': json['max_attempts'],
|
|
271
|
+
'showExplanations': json['show_explanations'],
|
|
272
|
+
'feedbackTiming': QuizFeedbackTimingFromJSON(json['feedback_timing']),
|
|
242
273
|
'settings': json['settings'],
|
|
243
274
|
'questions': ((json['questions'] as Array<any>).map(LibraryQuizQuestionFromJSON)),
|
|
244
275
|
'criteria': ((json['criteria'] as Array<any>).map(LibraryQuizCriterionFromJSON)),
|
|
@@ -276,6 +307,9 @@ export function GetLibraryQuizVersionToJSONTyped(value?: GetLibraryQuizVersion |
|
|
|
276
307
|
'show_correct_answers': value['showCorrectAnswers'],
|
|
277
308
|
'allow_review': value['allowReview'],
|
|
278
309
|
'require_all_questions': value['requireAllQuestions'],
|
|
310
|
+
'max_attempts': value['maxAttempts'],
|
|
311
|
+
'show_explanations': value['showExplanations'],
|
|
312
|
+
'feedback_timing': QuizFeedbackTimingToJSON(value['feedbackTiming']),
|
|
279
313
|
'settings': value['settings'],
|
|
280
314
|
'questions': ((value['questions'] as Array<any>).map(LibraryQuizQuestionToJSON)),
|
|
281
315
|
'criteria': ((value['criteria'] as Array<any>).map(LibraryQuizCriterionToJSON)),
|
|
@@ -45,6 +45,12 @@ export interface GetQuestionAnswerChoicesInner {
|
|
|
45
45
|
* @memberof GetQuestionAnswerChoicesInner
|
|
46
46
|
*/
|
|
47
47
|
isCorrect: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Keep this answer in its authored position when a quiz randomizes answers.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof GetQuestionAnswerChoicesInner
|
|
52
|
+
*/
|
|
53
|
+
lockPosition: boolean;
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
/**
|
|
@@ -54,6 +60,7 @@ export function instanceOfGetQuestionAnswerChoicesInner(value: object): value is
|
|
|
54
60
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
55
61
|
if (!('text' in value) || value['text'] === undefined) return false;
|
|
56
62
|
if (!('isCorrect' in value) || value['isCorrect'] === undefined) return false;
|
|
63
|
+
if (!('lockPosition' in value) || value['lockPosition'] === undefined) return false;
|
|
57
64
|
return true;
|
|
58
65
|
}
|
|
59
66
|
|
|
@@ -70,6 +77,7 @@ export function GetQuestionAnswerChoicesInnerFromJSONTyped(json: any, ignoreDisc
|
|
|
70
77
|
'id': json['id'],
|
|
71
78
|
'text': RichTextDocumentFromJSON(json['text']),
|
|
72
79
|
'isCorrect': json['is_correct'],
|
|
80
|
+
'lockPosition': json['lock_position'],
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
83
|
|
|
@@ -87,6 +95,7 @@ export function GetQuestionAnswerChoicesInnerToJSONTyped(value?: GetQuestionAnsw
|
|
|
87
95
|
'id': value['id'],
|
|
88
96
|
'text': RichTextDocumentToJSON(value['text']),
|
|
89
97
|
'is_correct': value['isCorrect'],
|
|
98
|
+
'lock_position': value['lockPosition'],
|
|
90
99
|
};
|
|
91
100
|
}
|
|
92
101
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* The selected portal's defaults for new quizzes. The values are copied into a quiz when it is created; changing them later does not change existing quizzes.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetQuizSettings
|
|
20
|
+
*/
|
|
21
|
+
export interface GetQuizSettings {
|
|
22
|
+
/**
|
|
23
|
+
* Attempt limit copied into each new quiz. Zero means unlimited.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof GetQuizSettings
|
|
26
|
+
*/
|
|
27
|
+
defaultMaxAttempts: number;
|
|
28
|
+
/**
|
|
29
|
+
* Time limit copied into each new quiz. Null means no time limit.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof GetQuizSettings
|
|
32
|
+
*/
|
|
33
|
+
defaultTimeLimitMinutes: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* Passing score copied into each new quiz.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof GetQuizSettings
|
|
38
|
+
*/
|
|
39
|
+
defaultPassingScore: number;
|
|
40
|
+
/**
|
|
41
|
+
* False while the portal still uses the built-in defaults.
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof GetQuizSettings
|
|
44
|
+
*/
|
|
45
|
+
isCustomized: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof GetQuizSettings
|
|
50
|
+
*/
|
|
51
|
+
updatedAt?: number | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the GetQuizSettings interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfGetQuizSettings(value: object): value is GetQuizSettings {
|
|
58
|
+
if (!('defaultMaxAttempts' in value) || value['defaultMaxAttempts'] === undefined) return false;
|
|
59
|
+
if (!('defaultTimeLimitMinutes' in value) || value['defaultTimeLimitMinutes'] === undefined) return false;
|
|
60
|
+
if (!('defaultPassingScore' in value) || value['defaultPassingScore'] === undefined) return false;
|
|
61
|
+
if (!('isCustomized' in value) || value['isCustomized'] === undefined) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function GetQuizSettingsFromJSON(json: any): GetQuizSettings {
|
|
66
|
+
return GetQuizSettingsFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function GetQuizSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizSettings {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'defaultMaxAttempts': json['default_max_attempts'],
|
|
76
|
+
'defaultTimeLimitMinutes': json['default_time_limit_minutes'],
|
|
77
|
+
'defaultPassingScore': json['default_passing_score'],
|
|
78
|
+
'isCustomized': json['is_customized'],
|
|
79
|
+
'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function GetQuizSettingsToJSON(json: any): GetQuizSettings {
|
|
84
|
+
return GetQuizSettingsToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function GetQuizSettingsToJSONTyped(value?: GetQuizSettings | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'default_max_attempts': value['defaultMaxAttempts'],
|
|
95
|
+
'default_time_limit_minutes': value['defaultTimeLimitMinutes'],
|
|
96
|
+
'default_passing_score': value['defaultPassingScore'],
|
|
97
|
+
'is_customized': value['isCustomized'],
|
|
98
|
+
'updated_at': value['updatedAt'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -80,7 +80,7 @@ export interface HostedScormOutlineEntry {
|
|
|
80
80
|
*/
|
|
81
81
|
attemptNumber: number | null;
|
|
82
82
|
/**
|
|
83
|
-
* Attempts the learner may take. For quizzes this includes any extra attempts granted to the learner; null for sections.
|
|
83
|
+
* Attempts the learner may take. For quizzes this includes any extra attempts granted to the learner, and zero means unlimited; null for sections.
|
|
84
84
|
* @type {number}
|
|
85
85
|
* @memberof HostedScormOutlineEntry
|
|
86
86
|
*/
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { RichTextDocument } from './RichTextDocument';
|
|
17
|
+
import {
|
|
18
|
+
RichTextDocumentFromJSON,
|
|
19
|
+
RichTextDocumentFromJSONTyped,
|
|
20
|
+
RichTextDocumentToJSON,
|
|
21
|
+
RichTextDocumentToJSONTyped,
|
|
22
|
+
} from './RichTextDocument';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Feedback for one answered question. Which parts are present depends on the quiz settings: correct answers need `show_correct_answers` and explanations need `show_explanations`.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface LibraryQuizQuestionFeedback
|
|
28
|
+
*/
|
|
29
|
+
export interface LibraryQuizQuestionFeedback {
|
|
30
|
+
/**
|
|
31
|
+
* Null while the answer is waiting for manual grading.
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
34
|
+
*/
|
|
35
|
+
isCorrect?: boolean | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
40
|
+
*/
|
|
41
|
+
pointsEarned: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {LibraryQuizQuestionFeedbackGradingStatusEnum}
|
|
45
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
46
|
+
*/
|
|
47
|
+
gradingStatus: LibraryQuizQuestionFeedbackGradingStatusEnum;
|
|
48
|
+
/**
|
|
49
|
+
* Correct answer-choice IDs. Present only when correct answers are shown.
|
|
50
|
+
* @type {Array<string>}
|
|
51
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
52
|
+
*/
|
|
53
|
+
correctChoiceIds?: Array<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Correct text answer. Present only when correct answers are shown.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
58
|
+
*/
|
|
59
|
+
correctAnswer?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
64
|
+
*/
|
|
65
|
+
explanation?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {RichTextDocument}
|
|
69
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
70
|
+
*/
|
|
71
|
+
explanationRich?: RichTextDocument | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export const LibraryQuizQuestionFeedbackGradingStatusEnum = {
|
|
79
|
+
AutoGraded: 'auto_graded',
|
|
80
|
+
PendingReview: 'pending_review',
|
|
81
|
+
Graded: 'graded'
|
|
82
|
+
} as const;
|
|
83
|
+
export type LibraryQuizQuestionFeedbackGradingStatusEnum = typeof LibraryQuizQuestionFeedbackGradingStatusEnum[keyof typeof LibraryQuizQuestionFeedbackGradingStatusEnum];
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Check if a given object implements the LibraryQuizQuestionFeedback interface.
|
|
88
|
+
*/
|
|
89
|
+
export function instanceOfLibraryQuizQuestionFeedback(value: object): value is LibraryQuizQuestionFeedback {
|
|
90
|
+
if (!('pointsEarned' in value) || value['pointsEarned'] === undefined) return false;
|
|
91
|
+
if (!('gradingStatus' in value) || value['gradingStatus'] === undefined) return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function LibraryQuizQuestionFeedbackFromJSON(json: any): LibraryQuizQuestionFeedback {
|
|
96
|
+
return LibraryQuizQuestionFeedbackFromJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function LibraryQuizQuestionFeedbackFromJSONTyped(json: any, ignoreDiscriminator: boolean): LibraryQuizQuestionFeedback {
|
|
100
|
+
if (json == null) {
|
|
101
|
+
return json;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'isCorrect': json['is_correct'] == null ? undefined : json['is_correct'],
|
|
106
|
+
'pointsEarned': json['points_earned'],
|
|
107
|
+
'gradingStatus': json['grading_status'],
|
|
108
|
+
'correctChoiceIds': json['correct_choice_ids'] == null ? undefined : json['correct_choice_ids'],
|
|
109
|
+
'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
|
|
110
|
+
'explanation': json['explanation'] == null ? undefined : json['explanation'],
|
|
111
|
+
'explanationRich': json['explanation_rich'] == null ? undefined : RichTextDocumentFromJSON(json['explanation_rich']),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function LibraryQuizQuestionFeedbackToJSON(json: any): LibraryQuizQuestionFeedback {
|
|
116
|
+
return LibraryQuizQuestionFeedbackToJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function LibraryQuizQuestionFeedbackToJSONTyped(value?: LibraryQuizQuestionFeedback | null, ignoreDiscriminator: boolean = false): any {
|
|
120
|
+
if (value == null) {
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'is_correct': value['isCorrect'],
|
|
127
|
+
'points_earned': value['pointsEarned'],
|
|
128
|
+
'grading_status': value['gradingStatus'],
|
|
129
|
+
'correct_choice_ids': value['correctChoiceIds'],
|
|
130
|
+
'correct_answer': value['correctAnswer'],
|
|
131
|
+
'explanation': value['explanation'],
|
|
132
|
+
'explanation_rich': RichTextDocumentToJSON(value['explanationRich']),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
@@ -51,6 +51,12 @@ export interface LibraryQuizSessionAnswerChoice {
|
|
|
51
51
|
* @memberof LibraryQuizSessionAnswerChoice
|
|
52
52
|
*/
|
|
53
53
|
displayOrder: number;
|
|
54
|
+
/**
|
|
55
|
+
* This answer keeps its authored position when answers are randomized.
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof LibraryQuizSessionAnswerChoice
|
|
58
|
+
*/
|
|
59
|
+
lockPosition?: boolean;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
/**
|
|
@@ -77,6 +83,7 @@ export function LibraryQuizSessionAnswerChoiceFromJSONTyped(json: any, ignoreDis
|
|
|
77
83
|
'text': json['text'],
|
|
78
84
|
'textRich': json['text_rich'] == null ? undefined : RichTextDocumentFromJSON(json['text_rich']),
|
|
79
85
|
'displayOrder': json['display_order'],
|
|
86
|
+
'lockPosition': json['lock_position'] == null ? undefined : json['lock_position'],
|
|
80
87
|
};
|
|
81
88
|
}
|
|
82
89
|
|
|
@@ -95,6 +102,7 @@ export function LibraryQuizSessionAnswerChoiceToJSONTyped(value?: LibraryQuizSes
|
|
|
95
102
|
'text': value['text'],
|
|
96
103
|
'text_rich': RichTextDocumentToJSON(value['textRich']),
|
|
97
104
|
'display_order': value['displayOrder'],
|
|
105
|
+
'lock_position': value['lockPosition'],
|
|
98
106
|
};
|
|
99
107
|
}
|
|
100
108
|
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { LibraryQuizQuestionFeedback } from './LibraryQuizQuestionFeedback';
|
|
17
|
+
import {
|
|
18
|
+
LibraryQuizQuestionFeedbackFromJSON,
|
|
19
|
+
LibraryQuizQuestionFeedbackFromJSONTyped,
|
|
20
|
+
LibraryQuizQuestionFeedbackToJSON,
|
|
21
|
+
LibraryQuizQuestionFeedbackToJSONTyped,
|
|
22
|
+
} from './LibraryQuizQuestionFeedback';
|
|
16
23
|
import type { RichTextDocument } from './RichTextDocument';
|
|
17
24
|
import {
|
|
18
25
|
RichTextDocumentFromJSON,
|
|
@@ -82,6 +89,24 @@ export interface LibraryQuizSessionQuestion {
|
|
|
82
89
|
* @memberof LibraryQuizSessionQuestion
|
|
83
90
|
*/
|
|
84
91
|
isAnswered: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The learner flagged this question to come back to before submitting.
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
* @memberof LibraryQuizSessionQuestion
|
|
96
|
+
*/
|
|
97
|
+
isFlagged: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The learner checked this answer for immediate feedback. A checked answer can no longer be changed.
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof LibraryQuizSessionQuestion
|
|
102
|
+
*/
|
|
103
|
+
isChecked: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Present once the answer has been checked for immediate feedback.
|
|
106
|
+
* @type {LibraryQuizQuestionFeedback}
|
|
107
|
+
* @memberof LibraryQuizSessionQuestion
|
|
108
|
+
*/
|
|
109
|
+
feedback?: LibraryQuizQuestionFeedback | null;
|
|
85
110
|
/**
|
|
86
111
|
*
|
|
87
112
|
* @type {{ [key: string]: any; }}
|
|
@@ -116,6 +141,8 @@ export function instanceOfLibraryQuizSessionQuestion(value: object): value is Li
|
|
|
116
141
|
if (!('questionText' in value) || value['questionText'] === undefined) return false;
|
|
117
142
|
if (!('answerChoices' in value) || value['answerChoices'] === undefined) return false;
|
|
118
143
|
if (!('isAnswered' in value) || value['isAnswered'] === undefined) return false;
|
|
144
|
+
if (!('isFlagged' in value) || value['isFlagged'] === undefined) return false;
|
|
145
|
+
if (!('isChecked' in value) || value['isChecked'] === undefined) return false;
|
|
119
146
|
return true;
|
|
120
147
|
}
|
|
121
148
|
|
|
@@ -137,6 +164,9 @@ export function LibraryQuizSessionQuestionFromJSONTyped(json: any, ignoreDiscrim
|
|
|
137
164
|
'questionTextRich': json['question_text_rich'] == null ? undefined : RichTextDocumentFromJSON(json['question_text_rich']),
|
|
138
165
|
'answerChoices': ((json['answer_choices'] as Array<any>).map(LibraryQuizSessionAnswerChoiceFromJSON)),
|
|
139
166
|
'isAnswered': json['is_answered'],
|
|
167
|
+
'isFlagged': json['is_flagged'],
|
|
168
|
+
'isChecked': json['is_checked'],
|
|
169
|
+
'feedback': json['feedback'] == null ? undefined : LibraryQuizQuestionFeedbackFromJSON(json['feedback']),
|
|
140
170
|
'answer': json['answer'] == null ? undefined : json['answer'],
|
|
141
171
|
};
|
|
142
172
|
}
|
|
@@ -160,6 +190,9 @@ export function LibraryQuizSessionQuestionToJSONTyped(value?: LibraryQuizSession
|
|
|
160
190
|
'question_text_rich': RichTextDocumentToJSON(value['questionTextRich']),
|
|
161
191
|
'answer_choices': ((value['answerChoices'] as Array<any>).map(LibraryQuizSessionAnswerChoiceToJSON)),
|
|
162
192
|
'is_answered': value['isAnswered'],
|
|
193
|
+
'is_flagged': value['isFlagged'],
|
|
194
|
+
'is_checked': value['isChecked'],
|
|
195
|
+
'feedback': LibraryQuizQuestionFeedbackToJSON(value['feedback']),
|
|
163
196
|
'answer': value['answer'],
|
|
164
197
|
};
|
|
165
198
|
}
|
|
@@ -76,7 +76,7 @@ export interface PostCourseVersionItem {
|
|
|
76
76
|
*/
|
|
77
77
|
launchMode?: ContentLaunchMode;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Omit to inherit the quiz's attempt limit (resources default to 1). Zero means unlimited and is allowed for quiz placements only.
|
|
80
80
|
* @type {number}
|
|
81
81
|
* @memberof PostCourseVersionItem
|
|
82
82
|
*/
|