@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.
Files changed (128) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +15 -2
  3. package/dist/apis/ContentLibraryQuizApi.d.ts +86 -0
  4. package/dist/apis/ContentLibraryQuizApi.js +216 -0
  5. package/dist/apis/DispatchApi.d.ts +53 -0
  6. package/dist/apis/DispatchApi.js +135 -0
  7. package/dist/esm/apis/ContentLibraryQuizApi.d.ts +86 -0
  8. package/dist/esm/apis/ContentLibraryQuizApi.js +216 -0
  9. package/dist/esm/apis/DispatchApi.d.ts +53 -0
  10. package/dist/esm/apis/DispatchApi.js +135 -0
  11. package/dist/esm/models/GetAttemptAllowance.d.ts +9 -3
  12. package/dist/esm/models/GetAttemptAllowance.js +4 -0
  13. package/dist/esm/models/GetCourseVersionItem.d.ts +1 -1
  14. package/dist/esm/models/GetLibraryQuizResult.d.ts +30 -0
  15. package/dist/esm/models/GetLibraryQuizResult.js +20 -0
  16. package/dist/esm/models/GetLibraryQuizSession.d.ts +43 -0
  17. package/dist/esm/models/GetLibraryQuizSession.js +27 -0
  18. package/dist/esm/models/GetLibraryQuizVersion.d.ts +19 -0
  19. package/dist/esm/models/GetLibraryQuizVersion.js +13 -0
  20. package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
  21. package/dist/esm/models/GetQuestionAnswerChoicesInner.js +4 -0
  22. package/dist/esm/models/GetQuizSettings.d.ts +56 -0
  23. package/dist/esm/models/GetQuizSettings.js +57 -0
  24. package/dist/esm/models/HostedScormOutlineEntry.d.ts +2 -2
  25. package/dist/esm/models/LibraryQuizQuestionFeedback.d.ts +78 -0
  26. package/dist/esm/models/LibraryQuizQuestionFeedback.js +66 -0
  27. package/dist/esm/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
  28. package/dist/esm/models/LibraryQuizSessionAnswerChoice.js +2 -0
  29. package/dist/esm/models/LibraryQuizSessionQuestion.d.ts +19 -0
  30. package/dist/esm/models/LibraryQuizSessionQuestion.js +11 -0
  31. package/dist/esm/models/PostCourseVersionItem.d.ts +1 -1
  32. package/dist/esm/models/PostLibraryQuiz.d.ts +21 -2
  33. package/dist/esm/models/PostLibraryQuiz.js +7 -0
  34. package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
  35. package/dist/esm/models/PostQuestionAnswerChoicesInner.js +2 -0
  36. package/dist/esm/models/PutCourseVersionItem.d.ts +1 -1
  37. package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
  38. package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.js +43 -0
  39. package/dist/esm/models/PutLibraryQuizVersion.d.ts +19 -0
  40. package/dist/esm/models/PutLibraryQuizVersion.js +7 -0
  41. package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
  42. package/dist/esm/models/PutQuestionAnswerChoicesInner.js +2 -0
  43. package/dist/esm/models/PutQuizSettings.d.ts +44 -0
  44. package/dist/esm/models/PutQuizSettings.js +51 -0
  45. package/dist/esm/models/QuizFeedbackTiming.d.ts +25 -0
  46. package/dist/esm/models/QuizFeedbackTiming.js +43 -0
  47. package/dist/esm/models/index.d.ts +5 -0
  48. package/dist/esm/models/index.js +5 -0
  49. package/dist/models/GetAttemptAllowance.d.ts +9 -3
  50. package/dist/models/GetAttemptAllowance.js +4 -0
  51. package/dist/models/GetCourseVersionItem.d.ts +1 -1
  52. package/dist/models/GetLibraryQuizResult.d.ts +30 -0
  53. package/dist/models/GetLibraryQuizResult.js +20 -0
  54. package/dist/models/GetLibraryQuizSession.d.ts +43 -0
  55. package/dist/models/GetLibraryQuizSession.js +27 -0
  56. package/dist/models/GetLibraryQuizVersion.d.ts +19 -0
  57. package/dist/models/GetLibraryQuizVersion.js +13 -0
  58. package/dist/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
  59. package/dist/models/GetQuestionAnswerChoicesInner.js +4 -0
  60. package/dist/models/GetQuizSettings.d.ts +56 -0
  61. package/dist/models/GetQuizSettings.js +64 -0
  62. package/dist/models/HostedScormOutlineEntry.d.ts +2 -2
  63. package/dist/models/LibraryQuizQuestionFeedback.d.ts +78 -0
  64. package/dist/models/LibraryQuizQuestionFeedback.js +74 -0
  65. package/dist/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
  66. package/dist/models/LibraryQuizSessionAnswerChoice.js +2 -0
  67. package/dist/models/LibraryQuizSessionQuestion.d.ts +19 -0
  68. package/dist/models/LibraryQuizSessionQuestion.js +11 -0
  69. package/dist/models/PostCourseVersionItem.d.ts +1 -1
  70. package/dist/models/PostLibraryQuiz.d.ts +21 -2
  71. package/dist/models/PostLibraryQuiz.js +7 -0
  72. package/dist/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
  73. package/dist/models/PostQuestionAnswerChoicesInner.js +2 -0
  74. package/dist/models/PutCourseVersionItem.d.ts +1 -1
  75. package/dist/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
  76. package/dist/models/PutLibraryQuizSessionQuestionFlag.js +50 -0
  77. package/dist/models/PutLibraryQuizVersion.d.ts +19 -0
  78. package/dist/models/PutLibraryQuizVersion.js +7 -0
  79. package/dist/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
  80. package/dist/models/PutQuestionAnswerChoicesInner.js +2 -0
  81. package/dist/models/PutQuizSettings.d.ts +44 -0
  82. package/dist/models/PutQuizSettings.js +58 -0
  83. package/dist/models/QuizFeedbackTiming.d.ts +25 -0
  84. package/dist/models/QuizFeedbackTiming.js +51 -0
  85. package/dist/models/index.d.ts +5 -0
  86. package/dist/models/index.js +5 -0
  87. package/docs/ContentLibraryQuizApi.md +343 -0
  88. package/docs/DispatchApi.md +214 -0
  89. package/docs/GetAttemptAllowance.md +2 -0
  90. package/docs/GetLibraryQuizResult.md +10 -0
  91. package/docs/GetLibraryQuizSession.md +14 -0
  92. package/docs/GetLibraryQuizVersion.md +6 -0
  93. package/docs/GetQuestionAnswerChoicesInner.md +2 -0
  94. package/docs/GetQuizSettings.md +43 -0
  95. package/docs/LibraryQuizQuestionFeedback.md +47 -0
  96. package/docs/LibraryQuizSessionAnswerChoice.md +2 -0
  97. package/docs/LibraryQuizSessionQuestion.md +6 -0
  98. package/docs/PostLibraryQuiz.md +6 -0
  99. package/docs/PostQuestionAnswerChoicesInner.md +2 -0
  100. package/docs/PutLibraryQuizSessionQuestionFlag.md +34 -0
  101. package/docs/PutLibraryQuizVersion.md +6 -0
  102. package/docs/PutQuestionAnswerChoicesInner.md +2 -0
  103. package/docs/PutQuizSettings.md +38 -0
  104. package/docs/QuizFeedbackTiming.md +33 -0
  105. package/package.json +1 -1
  106. package/src/apis/ContentLibraryQuizApi.ts +287 -0
  107. package/src/apis/DispatchApi.ts +185 -0
  108. package/src/models/GetAttemptAllowance.ts +12 -3
  109. package/src/models/GetCourseVersionItem.ts +1 -1
  110. package/src/models/GetLibraryQuizResult.ts +45 -0
  111. package/src/models/GetLibraryQuizSession.ts +69 -0
  112. package/src/models/GetLibraryQuizVersion.ts +34 -0
  113. package/src/models/GetQuestionAnswerChoicesInner.ts +9 -0
  114. package/src/models/GetQuizSettings.ts +101 -0
  115. package/src/models/HostedScormOutlineEntry.ts +2 -2
  116. package/src/models/LibraryQuizQuestionFeedback.ts +135 -0
  117. package/src/models/LibraryQuizSessionAnswerChoice.ts +8 -0
  118. package/src/models/LibraryQuizSessionQuestion.ts +33 -0
  119. package/src/models/PostCourseVersionItem.ts +1 -1
  120. package/src/models/PostLibraryQuiz.ts +33 -2
  121. package/src/models/PostQuestionAnswerChoicesInner.ts +8 -0
  122. package/src/models/PutCourseVersionItem.ts +1 -1
  123. package/src/models/PutLibraryQuizSessionQuestionFlag.ts +66 -0
  124. package/src/models/PutLibraryQuizVersion.ts +31 -0
  125. package/src/models/PutQuestionAnswerChoicesInner.ts +8 -0
  126. package/src/models/PutQuizSettings.ts +84 -0
  127. package/src/models/QuizFeedbackTiming.ts +53 -0
  128. package/src/models/index.ts +5 -0
@@ -33,6 +33,7 @@ export function PutQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscrimin
33
33
  'id': json['id'] == null ? undefined : json['id'],
34
34
  'text': RichTextInputFromJSON(json['text']),
35
35
  'isCorrect': json['is_correct'],
36
+ 'lockPosition': json['lock_position'] == null ? undefined : json['lock_position'],
36
37
  };
37
38
  }
38
39
  export function PutQuestionAnswerChoicesInnerToJSON(json) {
@@ -46,5 +47,6 @@ export function PutQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscrimina
46
47
  'id': value['id'],
47
48
  'text': RichTextInputToJSON(value['text']),
48
49
  'is_correct': value['isCorrect'],
50
+ 'lock_position': value['lockPosition'],
49
51
  };
50
52
  }
@@ -0,0 +1,44 @@
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 PutQuizSettings
16
+ */
17
+ export interface PutQuizSettings {
18
+ /**
19
+ * Attempt limit copied into each new quiz. Zero means unlimited.
20
+ * @type {number}
21
+ * @memberof PutQuizSettings
22
+ */
23
+ defaultMaxAttempts: number;
24
+ /**
25
+ * Time limit copied into each new quiz. Null means no time limit.
26
+ * @type {number}
27
+ * @memberof PutQuizSettings
28
+ */
29
+ defaultTimeLimitMinutes: number | null;
30
+ /**
31
+ * Passing score copied into each new quiz.
32
+ * @type {number}
33
+ * @memberof PutQuizSettings
34
+ */
35
+ defaultPassingScore: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the PutQuizSettings interface.
39
+ */
40
+ export declare function instanceOfPutQuizSettings(value: object): value is PutQuizSettings;
41
+ export declare function PutQuizSettingsFromJSON(json: any): PutQuizSettings;
42
+ export declare function PutQuizSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutQuizSettings;
43
+ export declare function PutQuizSettingsToJSON(json: any): PutQuizSettings;
44
+ export declare function PutQuizSettingsToJSONTyped(value?: PutQuizSettings | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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 PutQuizSettings interface.
16
+ */
17
+ export function instanceOfPutQuizSettings(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
+ return true;
25
+ }
26
+ export function PutQuizSettingsFromJSON(json) {
27
+ return PutQuizSettingsFromJSONTyped(json, false);
28
+ }
29
+ export function PutQuizSettingsFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'defaultMaxAttempts': json['default_max_attempts'],
35
+ 'defaultTimeLimitMinutes': json['default_time_limit_minutes'],
36
+ 'defaultPassingScore': json['default_passing_score'],
37
+ };
38
+ }
39
+ export function PutQuizSettingsToJSON(json) {
40
+ return PutQuizSettingsToJSONTyped(json, false);
41
+ }
42
+ export function PutQuizSettingsToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'default_max_attempts': value['defaultMaxAttempts'],
48
+ 'default_time_limit_minutes': value['defaultTimeLimitMinutes'],
49
+ 'default_passing_score': value['defaultPassingScore'],
50
+ };
51
+ }
@@ -0,0 +1,25 @@
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
+ * When learners see feedback. `after_submission` shows it once the whole attempt is submitted. `after_each_question` lets the learner check each answer as they go; a checked answer is locked and can no longer be changed.
14
+ * @export
15
+ */
16
+ export declare const QuizFeedbackTiming: {
17
+ readonly AfterSubmission: "after_submission";
18
+ readonly AfterEachQuestion: "after_each_question";
19
+ };
20
+ export type QuizFeedbackTiming = typeof QuizFeedbackTiming[keyof typeof QuizFeedbackTiming];
21
+ export declare function instanceOfQuizFeedbackTiming(value: any): boolean;
22
+ export declare function QuizFeedbackTimingFromJSON(json: any): QuizFeedbackTiming;
23
+ export declare function QuizFeedbackTimingFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuizFeedbackTiming;
24
+ export declare function QuizFeedbackTimingToJSON(value?: QuizFeedbackTiming | null): any;
25
+ export declare function QuizFeedbackTimingToJSONTyped(value: any, ignoreDiscriminator: boolean): QuizFeedbackTiming;
@@ -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
+ * When learners see feedback. `after_submission` shows it once the whole attempt is submitted. `after_each_question` lets the learner check each answer as they go; a checked answer is locked and can no longer be changed.
16
+ * @export
17
+ */
18
+ export const QuizFeedbackTiming = {
19
+ AfterSubmission: 'after_submission',
20
+ AfterEachQuestion: 'after_each_question'
21
+ };
22
+ export function instanceOfQuizFeedbackTiming(value) {
23
+ for (const key in QuizFeedbackTiming) {
24
+ if (Object.prototype.hasOwnProperty.call(QuizFeedbackTiming, key)) {
25
+ if (QuizFeedbackTiming[key] === value) {
26
+ return true;
27
+ }
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ export function QuizFeedbackTimingFromJSON(json) {
33
+ return QuizFeedbackTimingFromJSONTyped(json, false);
34
+ }
35
+ export function QuizFeedbackTimingFromJSONTyped(json, ignoreDiscriminator) {
36
+ return json;
37
+ }
38
+ export function QuizFeedbackTimingToJSON(value) {
39
+ return value;
40
+ }
41
+ export function QuizFeedbackTimingToJSONTyped(value, ignoreDiscriminator) {
42
+ return value;
43
+ }
@@ -135,6 +135,7 @@ export * from './GetQuestionAnswerChoicesInner';
135
135
  export * from './GetQuestionList';
136
136
  export * from './GetQuestionListFilters';
137
137
  export * from './GetQuestionQuizzesInner';
138
+ export * from './GetQuizSettings';
138
139
  export * from './GetReportCatalog';
139
140
  export * from './GetReportQueryResult';
140
141
  export * from './GetResource';
@@ -200,6 +201,7 @@ export * from './LibraryQuizCriteriaPreviewQuestion';
200
201
  export * from './LibraryQuizCriterion';
201
202
  export * from './LibraryQuizCriterionPreview';
202
203
  export * from './LibraryQuizQuestion';
204
+ export * from './LibraryQuizQuestionFeedback';
203
205
  export * from './LibraryQuizQuestionInput';
204
206
  export * from './LibraryQuizSessionAnswerChoice';
205
207
  export * from './LibraryQuizSessionQuestion';
@@ -336,6 +338,7 @@ export * from './PutLibraryQuizQuestions';
336
338
  export * from './PutLibraryQuizSessionAnswer';
337
339
  export * from './PutLibraryQuizSessionGrade';
338
340
  export * from './PutLibraryQuizSessionOverride';
341
+ export * from './PutLibraryQuizSessionQuestionFlag';
339
342
  export * from './PutLibraryQuizVersion';
340
343
  export * from './PutPortalBranding';
341
344
  export * from './PutPortalCertificateTemplate';
@@ -344,6 +347,7 @@ export * from './PutPortalUser';
344
347
  export * from './PutPortalUserFieldValues';
345
348
  export * from './PutQuestion';
346
349
  export * from './PutQuestionAnswerChoicesInner';
350
+ export * from './PutQuizSettings';
347
351
  export * from './PutResource';
348
352
  export * from './PutResourceSessionOverride';
349
353
  export * from './PutResourceVersion';
@@ -360,6 +364,7 @@ export * from './QuestionImportPreviewImage';
360
364
  export * from './QuestionImportSource';
361
365
  export * from './QuestionImportSourceSummary';
362
366
  export * from './QuestionSelectionMethod';
367
+ export * from './QuizFeedbackTiming';
363
368
  export * from './ReportCategory';
364
369
  export * from './ReportColumn';
365
370
  export * from './ReportDefinition';
@@ -137,6 +137,7 @@ export * from './GetQuestionAnswerChoicesInner';
137
137
  export * from './GetQuestionList';
138
138
  export * from './GetQuestionListFilters';
139
139
  export * from './GetQuestionQuizzesInner';
140
+ export * from './GetQuizSettings';
140
141
  export * from './GetReportCatalog';
141
142
  export * from './GetReportQueryResult';
142
143
  export * from './GetResource';
@@ -202,6 +203,7 @@ export * from './LibraryQuizCriteriaPreviewQuestion';
202
203
  export * from './LibraryQuizCriterion';
203
204
  export * from './LibraryQuizCriterionPreview';
204
205
  export * from './LibraryQuizQuestion';
206
+ export * from './LibraryQuizQuestionFeedback';
205
207
  export * from './LibraryQuizQuestionInput';
206
208
  export * from './LibraryQuizSessionAnswerChoice';
207
209
  export * from './LibraryQuizSessionQuestion';
@@ -338,6 +340,7 @@ export * from './PutLibraryQuizQuestions';
338
340
  export * from './PutLibraryQuizSessionAnswer';
339
341
  export * from './PutLibraryQuizSessionGrade';
340
342
  export * from './PutLibraryQuizSessionOverride';
343
+ export * from './PutLibraryQuizSessionQuestionFlag';
341
344
  export * from './PutLibraryQuizVersion';
342
345
  export * from './PutPortalBranding';
343
346
  export * from './PutPortalCertificateTemplate';
@@ -346,6 +349,7 @@ export * from './PutPortalUser';
346
349
  export * from './PutPortalUserFieldValues';
347
350
  export * from './PutQuestion';
348
351
  export * from './PutQuestionAnswerChoicesInner';
352
+ export * from './PutQuizSettings';
349
353
  export * from './PutResource';
350
354
  export * from './PutResourceSessionOverride';
351
355
  export * from './PutResourceVersion';
@@ -362,6 +366,7 @@ export * from './QuestionImportPreviewImage';
362
366
  export * from './QuestionImportSource';
363
367
  export * from './QuestionImportSourceSummary';
364
368
  export * from './QuestionSelectionMethod';
369
+ export * from './QuizFeedbackTiming';
365
370
  export * from './ReportCategory';
366
371
  export * from './ReportColumn';
367
372
  export * from './ReportDefinition';
@@ -40,7 +40,7 @@ export interface GetAttemptAllowance {
40
40
  */
41
41
  userId: string;
42
42
  /**
43
- *
43
+ * The placement's attempt limit. Zero means unlimited.
44
44
  * @type {number}
45
45
  * @memberof GetAttemptAllowance
46
46
  */
@@ -52,7 +52,7 @@ export interface GetAttemptAllowance {
52
52
  */
53
53
  additionalAttempts: number;
54
54
  /**
55
- *
55
+ * The limit including extra attempts. Zero means unlimited.
56
56
  * @type {number}
57
57
  * @memberof GetAttemptAllowance
58
58
  */
@@ -64,11 +64,17 @@ export interface GetAttemptAllowance {
64
64
  */
65
65
  attemptsUsed: number;
66
66
  /**
67
- *
67
+ * Zero when attempts are unlimited; check `unlimited` first.
68
68
  * @type {number}
69
69
  * @memberof GetAttemptAllowance
70
70
  */
71
71
  attemptsRemaining: number;
72
+ /**
73
+ * The placement allows unlimited attempts.
74
+ * @type {boolean}
75
+ * @memberof GetAttemptAllowance
76
+ */
77
+ unlimited: boolean;
72
78
  }
73
79
  /**
74
80
  * Check if a given object implements the GetAttemptAllowance interface.
@@ -40,6 +40,8 @@ function instanceOfGetAttemptAllowance(value) {
40
40
  return false;
41
41
  if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined)
42
42
  return false;
43
+ if (!('unlimited' in value) || value['unlimited'] === undefined)
44
+ return false;
43
45
  return true;
44
46
  }
45
47
  function GetAttemptAllowanceFromJSON(json) {
@@ -59,6 +61,7 @@ function GetAttemptAllowanceFromJSONTyped(json, ignoreDiscriminator) {
59
61
  'effectiveMaxAttempts': json['effective_max_attempts'],
60
62
  'attemptsUsed': json['attempts_used'],
61
63
  'attemptsRemaining': json['attempts_remaining'],
64
+ 'unlimited': json['unlimited'],
62
65
  };
63
66
  }
64
67
  function GetAttemptAllowanceToJSON(json) {
@@ -78,5 +81,6 @@ function GetAttemptAllowanceToJSONTyped(value, ignoreDiscriminator = false) {
78
81
  'effective_max_attempts': value['effectiveMaxAttempts'],
79
82
  'attempts_used': value['attemptsUsed'],
80
83
  'attempts_remaining': value['attemptsRemaining'],
84
+ 'unlimited': value['unlimited'],
81
85
  };
82
86
  }
@@ -101,7 +101,7 @@ export interface GetCourseVersionItem {
101
101
  */
102
102
  launchMode: ContentLaunchMode;
103
103
  /**
104
- *
104
+ * Zero means unlimited (quiz placements only).
105
105
  * @type {number}
106
106
  * @memberof GetCourseVersionItem
107
107
  */
@@ -75,8 +75,38 @@ export interface GetLibraryQuizResult {
75
75
  * @memberof GetLibraryQuizResult
76
76
  */
77
77
  pendingManualGrading: boolean;
78
+ /**
79
+ * The attempt was submitted automatically when its time limit ran out.
80
+ * @type {boolean}
81
+ * @memberof GetLibraryQuizResult
82
+ */
83
+ timedOut: boolean;
78
84
  /**
79
85
  *
86
+ * @type {number}
87
+ * @memberof GetLibraryQuizResult
88
+ */
89
+ passingScore: number;
90
+ /**
91
+ *
92
+ * @type {number}
93
+ * @memberof GetLibraryQuizResult
94
+ */
95
+ attemptNumber: number;
96
+ /**
97
+ * Attempts this learner may take, including any extra attempts granted to them. Zero means unlimited.
98
+ * @type {number}
99
+ * @memberof GetLibraryQuizResult
100
+ */
101
+ maxAttempts: number;
102
+ /**
103
+ * The learner has at least one attempt left.
104
+ * @type {boolean}
105
+ * @memberof GetLibraryQuizResult
106
+ */
107
+ canRetake: boolean;
108
+ /**
109
+ * 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.
80
110
  * @type {Array<{ [key: string]: any; }>}
81
111
  * @memberof GetLibraryQuizResult
82
112
  */
@@ -38,6 +38,16 @@ function instanceOfGetLibraryQuizResult(value) {
38
38
  return false;
39
39
  if (!('pendingManualGrading' in value) || value['pendingManualGrading'] === undefined)
40
40
  return false;
41
+ if (!('timedOut' in value) || value['timedOut'] === undefined)
42
+ return false;
43
+ if (!('passingScore' in value) || value['passingScore'] === undefined)
44
+ return false;
45
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
46
+ return false;
47
+ if (!('maxAttempts' in value) || value['maxAttempts'] === undefined)
48
+ return false;
49
+ if (!('canRetake' in value) || value['canRetake'] === undefined)
50
+ return false;
41
51
  if (!('questions' in value) || value['questions'] === undefined)
42
52
  return false;
43
53
  return true;
@@ -60,6 +70,11 @@ function GetLibraryQuizResultFromJSONTyped(json, ignoreDiscriminator) {
60
70
  'scorePercentage': json['score_percentage'] == null ? undefined : json['score_percentage'],
61
71
  'passed': json['passed'] == null ? undefined : json['passed'],
62
72
  'pendingManualGrading': json['pending_manual_grading'],
73
+ 'timedOut': json['timed_out'],
74
+ 'passingScore': json['passing_score'],
75
+ 'attemptNumber': json['attempt_number'],
76
+ 'maxAttempts': json['max_attempts'],
77
+ 'canRetake': json['can_retake'],
63
78
  'questions': json['questions'],
64
79
  };
65
80
  }
@@ -81,6 +96,11 @@ function GetLibraryQuizResultToJSONTyped(value, ignoreDiscriminator = false) {
81
96
  'score_percentage': value['scorePercentage'],
82
97
  'passed': value['passed'],
83
98
  'pending_manual_grading': value['pendingManualGrading'],
99
+ 'timed_out': value['timedOut'],
100
+ 'passing_score': value['passingScore'],
101
+ 'attempt_number': value['attemptNumber'],
102
+ 'max_attempts': value['maxAttempts'],
103
+ 'can_retake': value['canRetake'],
84
104
  'questions': value['questions'],
85
105
  };
86
106
  }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { ResourceSessionEnvironment } from './ResourceSessionEnvironment';
13
13
  import type { LibraryQuizSessionQuestion } from './LibraryQuizSessionQuestion';
14
+ import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -77,6 +78,48 @@ export interface GetLibraryQuizSession {
77
78
  * @memberof GetLibraryQuizSession
78
79
  */
79
80
  quizName: string;
81
+ /**
82
+ * The quiz description, shown as instructions on the introduction page.
83
+ * @type {string}
84
+ * @memberof GetLibraryQuizSession
85
+ */
86
+ description: string;
87
+ /**
88
+ * False until the learner leaves the introduction page. The time limit starts counting when the attempt starts.
89
+ * @type {boolean}
90
+ * @memberof GetLibraryQuizSession
91
+ */
92
+ hasStarted: boolean;
93
+ /**
94
+ *
95
+ * @type {number}
96
+ * @memberof GetLibraryQuizSession
97
+ */
98
+ passingScore: number;
99
+ /**
100
+ *
101
+ * @type {number}
102
+ * @memberof GetLibraryQuizSession
103
+ */
104
+ timeLimitMinutes?: number | null;
105
+ /**
106
+ * Attempts this learner may take, including any extra attempts granted to them. Zero means unlimited.
107
+ * @type {number}
108
+ * @memberof GetLibraryQuizSession
109
+ */
110
+ maxAttempts: number;
111
+ /**
112
+ *
113
+ * @type {QuizFeedbackTiming}
114
+ * @memberof GetLibraryQuizSession
115
+ */
116
+ feedbackTiming: QuizFeedbackTiming;
117
+ /**
118
+ *
119
+ * @type {boolean}
120
+ * @memberof GetLibraryQuizSession
121
+ */
122
+ requireAllQuestions: boolean;
80
123
  /**
81
124
  *
82
125
  * @type {number}
@@ -21,6 +21,7 @@ exports.GetLibraryQuizSessionToJSON = GetLibraryQuizSessionToJSON;
21
21
  exports.GetLibraryQuizSessionToJSONTyped = GetLibraryQuizSessionToJSONTyped;
22
22
  const ResourceSessionEnvironment_1 = require("./ResourceSessionEnvironment");
23
23
  const LibraryQuizSessionQuestion_1 = require("./LibraryQuizSessionQuestion");
24
+ const QuizFeedbackTiming_1 = require("./QuizFeedbackTiming");
24
25
  /**
25
26
  * @export
26
27
  */
@@ -49,6 +50,18 @@ function instanceOfGetLibraryQuizSession(value) {
49
50
  return false;
50
51
  if (!('quizName' in value) || value['quizName'] === undefined)
51
52
  return false;
53
+ if (!('description' in value) || value['description'] === undefined)
54
+ return false;
55
+ if (!('hasStarted' in value) || value['hasStarted'] === undefined)
56
+ return false;
57
+ if (!('passingScore' in value) || value['passingScore'] === undefined)
58
+ return false;
59
+ if (!('maxAttempts' in value) || value['maxAttempts'] === undefined)
60
+ return false;
61
+ if (!('feedbackTiming' in value) || value['feedbackTiming'] === undefined)
62
+ return false;
63
+ if (!('requireAllQuestions' in value) || value['requireAllQuestions'] === undefined)
64
+ return false;
52
65
  if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
53
66
  return false;
54
67
  if (!('isCurrent' in value) || value['isCurrent'] === undefined)
@@ -89,6 +102,13 @@ function GetLibraryQuizSessionFromJSONTyped(json, ignoreDiscriminator) {
89
102
  'quizVersionId': json['quiz_version_id'],
90
103
  'quizVersionNumber': json['quiz_version_number'],
91
104
  'quizName': json['quiz_name'],
105
+ 'description': json['description'],
106
+ 'hasStarted': json['has_started'],
107
+ 'passingScore': json['passing_score'],
108
+ 'timeLimitMinutes': json['time_limit_minutes'] == null ? undefined : json['time_limit_minutes'],
109
+ 'maxAttempts': json['max_attempts'],
110
+ 'feedbackTiming': (0, QuizFeedbackTiming_1.QuizFeedbackTimingFromJSON)(json['feedback_timing']),
111
+ 'requireAllQuestions': json['require_all_questions'],
92
112
  'attemptNumber': json['attempt_number'],
93
113
  'isCurrent': json['is_current'],
94
114
  'status': json['status'],
@@ -123,6 +143,13 @@ function GetLibraryQuizSessionToJSONTyped(value, ignoreDiscriminator = false) {
123
143
  'quiz_version_id': value['quizVersionId'],
124
144
  'quiz_version_number': value['quizVersionNumber'],
125
145
  'quiz_name': value['quizName'],
146
+ 'description': value['description'],
147
+ 'has_started': value['hasStarted'],
148
+ 'passing_score': value['passingScore'],
149
+ 'time_limit_minutes': value['timeLimitMinutes'],
150
+ 'max_attempts': value['maxAttempts'],
151
+ 'feedback_timing': (0, QuizFeedbackTiming_1.QuizFeedbackTimingToJSON)(value['feedbackTiming']),
152
+ 'require_all_questions': value['requireAllQuestions'],
126
153
  'attempt_number': value['attemptNumber'],
127
154
  'is_current': value['isCurrent'],
128
155
  'status': value['status'],
@@ -13,6 +13,7 @@ import type { LibraryQuizCriterion } from './LibraryQuizCriterion';
13
13
  import type { ContentLibraryVersionStatus } from './ContentLibraryVersionStatus';
14
14
  import type { QuestionSelectionMethod } from './QuestionSelectionMethod';
15
15
  import type { LibraryQuizQuestion } from './LibraryQuizQuestion';
16
+ import type { QuizFeedbackTiming } from './QuizFeedbackTiming';
16
17
  /**
17
18
  *
18
19
  * @export
@@ -103,6 +104,24 @@ export interface GetLibraryQuizVersion {
103
104
  * @memberof GetLibraryQuizVersion
104
105
  */
105
106
  requireAllQuestions: boolean;
107
+ /**
108
+ * 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.
109
+ * @type {number}
110
+ * @memberof GetLibraryQuizVersion
111
+ */
112
+ maxAttempts: number;
113
+ /**
114
+ * Show each question's explanation alongside the learner's feedback.
115
+ * @type {boolean}
116
+ * @memberof GetLibraryQuizVersion
117
+ */
118
+ showExplanations: boolean;
119
+ /**
120
+ *
121
+ * @type {QuizFeedbackTiming}
122
+ * @memberof GetLibraryQuizVersion
123
+ */
124
+ feedbackTiming: QuizFeedbackTiming;
106
125
  /**
107
126
  *
108
127
  * @type {{ [key: string]: any; }}
@@ -22,6 +22,7 @@ const LibraryQuizCriterion_1 = require("./LibraryQuizCriterion");
22
22
  const ContentLibraryVersionStatus_1 = require("./ContentLibraryVersionStatus");
23
23
  const QuestionSelectionMethod_1 = require("./QuestionSelectionMethod");
24
24
  const LibraryQuizQuestion_1 = require("./LibraryQuizQuestion");
25
+ const QuizFeedbackTiming_1 = require("./QuizFeedbackTiming");
25
26
  /**
26
27
  * Check if a given object implements the GetLibraryQuizVersion interface.
27
28
  */
@@ -48,6 +49,12 @@ function instanceOfGetLibraryQuizVersion(value) {
48
49
  return false;
49
50
  if (!('requireAllQuestions' in value) || value['requireAllQuestions'] === undefined)
50
51
  return false;
52
+ if (!('maxAttempts' in value) || value['maxAttempts'] === undefined)
53
+ return false;
54
+ if (!('showExplanations' in value) || value['showExplanations'] === undefined)
55
+ return false;
56
+ if (!('feedbackTiming' in value) || value['feedbackTiming'] === undefined)
57
+ return false;
51
58
  if (!('settings' in value) || value['settings'] === undefined)
52
59
  return false;
53
60
  if (!('questions' in value) || value['questions'] === undefined)
@@ -86,6 +93,9 @@ function GetLibraryQuizVersionFromJSONTyped(json, ignoreDiscriminator) {
86
93
  'showCorrectAnswers': json['show_correct_answers'],
87
94
  'allowReview': json['allow_review'],
88
95
  'requireAllQuestions': json['require_all_questions'],
96
+ 'maxAttempts': json['max_attempts'],
97
+ 'showExplanations': json['show_explanations'],
98
+ 'feedbackTiming': (0, QuizFeedbackTiming_1.QuizFeedbackTimingFromJSON)(json['feedback_timing']),
89
99
  'settings': json['settings'],
90
100
  'questions': (json['questions'].map(LibraryQuizQuestion_1.LibraryQuizQuestionFromJSON)),
91
101
  'criteria': (json['criteria'].map(LibraryQuizCriterion_1.LibraryQuizCriterionFromJSON)),
@@ -119,6 +129,9 @@ function GetLibraryQuizVersionToJSONTyped(value, ignoreDiscriminator = false) {
119
129
  'show_correct_answers': value['showCorrectAnswers'],
120
130
  'allow_review': value['allowReview'],
121
131
  'require_all_questions': value['requireAllQuestions'],
132
+ 'max_attempts': value['maxAttempts'],
133
+ 'show_explanations': value['showExplanations'],
134
+ 'feedback_timing': (0, QuizFeedbackTiming_1.QuizFeedbackTimingToJSON)(value['feedbackTiming']),
122
135
  'settings': value['settings'],
123
136
  'questions': (value['questions'].map(LibraryQuizQuestion_1.LibraryQuizQuestionToJSON)),
124
137
  'criteria': (value['criteria'].map(LibraryQuizCriterion_1.LibraryQuizCriterionToJSON)),
@@ -34,6 +34,12 @@ export interface GetQuestionAnswerChoicesInner {
34
34
  * @memberof GetQuestionAnswerChoicesInner
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 GetQuestionAnswerChoicesInner
41
+ */
42
+ lockPosition: boolean;
37
43
  }
38
44
  /**
39
45
  * Check if a given object implements the GetQuestionAnswerChoicesInner interface.
@@ -29,6 +29,8 @@ function instanceOfGetQuestionAnswerChoicesInner(value) {
29
29
  return false;
30
30
  if (!('isCorrect' in value) || value['isCorrect'] === undefined)
31
31
  return false;
32
+ if (!('lockPosition' in value) || value['lockPosition'] === undefined)
33
+ return false;
32
34
  return true;
33
35
  }
34
36
  function GetQuestionAnswerChoicesInnerFromJSON(json) {
@@ -42,6 +44,7 @@ function GetQuestionAnswerChoicesInnerFromJSONTyped(json, ignoreDiscriminator) {
42
44
  'id': json['id'],
43
45
  'text': (0, RichTextDocument_1.RichTextDocumentFromJSON)(json['text']),
44
46
  'isCorrect': json['is_correct'],
47
+ 'lockPosition': json['lock_position'],
45
48
  };
46
49
  }
47
50
  function GetQuestionAnswerChoicesInnerToJSON(json) {
@@ -55,5 +58,6 @@ function GetQuestionAnswerChoicesInnerToJSONTyped(value, ignoreDiscriminator = f
55
58
  'id': value['id'],
56
59
  'text': (0, RichTextDocument_1.RichTextDocumentToJSON)(value['text']),
57
60
  'is_correct': value['isCorrect'],
61
+ 'lock_position': value['lockPosition'],
58
62
  };
59
63
  }