@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
|
@@ -21,6 +21,7 @@ import { type PostDispatchLaunch } from '../models/PostDispatchLaunch';
|
|
|
21
21
|
import { type PostDispatchLaunchResponse } from '../models/PostDispatchLaunchResponse';
|
|
22
22
|
import { type PostDispatchTokenExchange } from '../models/PostDispatchTokenExchange';
|
|
23
23
|
import { type PutLibraryQuizSessionAnswer } from '../models/PutLibraryQuizSessionAnswer';
|
|
24
|
+
import { type PutLibraryQuizSessionQuestionFlag } from '../models/PutLibraryQuizSessionQuestionFlag';
|
|
24
25
|
export interface GetDispatchQuizSessionRequest {
|
|
25
26
|
sessionId: string;
|
|
26
27
|
}
|
|
@@ -37,6 +38,13 @@ export interface PostDispatchItemLaunchRequest {
|
|
|
37
38
|
export interface PostDispatchLaunchRequest {
|
|
38
39
|
postDispatchLaunch: PostDispatchLaunch;
|
|
39
40
|
}
|
|
41
|
+
export interface PostDispatchQuizSessionAnswerCheckRequest {
|
|
42
|
+
sessionId: string;
|
|
43
|
+
sessionQuestionId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface PostDispatchQuizSessionStartRequest {
|
|
46
|
+
sessionId: string;
|
|
47
|
+
}
|
|
40
48
|
export interface PostDispatchQuizSessionSubmitRequest {
|
|
41
49
|
sessionId: string;
|
|
42
50
|
}
|
|
@@ -48,6 +56,11 @@ export interface PutDispatchQuizSessionAnswerRequest {
|
|
|
48
56
|
sessionQuestionId: string;
|
|
49
57
|
putLibraryQuizSessionAnswer: PutLibraryQuizSessionAnswer;
|
|
50
58
|
}
|
|
59
|
+
export interface PutDispatchQuizSessionQuestionFlagRequest {
|
|
60
|
+
sessionId: string;
|
|
61
|
+
sessionQuestionId: string;
|
|
62
|
+
putLibraryQuizSessionQuestionFlag: PutLibraryQuizSessionQuestionFlag;
|
|
63
|
+
}
|
|
51
64
|
/**
|
|
52
65
|
*
|
|
53
66
|
*/
|
|
@@ -126,6 +139,34 @@ export declare class DispatchApi extends runtime.BaseAPI {
|
|
|
126
139
|
* Launch a dispatch package
|
|
127
140
|
*/
|
|
128
141
|
postDispatchLaunch(requestParameters: PostDispatchLaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDispatchLaunchResponse>;
|
|
142
|
+
/**
|
|
143
|
+
* Creates request options for postDispatchQuizSessionAnswerCheck without sending the request
|
|
144
|
+
*/
|
|
145
|
+
postDispatchQuizSessionAnswerCheckRequestOpts(requestParameters: PostDispatchQuizSessionAnswerCheckRequest): Promise<runtime.RequestOpts>;
|
|
146
|
+
/**
|
|
147
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
148
|
+
* Check a saved answer for immediate feedback
|
|
149
|
+
*/
|
|
150
|
+
postDispatchQuizSessionAnswerCheckRaw(requestParameters: PostDispatchQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>>;
|
|
151
|
+
/**
|
|
152
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
153
|
+
* Check a saved answer for immediate feedback
|
|
154
|
+
*/
|
|
155
|
+
postDispatchQuizSessionAnswerCheck(requestParameters: PostDispatchQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for postDispatchQuizSessionStart without sending the request
|
|
158
|
+
*/
|
|
159
|
+
postDispatchQuizSessionStartRequestOpts(requestParameters: PostDispatchQuizSessionStartRequest): Promise<runtime.RequestOpts>;
|
|
160
|
+
/**
|
|
161
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
162
|
+
* Begin a quiz attempt from its introduction page
|
|
163
|
+
*/
|
|
164
|
+
postDispatchQuizSessionStartRaw(requestParameters: PostDispatchQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>>;
|
|
165
|
+
/**
|
|
166
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
167
|
+
* Begin a quiz attempt from its introduction page
|
|
168
|
+
*/
|
|
169
|
+
postDispatchQuizSessionStart(requestParameters: PostDispatchQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
129
170
|
/**
|
|
130
171
|
* Creates request options for postDispatchQuizSessionSubmit without sending the request
|
|
131
172
|
*/
|
|
@@ -176,4 +217,16 @@ export declare class DispatchApi extends runtime.BaseAPI {
|
|
|
176
217
|
* Save a registration-owned native quiz answer
|
|
177
218
|
*/
|
|
178
219
|
putDispatchQuizSessionAnswer(requestParameters: PutDispatchQuizSessionAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
220
|
+
/**
|
|
221
|
+
* Creates request options for putDispatchQuizSessionQuestionFlag without sending the request
|
|
222
|
+
*/
|
|
223
|
+
putDispatchQuizSessionQuestionFlagRequestOpts(requestParameters: PutDispatchQuizSessionQuestionFlagRequest): Promise<runtime.RequestOpts>;
|
|
224
|
+
/**
|
|
225
|
+
* Flag or unflag a question to review before submitting
|
|
226
|
+
*/
|
|
227
|
+
putDispatchQuizSessionQuestionFlagRaw(requestParameters: PutDispatchQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>>;
|
|
228
|
+
/**
|
|
229
|
+
* Flag or unflag a question to review before submitting
|
|
230
|
+
*/
|
|
231
|
+
putDispatchQuizSessionQuestionFlag(requestParameters: PutDispatchQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
179
232
|
}
|
package/dist/apis/DispatchApi.js
CHANGED
|
@@ -35,6 +35,7 @@ const PostDispatchLaunch_1 = require("../models/PostDispatchLaunch");
|
|
|
35
35
|
const PostDispatchLaunchResponse_1 = require("../models/PostDispatchLaunchResponse");
|
|
36
36
|
const PostDispatchTokenExchange_1 = require("../models/PostDispatchTokenExchange");
|
|
37
37
|
const PutLibraryQuizSessionAnswer_1 = require("../models/PutLibraryQuizSessionAnswer");
|
|
38
|
+
const PutLibraryQuizSessionQuestionFlag_1 = require("../models/PutLibraryQuizSessionQuestionFlag");
|
|
38
39
|
/**
|
|
39
40
|
*
|
|
40
41
|
*/
|
|
@@ -274,6 +275,92 @@ class DispatchApi extends runtime.BaseAPI {
|
|
|
274
275
|
return yield response.value();
|
|
275
276
|
});
|
|
276
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Creates request options for postDispatchQuizSessionAnswerCheck without sending the request
|
|
280
|
+
*/
|
|
281
|
+
postDispatchQuizSessionAnswerCheckRequestOpts(requestParameters) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
if (requestParameters['sessionId'] == null) {
|
|
284
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postDispatchQuizSessionAnswerCheck().');
|
|
285
|
+
}
|
|
286
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
287
|
+
throw new runtime.RequiredError('sessionQuestionId', 'Required parameter "sessionQuestionId" was null or undefined when calling postDispatchQuizSessionAnswerCheck().');
|
|
288
|
+
}
|
|
289
|
+
const queryParameters = {};
|
|
290
|
+
const headerParameters = {};
|
|
291
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId}/check`;
|
|
292
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
293
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
294
|
+
return {
|
|
295
|
+
path: urlPath,
|
|
296
|
+
method: 'POST',
|
|
297
|
+
headers: headerParameters,
|
|
298
|
+
query: queryParameters,
|
|
299
|
+
};
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
304
|
+
* Check a saved answer for immediate feedback
|
|
305
|
+
*/
|
|
306
|
+
postDispatchQuizSessionAnswerCheckRaw(requestParameters, initOverrides) {
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
const requestOptions = yield this.postDispatchQuizSessionAnswerCheckRequestOpts(requestParameters);
|
|
309
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
310
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetLibraryQuizSession_1.GetLibraryQuizSessionFromJSON)(jsonValue));
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
315
|
+
* Check a saved answer for immediate feedback
|
|
316
|
+
*/
|
|
317
|
+
postDispatchQuizSessionAnswerCheck(requestParameters, initOverrides) {
|
|
318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
+
const response = yield this.postDispatchQuizSessionAnswerCheckRaw(requestParameters, initOverrides);
|
|
320
|
+
return yield response.value();
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Creates request options for postDispatchQuizSessionStart without sending the request
|
|
325
|
+
*/
|
|
326
|
+
postDispatchQuizSessionStartRequestOpts(requestParameters) {
|
|
327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
if (requestParameters['sessionId'] == null) {
|
|
329
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postDispatchQuizSessionStart().');
|
|
330
|
+
}
|
|
331
|
+
const queryParameters = {};
|
|
332
|
+
const headerParameters = {};
|
|
333
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/start`;
|
|
334
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
335
|
+
return {
|
|
336
|
+
path: urlPath,
|
|
337
|
+
method: 'POST',
|
|
338
|
+
headers: headerParameters,
|
|
339
|
+
query: queryParameters,
|
|
340
|
+
};
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
345
|
+
* Begin a quiz attempt from its introduction page
|
|
346
|
+
*/
|
|
347
|
+
postDispatchQuizSessionStartRaw(requestParameters, initOverrides) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
const requestOptions = yield this.postDispatchQuizSessionStartRequestOpts(requestParameters);
|
|
350
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
351
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetLibraryQuizSession_1.GetLibraryQuizSessionFromJSON)(jsonValue));
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
356
|
+
* Begin a quiz attempt from its introduction page
|
|
357
|
+
*/
|
|
358
|
+
postDispatchQuizSessionStart(requestParameters, initOverrides) {
|
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
const response = yield this.postDispatchQuizSessionStartRaw(requestParameters, initOverrides);
|
|
361
|
+
return yield response.value();
|
|
362
|
+
});
|
|
363
|
+
}
|
|
277
364
|
/**
|
|
278
365
|
* Creates request options for postDispatchQuizSessionSubmit without sending the request
|
|
279
366
|
*/
|
|
@@ -438,5 +525,53 @@ class DispatchApi extends runtime.BaseAPI {
|
|
|
438
525
|
return yield response.value();
|
|
439
526
|
});
|
|
440
527
|
}
|
|
528
|
+
/**
|
|
529
|
+
* Creates request options for putDispatchQuizSessionQuestionFlag without sending the request
|
|
530
|
+
*/
|
|
531
|
+
putDispatchQuizSessionQuestionFlagRequestOpts(requestParameters) {
|
|
532
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
533
|
+
if (requestParameters['sessionId'] == null) {
|
|
534
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling putDispatchQuizSessionQuestionFlag().');
|
|
535
|
+
}
|
|
536
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
537
|
+
throw new runtime.RequiredError('sessionQuestionId', 'Required parameter "sessionQuestionId" was null or undefined when calling putDispatchQuizSessionQuestionFlag().');
|
|
538
|
+
}
|
|
539
|
+
if (requestParameters['putLibraryQuizSessionQuestionFlag'] == null) {
|
|
540
|
+
throw new runtime.RequiredError('putLibraryQuizSessionQuestionFlag', 'Required parameter "putLibraryQuizSessionQuestionFlag" was null or undefined when calling putDispatchQuizSessionQuestionFlag().');
|
|
541
|
+
}
|
|
542
|
+
const queryParameters = {};
|
|
543
|
+
const headerParameters = {};
|
|
544
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
545
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/questions/{sessionQuestionId}/flag`;
|
|
546
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
547
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
548
|
+
return {
|
|
549
|
+
path: urlPath,
|
|
550
|
+
method: 'PUT',
|
|
551
|
+
headers: headerParameters,
|
|
552
|
+
query: queryParameters,
|
|
553
|
+
body: (0, PutLibraryQuizSessionQuestionFlag_1.PutLibraryQuizSessionQuestionFlagToJSON)(requestParameters['putLibraryQuizSessionQuestionFlag']),
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Flag or unflag a question to review before submitting
|
|
559
|
+
*/
|
|
560
|
+
putDispatchQuizSessionQuestionFlagRaw(requestParameters, initOverrides) {
|
|
561
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
562
|
+
const requestOptions = yield this.putDispatchQuizSessionQuestionFlagRequestOpts(requestParameters);
|
|
563
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
564
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetLibraryQuizSession_1.GetLibraryQuizSessionFromJSON)(jsonValue));
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Flag or unflag a question to review before submitting
|
|
569
|
+
*/
|
|
570
|
+
putDispatchQuizSessionQuestionFlag(requestParameters, initOverrides) {
|
|
571
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
572
|
+
const response = yield this.putDispatchQuizSessionQuestionFlagRaw(requestParameters, initOverrides);
|
|
573
|
+
return yield response.value();
|
|
574
|
+
});
|
|
575
|
+
}
|
|
441
576
|
}
|
|
442
577
|
exports.DispatchApi = DispatchApi;
|
|
@@ -19,6 +19,7 @@ import { type GetLibraryQuizSession } from '../models/GetLibraryQuizSession';
|
|
|
19
19
|
import { type GetLibraryQuizSessionList } from '../models/GetLibraryQuizSessionList';
|
|
20
20
|
import { type GetLibraryQuizUsage } from '../models/GetLibraryQuizUsage';
|
|
21
21
|
import { type GetLibraryQuizVersion } from '../models/GetLibraryQuizVersion';
|
|
22
|
+
import { type GetQuizSettings } from '../models/GetQuizSettings';
|
|
22
23
|
import { type LibraryQuizCriterion } from '../models/LibraryQuizCriterion';
|
|
23
24
|
import { type LibraryQuizQuestion } from '../models/LibraryQuizQuestion';
|
|
24
25
|
import { type PostCourseLibraryQuizSession } from '../models/PostCourseLibraryQuizSession';
|
|
@@ -31,7 +32,9 @@ import { type PutLibraryQuizQuestions } from '../models/PutLibraryQuizQuestions'
|
|
|
31
32
|
import { type PutLibraryQuizSessionAnswer } from '../models/PutLibraryQuizSessionAnswer';
|
|
32
33
|
import { type PutLibraryQuizSessionGrade } from '../models/PutLibraryQuizSessionGrade';
|
|
33
34
|
import { type PutLibraryQuizSessionOverride } from '../models/PutLibraryQuizSessionOverride';
|
|
35
|
+
import { type PutLibraryQuizSessionQuestionFlag } from '../models/PutLibraryQuizSessionQuestionFlag';
|
|
34
36
|
import { type PutLibraryQuizVersion } from '../models/PutLibraryQuizVersion';
|
|
37
|
+
import { type PutQuizSettings } from '../models/PutQuizSettings';
|
|
35
38
|
import { type ResourceSessionEnvironment } from '../models/ResourceSessionEnvironment';
|
|
36
39
|
export interface DeleteLibraryQuizVersionRequest {
|
|
37
40
|
quizId: string;
|
|
@@ -109,6 +112,13 @@ export interface PostLibraryQuizSessionRequest {
|
|
|
109
112
|
versionId: string;
|
|
110
113
|
postLibraryQuizSession?: PostLibraryQuizSession;
|
|
111
114
|
}
|
|
115
|
+
export interface PostLibraryQuizSessionAnswerCheckRequest {
|
|
116
|
+
sessionId: string;
|
|
117
|
+
sessionQuestionId: string;
|
|
118
|
+
}
|
|
119
|
+
export interface PostLibraryQuizSessionStartRequest {
|
|
120
|
+
sessionId: string;
|
|
121
|
+
}
|
|
112
122
|
export interface PostLibraryQuizSessionSubmitRequest {
|
|
113
123
|
sessionId: string;
|
|
114
124
|
}
|
|
@@ -152,11 +162,19 @@ export interface PutLibraryQuizSessionOverrideRequest {
|
|
|
152
162
|
sessionId: string;
|
|
153
163
|
putLibraryQuizSessionOverride: PutLibraryQuizSessionOverride;
|
|
154
164
|
}
|
|
165
|
+
export interface PutLibraryQuizSessionQuestionFlagRequest {
|
|
166
|
+
sessionId: string;
|
|
167
|
+
sessionQuestionId: string;
|
|
168
|
+
putLibraryQuizSessionQuestionFlag: PutLibraryQuizSessionQuestionFlag;
|
|
169
|
+
}
|
|
155
170
|
export interface PutLibraryQuizVersionRequest {
|
|
156
171
|
quizId: string;
|
|
157
172
|
versionId: string;
|
|
158
173
|
putLibraryQuizVersion: PutLibraryQuizVersion;
|
|
159
174
|
}
|
|
175
|
+
export interface PutQuizSettingsRequest {
|
|
176
|
+
putQuizSettings: PutQuizSettings;
|
|
177
|
+
}
|
|
160
178
|
/**
|
|
161
179
|
*
|
|
162
180
|
*/
|
|
@@ -293,6 +311,20 @@ export declare class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
293
311
|
* Get a reusable quiz version
|
|
294
312
|
*/
|
|
295
313
|
getLibraryQuizVersion(requestParameters: GetLibraryQuizVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizVersion>;
|
|
314
|
+
/**
|
|
315
|
+
* Creates request options for getQuizSettings without sending the request
|
|
316
|
+
*/
|
|
317
|
+
getQuizSettingsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
318
|
+
/**
|
|
319
|
+
* Returns the attempt limit, time limit, and passing score that are copied into each new quiz. A portal that has never saved its own values gets the built-in defaults (5 attempts, 60 minutes, 70%).
|
|
320
|
+
* Get the selected portal\'s defaults for new quizzes
|
|
321
|
+
*/
|
|
322
|
+
getQuizSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizSettings>>;
|
|
323
|
+
/**
|
|
324
|
+
* Returns the attempt limit, time limit, and passing score that are copied into each new quiz. A portal that has never saved its own values gets the built-in defaults (5 attempts, 60 minutes, 70%).
|
|
325
|
+
* Get the selected portal\'s defaults for new quizzes
|
|
326
|
+
*/
|
|
327
|
+
getQuizSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizSettings>;
|
|
296
328
|
/**
|
|
297
329
|
* Creates request options for postCourseLibraryQuizSession without sending the request
|
|
298
330
|
*/
|
|
@@ -353,6 +385,34 @@ export declare class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
353
385
|
* Start or resume a sandbox attempt for an exact quiz version
|
|
354
386
|
*/
|
|
355
387
|
postLibraryQuizSession(requestParameters: PostLibraryQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
388
|
+
/**
|
|
389
|
+
* Creates request options for postLibraryQuizSessionAnswerCheck without sending the request
|
|
390
|
+
*/
|
|
391
|
+
postLibraryQuizSessionAnswerCheckRequestOpts(requestParameters: PostLibraryQuizSessionAnswerCheckRequest): Promise<runtime.RequestOpts>;
|
|
392
|
+
/**
|
|
393
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
394
|
+
* Check a saved answer for immediate feedback
|
|
395
|
+
*/
|
|
396
|
+
postLibraryQuizSessionAnswerCheckRaw(requestParameters: PostLibraryQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>>;
|
|
397
|
+
/**
|
|
398
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
399
|
+
* Check a saved answer for immediate feedback
|
|
400
|
+
*/
|
|
401
|
+
postLibraryQuizSessionAnswerCheck(requestParameters: PostLibraryQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
402
|
+
/**
|
|
403
|
+
* Creates request options for postLibraryQuizSessionStart without sending the request
|
|
404
|
+
*/
|
|
405
|
+
postLibraryQuizSessionStartRequestOpts(requestParameters: PostLibraryQuizSessionStartRequest): Promise<runtime.RequestOpts>;
|
|
406
|
+
/**
|
|
407
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
408
|
+
* Begin a quiz attempt from its introduction page
|
|
409
|
+
*/
|
|
410
|
+
postLibraryQuizSessionStartRaw(requestParameters: PostLibraryQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>>;
|
|
411
|
+
/**
|
|
412
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
413
|
+
* Begin a quiz attempt from its introduction page
|
|
414
|
+
*/
|
|
415
|
+
postLibraryQuizSessionStart(requestParameters: PostLibraryQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
356
416
|
/**
|
|
357
417
|
* Creates request options for postLibraryQuizSessionSubmit without sending the request
|
|
358
418
|
*/
|
|
@@ -473,6 +533,18 @@ export declare class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
473
533
|
* Override a learner\'s live quiz-session progress
|
|
474
534
|
*/
|
|
475
535
|
putLibraryQuizSessionOverride(requestParameters: PutLibraryQuizSessionOverrideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
536
|
+
/**
|
|
537
|
+
* Creates request options for putLibraryQuizSessionQuestionFlag without sending the request
|
|
538
|
+
*/
|
|
539
|
+
putLibraryQuizSessionQuestionFlagRequestOpts(requestParameters: PutLibraryQuizSessionQuestionFlagRequest): Promise<runtime.RequestOpts>;
|
|
540
|
+
/**
|
|
541
|
+
* Flag or unflag a question to review before submitting
|
|
542
|
+
*/
|
|
543
|
+
putLibraryQuizSessionQuestionFlagRaw(requestParameters: PutLibraryQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>>;
|
|
544
|
+
/**
|
|
545
|
+
* Flag or unflag a question to review before submitting
|
|
546
|
+
*/
|
|
547
|
+
putLibraryQuizSessionQuestionFlag(requestParameters: PutLibraryQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
476
548
|
/**
|
|
477
549
|
* Creates request options for putLibraryQuizVersion without sending the request
|
|
478
550
|
*/
|
|
@@ -485,4 +557,18 @@ export declare class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
485
557
|
* Edit a draft reusable quiz version
|
|
486
558
|
*/
|
|
487
559
|
putLibraryQuizVersion(requestParameters: PutLibraryQuizVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizVersion>;
|
|
560
|
+
/**
|
|
561
|
+
* Creates request options for putQuizSettings without sending the request
|
|
562
|
+
*/
|
|
563
|
+
putQuizSettingsRequestOpts(requestParameters: PutQuizSettingsRequest): Promise<runtime.RequestOpts>;
|
|
564
|
+
/**
|
|
565
|
+
* Existing quizzes keep their own settings; only quizzes created afterwards start from the new defaults.
|
|
566
|
+
* Update the selected portal\'s defaults for new quizzes
|
|
567
|
+
*/
|
|
568
|
+
putQuizSettingsRaw(requestParameters: PutQuizSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizSettings>>;
|
|
569
|
+
/**
|
|
570
|
+
* Existing quizzes keep their own settings; only quizzes created afterwards start from the new defaults.
|
|
571
|
+
* Update the selected portal\'s defaults for new quizzes
|
|
572
|
+
*/
|
|
573
|
+
putQuizSettings(requestParameters: PutQuizSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizSettings>;
|
|
488
574
|
}
|
|
@@ -30,6 +30,7 @@ import { GetLibraryQuizSessionFromJSON, } from '../models/GetLibraryQuizSession'
|
|
|
30
30
|
import { GetLibraryQuizSessionListFromJSON, } from '../models/GetLibraryQuizSessionList';
|
|
31
31
|
import { GetLibraryQuizUsageFromJSON, } from '../models/GetLibraryQuizUsage';
|
|
32
32
|
import { GetLibraryQuizVersionFromJSON, } from '../models/GetLibraryQuizVersion';
|
|
33
|
+
import { GetQuizSettingsFromJSON, } from '../models/GetQuizSettings';
|
|
33
34
|
import { LibraryQuizCriterionFromJSON, } from '../models/LibraryQuizCriterion';
|
|
34
35
|
import { LibraryQuizQuestionFromJSON, } from '../models/LibraryQuizQuestion';
|
|
35
36
|
import { PostCourseLibraryQuizSessionToJSON, } from '../models/PostCourseLibraryQuizSession';
|
|
@@ -42,7 +43,9 @@ import { PutLibraryQuizQuestionsToJSON, } from '../models/PutLibraryQuizQuestion
|
|
|
42
43
|
import { PutLibraryQuizSessionAnswerToJSON, } from '../models/PutLibraryQuizSessionAnswer';
|
|
43
44
|
import { PutLibraryQuizSessionGradeToJSON, } from '../models/PutLibraryQuizSessionGrade';
|
|
44
45
|
import { PutLibraryQuizSessionOverrideToJSON, } from '../models/PutLibraryQuizSessionOverride';
|
|
46
|
+
import { PutLibraryQuizSessionQuestionFlagToJSON, } from '../models/PutLibraryQuizSessionQuestionFlag';
|
|
45
47
|
import { PutLibraryQuizVersionToJSON, } from '../models/PutLibraryQuizVersion';
|
|
48
|
+
import { PutQuizSettingsToJSON, } from '../models/PutQuizSettings';
|
|
46
49
|
/**
|
|
47
50
|
*
|
|
48
51
|
*/
|
|
@@ -537,6 +540,43 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
537
540
|
return yield response.value();
|
|
538
541
|
});
|
|
539
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* Creates request options for getQuizSettings without sending the request
|
|
545
|
+
*/
|
|
546
|
+
getQuizSettingsRequestOpts() {
|
|
547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
+
const queryParameters = {};
|
|
549
|
+
const headerParameters = {};
|
|
550
|
+
let urlPath = `/content-library/quiz-settings`;
|
|
551
|
+
return {
|
|
552
|
+
path: urlPath,
|
|
553
|
+
method: 'GET',
|
|
554
|
+
headers: headerParameters,
|
|
555
|
+
query: queryParameters,
|
|
556
|
+
};
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Returns the attempt limit, time limit, and passing score that are copied into each new quiz. A portal that has never saved its own values gets the built-in defaults (5 attempts, 60 minutes, 70%).
|
|
561
|
+
* Get the selected portal\'s defaults for new quizzes
|
|
562
|
+
*/
|
|
563
|
+
getQuizSettingsRaw(initOverrides) {
|
|
564
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
565
|
+
const requestOptions = yield this.getQuizSettingsRequestOpts();
|
|
566
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
567
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetQuizSettingsFromJSON(jsonValue));
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Returns the attempt limit, time limit, and passing score that are copied into each new quiz. A portal that has never saved its own values gets the built-in defaults (5 attempts, 60 minutes, 70%).
|
|
572
|
+
* Get the selected portal\'s defaults for new quizzes
|
|
573
|
+
*/
|
|
574
|
+
getQuizSettings(initOverrides) {
|
|
575
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
576
|
+
const response = yield this.getQuizSettingsRaw(initOverrides);
|
|
577
|
+
return yield response.value();
|
|
578
|
+
});
|
|
579
|
+
}
|
|
540
580
|
/**
|
|
541
581
|
* Creates request options for postCourseLibraryQuizSession without sending the request
|
|
542
582
|
*/
|
|
@@ -761,6 +801,92 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
761
801
|
return yield response.value();
|
|
762
802
|
});
|
|
763
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* Creates request options for postLibraryQuizSessionAnswerCheck without sending the request
|
|
806
|
+
*/
|
|
807
|
+
postLibraryQuizSessionAnswerCheckRequestOpts(requestParameters) {
|
|
808
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
809
|
+
if (requestParameters['sessionId'] == null) {
|
|
810
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postLibraryQuizSessionAnswerCheck().');
|
|
811
|
+
}
|
|
812
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
813
|
+
throw new runtime.RequiredError('sessionQuestionId', 'Required parameter "sessionQuestionId" was null or undefined when calling postLibraryQuizSessionAnswerCheck().');
|
|
814
|
+
}
|
|
815
|
+
const queryParameters = {};
|
|
816
|
+
const headerParameters = {};
|
|
817
|
+
let urlPath = `/quiz/sessions/{sessionId}/answers/{sessionQuestionId}/check`;
|
|
818
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
819
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
820
|
+
return {
|
|
821
|
+
path: urlPath,
|
|
822
|
+
method: 'POST',
|
|
823
|
+
headers: headerParameters,
|
|
824
|
+
query: queryParameters,
|
|
825
|
+
};
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
830
|
+
* Check a saved answer for immediate feedback
|
|
831
|
+
*/
|
|
832
|
+
postLibraryQuizSessionAnswerCheckRaw(requestParameters, initOverrides) {
|
|
833
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
834
|
+
const requestOptions = yield this.postLibraryQuizSessionAnswerCheckRequestOpts(requestParameters);
|
|
835
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
836
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
841
|
+
* Check a saved answer for immediate feedback
|
|
842
|
+
*/
|
|
843
|
+
postLibraryQuizSessionAnswerCheck(requestParameters, initOverrides) {
|
|
844
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
845
|
+
const response = yield this.postLibraryQuizSessionAnswerCheckRaw(requestParameters, initOverrides);
|
|
846
|
+
return yield response.value();
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Creates request options for postLibraryQuizSessionStart without sending the request
|
|
851
|
+
*/
|
|
852
|
+
postLibraryQuizSessionStartRequestOpts(requestParameters) {
|
|
853
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
854
|
+
if (requestParameters['sessionId'] == null) {
|
|
855
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling postLibraryQuizSessionStart().');
|
|
856
|
+
}
|
|
857
|
+
const queryParameters = {};
|
|
858
|
+
const headerParameters = {};
|
|
859
|
+
let urlPath = `/quiz/sessions/{sessionId}/start`;
|
|
860
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
861
|
+
return {
|
|
862
|
+
path: urlPath,
|
|
863
|
+
method: 'POST',
|
|
864
|
+
headers: headerParameters,
|
|
865
|
+
query: queryParameters,
|
|
866
|
+
};
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
871
|
+
* Begin a quiz attempt from its introduction page
|
|
872
|
+
*/
|
|
873
|
+
postLibraryQuizSessionStartRaw(requestParameters, initOverrides) {
|
|
874
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
875
|
+
const requestOptions = yield this.postLibraryQuizSessionStartRequestOpts(requestParameters);
|
|
876
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
877
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
882
|
+
* Begin a quiz attempt from its introduction page
|
|
883
|
+
*/
|
|
884
|
+
postLibraryQuizSessionStart(requestParameters, initOverrides) {
|
|
885
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
886
|
+
const response = yield this.postLibraryQuizSessionStartRaw(requestParameters, initOverrides);
|
|
887
|
+
return yield response.value();
|
|
888
|
+
});
|
|
889
|
+
}
|
|
764
890
|
/**
|
|
765
891
|
* Creates request options for postLibraryQuizSessionSubmit without sending the request
|
|
766
892
|
*/
|
|
@@ -1207,6 +1333,54 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
1207
1333
|
return yield response.value();
|
|
1208
1334
|
});
|
|
1209
1335
|
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Creates request options for putLibraryQuizSessionQuestionFlag without sending the request
|
|
1338
|
+
*/
|
|
1339
|
+
putLibraryQuizSessionQuestionFlagRequestOpts(requestParameters) {
|
|
1340
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1341
|
+
if (requestParameters['sessionId'] == null) {
|
|
1342
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling putLibraryQuizSessionQuestionFlag().');
|
|
1343
|
+
}
|
|
1344
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
1345
|
+
throw new runtime.RequiredError('sessionQuestionId', 'Required parameter "sessionQuestionId" was null or undefined when calling putLibraryQuizSessionQuestionFlag().');
|
|
1346
|
+
}
|
|
1347
|
+
if (requestParameters['putLibraryQuizSessionQuestionFlag'] == null) {
|
|
1348
|
+
throw new runtime.RequiredError('putLibraryQuizSessionQuestionFlag', 'Required parameter "putLibraryQuizSessionQuestionFlag" was null or undefined when calling putLibraryQuizSessionQuestionFlag().');
|
|
1349
|
+
}
|
|
1350
|
+
const queryParameters = {};
|
|
1351
|
+
const headerParameters = {};
|
|
1352
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1353
|
+
let urlPath = `/quiz/sessions/{sessionId}/questions/{sessionQuestionId}/flag`;
|
|
1354
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1355
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
1356
|
+
return {
|
|
1357
|
+
path: urlPath,
|
|
1358
|
+
method: 'PUT',
|
|
1359
|
+
headers: headerParameters,
|
|
1360
|
+
query: queryParameters,
|
|
1361
|
+
body: PutLibraryQuizSessionQuestionFlagToJSON(requestParameters['putLibraryQuizSessionQuestionFlag']),
|
|
1362
|
+
};
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Flag or unflag a question to review before submitting
|
|
1367
|
+
*/
|
|
1368
|
+
putLibraryQuizSessionQuestionFlagRaw(requestParameters, initOverrides) {
|
|
1369
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1370
|
+
const requestOptions = yield this.putLibraryQuizSessionQuestionFlagRequestOpts(requestParameters);
|
|
1371
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1372
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Flag or unflag a question to review before submitting
|
|
1377
|
+
*/
|
|
1378
|
+
putLibraryQuizSessionQuestionFlag(requestParameters, initOverrides) {
|
|
1379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1380
|
+
const response = yield this.putLibraryQuizSessionQuestionFlagRaw(requestParameters, initOverrides);
|
|
1381
|
+
return yield response.value();
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1210
1384
|
/**
|
|
1211
1385
|
* Creates request options for putLibraryQuizVersion without sending the request
|
|
1212
1386
|
*/
|
|
@@ -1255,4 +1429,46 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
1255
1429
|
return yield response.value();
|
|
1256
1430
|
});
|
|
1257
1431
|
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Creates request options for putQuizSettings without sending the request
|
|
1434
|
+
*/
|
|
1435
|
+
putQuizSettingsRequestOpts(requestParameters) {
|
|
1436
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1437
|
+
if (requestParameters['putQuizSettings'] == null) {
|
|
1438
|
+
throw new runtime.RequiredError('putQuizSettings', 'Required parameter "putQuizSettings" was null or undefined when calling putQuizSettings().');
|
|
1439
|
+
}
|
|
1440
|
+
const queryParameters = {};
|
|
1441
|
+
const headerParameters = {};
|
|
1442
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1443
|
+
let urlPath = `/content-library/quiz-settings`;
|
|
1444
|
+
return {
|
|
1445
|
+
path: urlPath,
|
|
1446
|
+
method: 'PUT',
|
|
1447
|
+
headers: headerParameters,
|
|
1448
|
+
query: queryParameters,
|
|
1449
|
+
body: PutQuizSettingsToJSON(requestParameters['putQuizSettings']),
|
|
1450
|
+
};
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Existing quizzes keep their own settings; only quizzes created afterwards start from the new defaults.
|
|
1455
|
+
* Update the selected portal\'s defaults for new quizzes
|
|
1456
|
+
*/
|
|
1457
|
+
putQuizSettingsRaw(requestParameters, initOverrides) {
|
|
1458
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1459
|
+
const requestOptions = yield this.putQuizSettingsRequestOpts(requestParameters);
|
|
1460
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1461
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetQuizSettingsFromJSON(jsonValue));
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* Existing quizzes keep their own settings; only quizzes created afterwards start from the new defaults.
|
|
1466
|
+
* Update the selected portal\'s defaults for new quizzes
|
|
1467
|
+
*/
|
|
1468
|
+
putQuizSettings(requestParameters, initOverrides) {
|
|
1469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1470
|
+
const response = yield this.putQuizSettingsRaw(requestParameters, initOverrides);
|
|
1471
|
+
return yield response.value();
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1258
1474
|
}
|