@easyedu/js-lsm-api 1.138.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetQuizSettings
|
|
16
|
+
*/
|
|
17
|
+
export interface GetQuizSettings {
|
|
18
|
+
/**
|
|
19
|
+
* Attempt limit copied into each new quiz. Zero means unlimited.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof GetQuizSettings
|
|
22
|
+
*/
|
|
23
|
+
defaultMaxAttempts: number;
|
|
24
|
+
/**
|
|
25
|
+
* Time limit copied into each new quiz. Null means no time limit.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof GetQuizSettings
|
|
28
|
+
*/
|
|
29
|
+
defaultTimeLimitMinutes: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* Passing score copied into each new quiz.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GetQuizSettings
|
|
34
|
+
*/
|
|
35
|
+
defaultPassingScore: number;
|
|
36
|
+
/**
|
|
37
|
+
* False while the portal still uses the built-in defaults.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof GetQuizSettings
|
|
40
|
+
*/
|
|
41
|
+
isCustomized: boolean;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GetQuizSettings
|
|
46
|
+
*/
|
|
47
|
+
updatedAt?: number | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the GetQuizSettings interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfGetQuizSettings(value: object): value is GetQuizSettings;
|
|
53
|
+
export declare function GetQuizSettingsFromJSON(json: any): GetQuizSettings;
|
|
54
|
+
export declare function GetQuizSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizSettings;
|
|
55
|
+
export declare function GetQuizSettingsToJSON(json: any): GetQuizSettings;
|
|
56
|
+
export declare function GetQuizSettingsToJSONTyped(value?: GetQuizSettings | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
* Check if a given object implements the GetQuizSettings interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfGetQuizSettings(value) {
|
|
18
|
+
if (!('defaultMaxAttempts' in value) || value['defaultMaxAttempts'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('defaultTimeLimitMinutes' in value) || value['defaultTimeLimitMinutes'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('defaultPassingScore' in value) || value['defaultPassingScore'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('isCustomized' in value) || value['isCustomized'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function GetQuizSettingsFromJSON(json) {
|
|
29
|
+
return GetQuizSettingsFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function GetQuizSettingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'defaultMaxAttempts': json['default_max_attempts'],
|
|
37
|
+
'defaultTimeLimitMinutes': json['default_time_limit_minutes'],
|
|
38
|
+
'defaultPassingScore': json['default_passing_score'],
|
|
39
|
+
'isCustomized': json['is_customized'],
|
|
40
|
+
'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function GetQuizSettingsToJSON(json) {
|
|
44
|
+
return GetQuizSettingsToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function GetQuizSettingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'default_max_attempts': value['defaultMaxAttempts'],
|
|
52
|
+
'default_time_limit_minutes': value['defaultTimeLimitMinutes'],
|
|
53
|
+
'default_passing_score': value['defaultPassingScore'],
|
|
54
|
+
'is_customized': value['isCustomized'],
|
|
55
|
+
'updated_at': value['updatedAt'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -70,13 +70,13 @@ export interface HostedScormOutlineEntry {
|
|
|
70
70
|
*/
|
|
71
71
|
locked: boolean;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Quiz items only. Number of attempts the learner has started; null for sections and resources.
|
|
74
74
|
* @type {number}
|
|
75
75
|
* @memberof HostedScormOutlineEntry
|
|
76
76
|
*/
|
|
77
77
|
attemptNumber: number | null;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Attempts the learner may take. For quizzes this includes any extra attempts granted to the learner, and zero means unlimited; null for sections.
|
|
80
80
|
* @type {number}
|
|
81
81
|
* @memberof HostedScormOutlineEntry
|
|
82
82
|
*/
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { RichTextDocument } from './RichTextDocument';
|
|
13
|
+
/**
|
|
14
|
+
* 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`.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface LibraryQuizQuestionFeedback
|
|
17
|
+
*/
|
|
18
|
+
export interface LibraryQuizQuestionFeedback {
|
|
19
|
+
/**
|
|
20
|
+
* Null while the answer is waiting for manual grading.
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
23
|
+
*/
|
|
24
|
+
isCorrect?: boolean | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
29
|
+
*/
|
|
30
|
+
pointsEarned: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {LibraryQuizQuestionFeedbackGradingStatusEnum}
|
|
34
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
35
|
+
*/
|
|
36
|
+
gradingStatus: LibraryQuizQuestionFeedbackGradingStatusEnum;
|
|
37
|
+
/**
|
|
38
|
+
* Correct answer-choice IDs. Present only when correct answers are shown.
|
|
39
|
+
* @type {Array<string>}
|
|
40
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
41
|
+
*/
|
|
42
|
+
correctChoiceIds?: Array<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Correct text answer. Present only when correct answers are shown.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
47
|
+
*/
|
|
48
|
+
correctAnswer?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
53
|
+
*/
|
|
54
|
+
explanation?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {RichTextDocument}
|
|
58
|
+
* @memberof LibraryQuizQuestionFeedback
|
|
59
|
+
*/
|
|
60
|
+
explanationRich?: RichTextDocument | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const LibraryQuizQuestionFeedbackGradingStatusEnum: {
|
|
66
|
+
readonly AutoGraded: "auto_graded";
|
|
67
|
+
readonly PendingReview: "pending_review";
|
|
68
|
+
readonly Graded: "graded";
|
|
69
|
+
};
|
|
70
|
+
export type LibraryQuizQuestionFeedbackGradingStatusEnum = typeof LibraryQuizQuestionFeedbackGradingStatusEnum[keyof typeof LibraryQuizQuestionFeedbackGradingStatusEnum];
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the LibraryQuizQuestionFeedback interface.
|
|
73
|
+
*/
|
|
74
|
+
export declare function instanceOfLibraryQuizQuestionFeedback(value: object): value is LibraryQuizQuestionFeedback;
|
|
75
|
+
export declare function LibraryQuizQuestionFeedbackFromJSON(json: any): LibraryQuizQuestionFeedback;
|
|
76
|
+
export declare function LibraryQuizQuestionFeedbackFromJSONTyped(json: any, ignoreDiscriminator: boolean): LibraryQuizQuestionFeedback;
|
|
77
|
+
export declare function LibraryQuizQuestionFeedbackToJSON(json: any): LibraryQuizQuestionFeedback;
|
|
78
|
+
export declare function LibraryQuizQuestionFeedbackToJSONTyped(value?: LibraryQuizQuestionFeedback | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
import { RichTextDocumentFromJSON, RichTextDocumentToJSON, } from './RichTextDocument';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const LibraryQuizQuestionFeedbackGradingStatusEnum = {
|
|
19
|
+
AutoGraded: 'auto_graded',
|
|
20
|
+
PendingReview: 'pending_review',
|
|
21
|
+
Graded: 'graded'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the LibraryQuizQuestionFeedback interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfLibraryQuizQuestionFeedback(value) {
|
|
27
|
+
if (!('pointsEarned' in value) || value['pointsEarned'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('gradingStatus' in value) || value['gradingStatus'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
export function LibraryQuizQuestionFeedbackFromJSON(json) {
|
|
34
|
+
return LibraryQuizQuestionFeedbackFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function LibraryQuizQuestionFeedbackFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'isCorrect': json['is_correct'] == null ? undefined : json['is_correct'],
|
|
42
|
+
'pointsEarned': json['points_earned'],
|
|
43
|
+
'gradingStatus': json['grading_status'],
|
|
44
|
+
'correctChoiceIds': json['correct_choice_ids'] == null ? undefined : json['correct_choice_ids'],
|
|
45
|
+
'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
|
|
46
|
+
'explanation': json['explanation'] == null ? undefined : json['explanation'],
|
|
47
|
+
'explanationRich': json['explanation_rich'] == null ? undefined : RichTextDocumentFromJSON(json['explanation_rich']),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function LibraryQuizQuestionFeedbackToJSON(json) {
|
|
51
|
+
return LibraryQuizQuestionFeedbackToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
export function LibraryQuizQuestionFeedbackToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'is_correct': value['isCorrect'],
|
|
59
|
+
'points_earned': value['pointsEarned'],
|
|
60
|
+
'grading_status': value['gradingStatus'],
|
|
61
|
+
'correct_choice_ids': value['correctChoiceIds'],
|
|
62
|
+
'correct_answer': value['correctAnswer'],
|
|
63
|
+
'explanation': value['explanation'],
|
|
64
|
+
'explanation_rich': RichTextDocumentToJSON(value['explanationRich']),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -40,6 +40,12 @@ export interface LibraryQuizSessionAnswerChoice {
|
|
|
40
40
|
* @memberof LibraryQuizSessionAnswerChoice
|
|
41
41
|
*/
|
|
42
42
|
displayOrder: number;
|
|
43
|
+
/**
|
|
44
|
+
* This answer keeps its authored position when answers are randomized.
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
* @memberof LibraryQuizSessionAnswerChoice
|
|
47
|
+
*/
|
|
48
|
+
lockPosition?: boolean;
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* Check if a given object implements the LibraryQuizSessionAnswerChoice interface.
|
|
@@ -36,6 +36,7 @@ export function LibraryQuizSessionAnswerChoiceFromJSONTyped(json, ignoreDiscrimi
|
|
|
36
36
|
'text': json['text'],
|
|
37
37
|
'textRich': json['text_rich'] == null ? undefined : RichTextDocumentFromJSON(json['text_rich']),
|
|
38
38
|
'displayOrder': json['display_order'],
|
|
39
|
+
'lockPosition': json['lock_position'] == null ? undefined : json['lock_position'],
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
export function LibraryQuizSessionAnswerChoiceToJSON(json) {
|
|
@@ -50,5 +51,6 @@ export function LibraryQuizSessionAnswerChoiceToJSONTyped(value, ignoreDiscrimin
|
|
|
50
51
|
'text': value['text'],
|
|
51
52
|
'text_rich': RichTextDocumentToJSON(value['textRich']),
|
|
52
53
|
'display_order': value['displayOrder'],
|
|
54
|
+
'lock_position': value['lockPosition'],
|
|
53
55
|
};
|
|
54
56
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { LibraryQuizQuestionFeedback } from './LibraryQuizQuestionFeedback';
|
|
12
13
|
import type { RichTextDocument } from './RichTextDocument';
|
|
13
14
|
import type { LibraryQuizSessionAnswerChoice } from './LibraryQuizSessionAnswerChoice';
|
|
14
15
|
/**
|
|
@@ -65,6 +66,24 @@ export interface LibraryQuizSessionQuestion {
|
|
|
65
66
|
* @memberof LibraryQuizSessionQuestion
|
|
66
67
|
*/
|
|
67
68
|
isAnswered: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The learner flagged this question to come back to before submitting.
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
* @memberof LibraryQuizSessionQuestion
|
|
73
|
+
*/
|
|
74
|
+
isFlagged: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The learner checked this answer for immediate feedback. A checked answer can no longer be changed.
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
* @memberof LibraryQuizSessionQuestion
|
|
79
|
+
*/
|
|
80
|
+
isChecked: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Present once the answer has been checked for immediate feedback.
|
|
83
|
+
* @type {LibraryQuizQuestionFeedback}
|
|
84
|
+
* @memberof LibraryQuizSessionQuestion
|
|
85
|
+
*/
|
|
86
|
+
feedback?: LibraryQuizQuestionFeedback | null;
|
|
68
87
|
/**
|
|
69
88
|
*
|
|
70
89
|
* @type {{ [key: string]: any; }}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { LibraryQuizQuestionFeedbackFromJSON, LibraryQuizQuestionFeedbackToJSON, } from './LibraryQuizQuestionFeedback';
|
|
14
15
|
import { RichTextDocumentFromJSON, RichTextDocumentToJSON, } from './RichTextDocument';
|
|
15
16
|
import { LibraryQuizSessionAnswerChoiceFromJSON, LibraryQuizSessionAnswerChoiceToJSON, } from './LibraryQuizSessionAnswerChoice';
|
|
16
17
|
/**
|
|
@@ -42,6 +43,10 @@ export function instanceOfLibraryQuizSessionQuestion(value) {
|
|
|
42
43
|
return false;
|
|
43
44
|
if (!('isAnswered' in value) || value['isAnswered'] === undefined)
|
|
44
45
|
return false;
|
|
46
|
+
if (!('isFlagged' in value) || value['isFlagged'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('isChecked' in value) || value['isChecked'] === undefined)
|
|
49
|
+
return false;
|
|
45
50
|
return true;
|
|
46
51
|
}
|
|
47
52
|
export function LibraryQuizSessionQuestionFromJSON(json) {
|
|
@@ -60,6 +65,9 @@ export function LibraryQuizSessionQuestionFromJSONTyped(json, ignoreDiscriminato
|
|
|
60
65
|
'questionTextRich': json['question_text_rich'] == null ? undefined : RichTextDocumentFromJSON(json['question_text_rich']),
|
|
61
66
|
'answerChoices': (json['answer_choices'].map(LibraryQuizSessionAnswerChoiceFromJSON)),
|
|
62
67
|
'isAnswered': json['is_answered'],
|
|
68
|
+
'isFlagged': json['is_flagged'],
|
|
69
|
+
'isChecked': json['is_checked'],
|
|
70
|
+
'feedback': json['feedback'] == null ? undefined : LibraryQuizQuestionFeedbackFromJSON(json['feedback']),
|
|
63
71
|
'answer': json['answer'] == null ? undefined : json['answer'],
|
|
64
72
|
};
|
|
65
73
|
}
|
|
@@ -79,6 +87,9 @@ export function LibraryQuizSessionQuestionToJSONTyped(value, ignoreDiscriminator
|
|
|
79
87
|
'question_text_rich': RichTextDocumentToJSON(value['questionTextRich']),
|
|
80
88
|
'answer_choices': (value['answerChoices'].map(LibraryQuizSessionAnswerChoiceToJSON)),
|
|
81
89
|
'is_answered': value['isAnswered'],
|
|
90
|
+
'is_flagged': value['isFlagged'],
|
|
91
|
+
'is_checked': value['isChecked'],
|
|
92
|
+
'feedback': LibraryQuizQuestionFeedbackToJSON(value['feedback']),
|
|
82
93
|
'answer': value['answer'],
|
|
83
94
|
};
|
|
84
95
|
}
|
|
@@ -65,7 +65,7 @@ export interface PostCourseVersionItem {
|
|
|
65
65
|
*/
|
|
66
66
|
launchMode?: ContentLaunchMode;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Omit to inherit the quiz's attempt limit (resources default to 1). Zero means unlimited and is allowed for quiz placements only.
|
|
69
69
|
* @type {number}
|
|
70
70
|
* @memberof PostCourseVersionItem
|
|
71
71
|
*/
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { QuestionSelectionMethod } from './QuestionSelectionMethod';
|
|
13
|
+
import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -41,13 +42,13 @@ export interface PostLibraryQuiz {
|
|
|
41
42
|
*/
|
|
42
43
|
maxQuestions?: number | null;
|
|
43
44
|
/**
|
|
44
|
-
*
|
|
45
|
+
* Omit to use the portal's default passing score.
|
|
45
46
|
* @type {number}
|
|
46
47
|
* @memberof PostLibraryQuiz
|
|
47
48
|
*/
|
|
48
49
|
passingScore?: number;
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
+
* Omit to use the portal's default time limit. Send null for no time limit.
|
|
51
52
|
* @type {number}
|
|
52
53
|
* @memberof PostLibraryQuiz
|
|
53
54
|
*/
|
|
@@ -88,6 +89,24 @@ export interface PostLibraryQuiz {
|
|
|
88
89
|
* @memberof PostLibraryQuiz
|
|
89
90
|
*/
|
|
90
91
|
requireAllQuestions?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Default number of attempts for this quiz. Zero means unlimited. Omit to use the portal's default. The value is copied to a course placement when the quiz is added to a course, where it can be overridden.
|
|
94
|
+
* @type {number}
|
|
95
|
+
* @memberof PostLibraryQuiz
|
|
96
|
+
*/
|
|
97
|
+
maxAttempts?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Show each question's explanation alongside the learner's feedback.
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof PostLibraryQuiz
|
|
102
|
+
*/
|
|
103
|
+
showExplanations?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {QuizFeedbackTiming}
|
|
107
|
+
* @memberof PostLibraryQuiz
|
|
108
|
+
*/
|
|
109
|
+
feedbackTiming?: QuizFeedbackTiming;
|
|
91
110
|
/**
|
|
92
111
|
*
|
|
93
112
|
* @type {{ [key: string]: any; }}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { QuestionSelectionMethodFromJSON, QuestionSelectionMethodToJSON, } from './QuestionSelectionMethod';
|
|
15
|
+
import { QuizFeedbackTimingFromJSON, QuizFeedbackTimingToJSON, } from './QuizFeedbackTiming';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the PostLibraryQuiz interface.
|
|
17
18
|
*/
|
|
@@ -42,6 +43,9 @@ export function PostLibraryQuizFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
43
|
'showCorrectAnswers': json['show_correct_answers'] == null ? undefined : json['show_correct_answers'],
|
|
43
44
|
'allowReview': json['allow_review'] == null ? undefined : json['allow_review'],
|
|
44
45
|
'requireAllQuestions': json['require_all_questions'] == null ? undefined : json['require_all_questions'],
|
|
46
|
+
'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
|
|
47
|
+
'showExplanations': json['show_explanations'] == null ? undefined : json['show_explanations'],
|
|
48
|
+
'feedbackTiming': json['feedback_timing'] == null ? undefined : QuizFeedbackTimingFromJSON(json['feedback_timing']),
|
|
45
49
|
'settings': json['settings'] == null ? undefined : json['settings'],
|
|
46
50
|
'tags': json['tags'] == null ? undefined : new Set(json['tags']),
|
|
47
51
|
};
|
|
@@ -66,6 +70,9 @@ export function PostLibraryQuizToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
70
|
'show_correct_answers': value['showCorrectAnswers'],
|
|
67
71
|
'allow_review': value['allowReview'],
|
|
68
72
|
'require_all_questions': value['requireAllQuestions'],
|
|
73
|
+
'max_attempts': value['maxAttempts'],
|
|
74
|
+
'show_explanations': value['showExplanations'],
|
|
75
|
+
'feedback_timing': QuizFeedbackTimingToJSON(value['feedbackTiming']),
|
|
69
76
|
'settings': value['settings'],
|
|
70
77
|
'tags': value['tags'] == null ? undefined : Array.from(value['tags']),
|
|
71
78
|
};
|
|
@@ -28,6 +28,12 @@ export interface PostQuestionAnswerChoicesInner {
|
|
|
28
28
|
* @memberof PostQuestionAnswerChoicesInner
|
|
29
29
|
*/
|
|
30
30
|
isCorrect: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Keep this answer in its authored position when a quiz randomizes answers.
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof PostQuestionAnswerChoicesInner
|
|
35
|
+
*/
|
|
36
|
+
lockPosition?: boolean;
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Check if a given object implements the PostQuestionAnswerChoicesInner interface.
|
|
@@ -32,6 +32,7 @@ export function PostQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscrimi
|
|
|
32
32
|
return {
|
|
33
33
|
'text': RichTextInputFromJSON(json['text']),
|
|
34
34
|
'isCorrect': json['is_correct'],
|
|
35
|
+
'lockPosition': json['lock_position'] == null ? undefined : json['lock_position'],
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export function PostQuestionAnswerChoicesInnerToJSON(json) {
|
|
@@ -44,5 +45,6 @@ export function PostQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscrimin
|
|
|
44
45
|
return {
|
|
45
46
|
'text': RichTextInputToJSON(value['text']),
|
|
46
47
|
'is_correct': value['isCorrect'],
|
|
48
|
+
'lock_position': value['lockPosition'],
|
|
47
49
|
};
|
|
48
50
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PutLibraryQuizSessionQuestionFlag
|
|
16
|
+
*/
|
|
17
|
+
export interface PutLibraryQuizSessionQuestionFlag {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof PutLibraryQuizSessionQuestionFlag
|
|
22
|
+
*/
|
|
23
|
+
flagged: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the PutLibraryQuizSessionQuestionFlag interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfPutLibraryQuizSessionQuestionFlag(value: object): value is PutLibraryQuizSessionQuestionFlag;
|
|
29
|
+
export declare function PutLibraryQuizSessionQuestionFlagFromJSON(json: any): PutLibraryQuizSessionQuestionFlag;
|
|
30
|
+
export declare function PutLibraryQuizSessionQuestionFlagFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutLibraryQuizSessionQuestionFlag;
|
|
31
|
+
export declare function PutLibraryQuizSessionQuestionFlagToJSON(json: any): PutLibraryQuizSessionQuestionFlag;
|
|
32
|
+
export declare function PutLibraryQuizSessionQuestionFlagToJSONTyped(value?: PutLibraryQuizSessionQuestionFlag | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* Check if a given object implements the PutLibraryQuizSessionQuestionFlag interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfPutLibraryQuizSessionQuestionFlag(value) {
|
|
18
|
+
if (!('flagged' in value) || value['flagged'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function PutLibraryQuizSessionQuestionFlagFromJSON(json) {
|
|
23
|
+
return PutLibraryQuizSessionQuestionFlagFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function PutLibraryQuizSessionQuestionFlagFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'flagged': json['flagged'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function PutLibraryQuizSessionQuestionFlagToJSON(json) {
|
|
34
|
+
return PutLibraryQuizSessionQuestionFlagToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function PutLibraryQuizSessionQuestionFlagToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'flagged': value['flagged'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { QuestionSelectionMethod } from './QuestionSelectionMethod';
|
|
13
|
+
import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -82,6 +83,24 @@ export interface PutLibraryQuizVersion {
|
|
|
82
83
|
* @memberof PutLibraryQuizVersion
|
|
83
84
|
*/
|
|
84
85
|
requireAllQuestions?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* 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.
|
|
88
|
+
* @type {number}
|
|
89
|
+
* @memberof PutLibraryQuizVersion
|
|
90
|
+
*/
|
|
91
|
+
maxAttempts?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Show each question's explanation alongside the learner's feedback.
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
* @memberof PutLibraryQuizVersion
|
|
96
|
+
*/
|
|
97
|
+
showExplanations?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {QuizFeedbackTiming}
|
|
101
|
+
* @memberof PutLibraryQuizVersion
|
|
102
|
+
*/
|
|
103
|
+
feedbackTiming?: QuizFeedbackTiming;
|
|
85
104
|
/**
|
|
86
105
|
*
|
|
87
106
|
* @type {{ [key: string]: any; }}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { QuestionSelectionMethodFromJSON, QuestionSelectionMethodToJSON, } from './QuestionSelectionMethod';
|
|
15
|
+
import { QuizFeedbackTimingFromJSON, QuizFeedbackTimingToJSON, } from './QuizFeedbackTiming';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the PutLibraryQuizVersion interface.
|
|
17
18
|
*/
|
|
@@ -37,6 +38,9 @@ export function PutLibraryQuizVersionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
38
|
'showCorrectAnswers': json['show_correct_answers'] == null ? undefined : json['show_correct_answers'],
|
|
38
39
|
'allowReview': json['allow_review'] == null ? undefined : json['allow_review'],
|
|
39
40
|
'requireAllQuestions': json['require_all_questions'] == null ? undefined : json['require_all_questions'],
|
|
41
|
+
'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
|
|
42
|
+
'showExplanations': json['show_explanations'] == null ? undefined : json['show_explanations'],
|
|
43
|
+
'feedbackTiming': json['feedback_timing'] == null ? undefined : QuizFeedbackTimingFromJSON(json['feedback_timing']),
|
|
40
44
|
'settings': json['settings'] == null ? undefined : json['settings'],
|
|
41
45
|
};
|
|
42
46
|
}
|
|
@@ -59,6 +63,9 @@ export function PutLibraryQuizVersionToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
59
63
|
'show_correct_answers': value['showCorrectAnswers'],
|
|
60
64
|
'allow_review': value['allowReview'],
|
|
61
65
|
'require_all_questions': value['requireAllQuestions'],
|
|
66
|
+
'max_attempts': value['maxAttempts'],
|
|
67
|
+
'show_explanations': value['showExplanations'],
|
|
68
|
+
'feedback_timing': QuizFeedbackTimingToJSON(value['feedbackTiming']),
|
|
62
69
|
'settings': value['settings'],
|
|
63
70
|
};
|
|
64
71
|
}
|
|
@@ -34,6 +34,12 @@ export interface PutQuestionAnswerChoicesInner {
|
|
|
34
34
|
* @memberof PutQuestionAnswerChoicesInner
|
|
35
35
|
*/
|
|
36
36
|
isCorrect: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Keep this answer in its authored position when a quiz randomizes answers.
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof PutQuestionAnswerChoicesInner
|
|
41
|
+
*/
|
|
42
|
+
lockPosition?: boolean;
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
39
45
|
* Check if a given object implements the PutQuestionAnswerChoicesInner interface.
|