@easyedu/js-lsm-api 1.139.0 → 1.141.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 +40 -0
- package/README.md +41 -2
- package/dist/apis/ContentLibraryQuizApi.d.ts +86 -0
- package/dist/apis/ContentLibraryQuizApi.js +216 -0
- package/dist/apis/DispatchApi.d.ts +71 -0
- package/dist/apis/DispatchApi.js +178 -0
- package/dist/apis/LRSApi.d.ts +152 -0
- package/dist/apis/LRSApi.js +369 -0
- package/dist/apis/PlayerApi.d.ts +71 -0
- package/dist/apis/PlayerApi.js +177 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -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 +71 -0
- package/dist/esm/apis/DispatchApi.js +178 -0
- package/dist/esm/apis/LRSApi.d.ts +152 -0
- package/dist/esm/apis/LRSApi.js +365 -0
- package/dist/esm/apis/PlayerApi.d.ts +71 -0
- package/dist/esm/apis/PlayerApi.js +177 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/Cmi5Launch.d.ts +52 -0
- package/dist/esm/models/Cmi5Launch.js +58 -0
- package/dist/esm/models/DeleteLrsUserRecordsResponse.d.ts +38 -0
- package/dist/esm/models/DeleteLrsUserRecordsResponse.js +47 -0
- package/dist/esm/models/GetAttemptAllowance.d.ts +9 -3
- package/dist/esm/models/GetAttemptAllowance.js +4 -0
- package/dist/esm/models/GetCourseExport.d.ts +2 -1
- package/dist/esm/models/GetCourseExport.js +2 -1
- 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/GetLrsCredentials.d.ts +46 -0
- package/dist/esm/models/GetLrsCredentials.js +53 -0
- package/dist/esm/models/GetLrsStatementList.d.ts +57 -0
- package/dist/esm/models/GetLrsStatementList.js +60 -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/GetResourceSessionActivity.d.ts +2 -1
- package/dist/esm/models/GetResourceSessionActivity.js +2 -1
- package/dist/esm/models/H5pState.d.ts +34 -0
- package/dist/esm/models/H5pState.js +43 -0
- package/dist/esm/models/H5pStatementResult.d.ts +44 -0
- package/dist/esm/models/H5pStatementResult.js +49 -0
- package/dist/esm/models/HostedScormAccessPolicy.d.ts +1 -1
- 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/LrsCredential.d.ts +74 -0
- package/dist/esm/models/LrsCredential.js +67 -0
- package/dist/esm/models/LrsScope.d.ts +38 -0
- package/dist/esm/models/LrsScope.js +47 -0
- package/dist/esm/models/LrsStatement.d.ts +112 -0
- package/dist/esm/models/LrsStatement.js +81 -0
- package/dist/esm/models/PostCourseExport.d.ts +2 -1
- package/dist/esm/models/PostCourseExport.js +2 -1
- package/dist/esm/models/PostCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/PostDispatchCmi5Launch.d.ts +64 -0
- package/dist/esm/models/PostDispatchCmi5Launch.js +63 -0
- package/dist/esm/models/PostH5pStatement.d.ts +40 -0
- package/dist/esm/models/PostH5pStatement.js +47 -0
- package/dist/esm/models/PostLibraryQuiz.d.ts +21 -2
- package/dist/esm/models/PostLibraryQuiz.js +7 -0
- package/dist/esm/models/PostLrsCredential.d.ts +38 -0
- package/dist/esm/models/PostLrsCredential.js +47 -0
- package/dist/esm/models/PostLrsCredentialResponse.d.ts +45 -0
- package/dist/esm/models/PostLrsCredentialResponse.js +52 -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/PutLrsCredential.d.ts +38 -0
- package/dist/esm/models/PutLrsCredential.js +43 -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/ResourceType.d.ts +2 -0
- package/dist/esm/models/ResourceType.js +3 -1
- package/dist/esm/models/index.d.ts +19 -0
- package/dist/esm/models/index.js +19 -0
- package/dist/models/Cmi5Launch.d.ts +52 -0
- package/dist/models/Cmi5Launch.js +66 -0
- package/dist/models/DeleteLrsUserRecordsResponse.d.ts +38 -0
- package/dist/models/DeleteLrsUserRecordsResponse.js +54 -0
- package/dist/models/GetAttemptAllowance.d.ts +9 -3
- package/dist/models/GetAttemptAllowance.js +4 -0
- package/dist/models/GetCourseExport.d.ts +2 -1
- package/dist/models/GetCourseExport.js +2 -1
- 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/GetLrsCredentials.d.ts +46 -0
- package/dist/models/GetLrsCredentials.js +60 -0
- package/dist/models/GetLrsStatementList.d.ts +57 -0
- package/dist/models/GetLrsStatementList.js +67 -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/GetResourceSessionActivity.d.ts +2 -1
- package/dist/models/GetResourceSessionActivity.js +2 -1
- package/dist/models/H5pState.d.ts +34 -0
- package/dist/models/H5pState.js +50 -0
- package/dist/models/H5pStatementResult.d.ts +44 -0
- package/dist/models/H5pStatementResult.js +56 -0
- package/dist/models/HostedScormAccessPolicy.d.ts +1 -1
- 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/LrsCredential.d.ts +74 -0
- package/dist/models/LrsCredential.js +74 -0
- package/dist/models/LrsScope.d.ts +38 -0
- package/dist/models/LrsScope.js +54 -0
- package/dist/models/LrsStatement.d.ts +112 -0
- package/dist/models/LrsStatement.js +88 -0
- package/dist/models/PostCourseExport.d.ts +2 -1
- package/dist/models/PostCourseExport.js +2 -1
- package/dist/models/PostCourseVersionItem.d.ts +1 -1
- package/dist/models/PostDispatchCmi5Launch.d.ts +64 -0
- package/dist/models/PostDispatchCmi5Launch.js +70 -0
- package/dist/models/PostH5pStatement.d.ts +40 -0
- package/dist/models/PostH5pStatement.js +54 -0
- package/dist/models/PostLibraryQuiz.d.ts +21 -2
- package/dist/models/PostLibraryQuiz.js +7 -0
- package/dist/models/PostLrsCredential.d.ts +38 -0
- package/dist/models/PostLrsCredential.js +54 -0
- package/dist/models/PostLrsCredentialResponse.d.ts +45 -0
- package/dist/models/PostLrsCredentialResponse.js +59 -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/PutLrsCredential.d.ts +38 -0
- package/dist/models/PutLrsCredential.js +50 -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/ResourceType.d.ts +2 -0
- package/dist/models/ResourceType.js +3 -1
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.js +19 -0
- package/docs/Cmi5Launch.md +39 -0
- package/docs/ContentLibraryApi.md +2 -2
- package/docs/ContentLibraryQuizApi.md +343 -0
- package/docs/DeleteLrsUserRecordsResponse.md +37 -0
- package/docs/DispatchApi.md +287 -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/GetLrsCredentials.md +38 -0
- package/docs/GetLrsStatementList.md +42 -0
- package/docs/GetQuestionAnswerChoicesInner.md +2 -0
- package/docs/GetQuizSettings.md +43 -0
- package/docs/H5pState.md +35 -0
- package/docs/H5pStatementResult.md +39 -0
- package/docs/LRSApi.md +531 -0
- package/docs/LibraryQuizQuestionFeedback.md +47 -0
- package/docs/LibraryQuizSessionAnswerChoice.md +2 -0
- package/docs/LibraryQuizSessionQuestion.md +6 -0
- package/docs/LrsCredential.md +49 -0
- package/docs/LrsScope.md +37 -0
- package/docs/LrsStatement.md +61 -0
- package/docs/PlayerApi.md +286 -1
- package/docs/PostDispatchCmi5Launch.md +45 -0
- package/docs/PostH5pStatement.md +37 -0
- package/docs/PostLibraryQuiz.md +6 -0
- package/docs/PostLrsCredential.md +36 -0
- package/docs/PostLrsCredentialResponse.md +39 -0
- package/docs/PostQuestionAnswerChoicesInner.md +2 -0
- package/docs/PutLibraryQuizSessionQuestionFlag.md +34 -0
- package/docs/PutLibraryQuizVersion.md +6 -0
- package/docs/PutLrsCredential.md +36 -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 +243 -0
- package/src/apis/LRSApi.ts +486 -0
- package/src/apis/PlayerApi.ts +250 -0
- package/src/apis/index.ts +1 -0
- package/src/models/Cmi5Launch.ts +95 -0
- package/src/models/DeleteLrsUserRecordsResponse.ts +75 -0
- package/src/models/GetAttemptAllowance.ts +12 -3
- package/src/models/GetCourseExport.ts +3 -2
- 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/GetLrsCredentials.ts +99 -0
- package/src/models/GetLrsStatementList.ts +110 -0
- package/src/models/GetQuestionAnswerChoicesInner.ts +9 -0
- package/src/models/GetQuizSettings.ts +101 -0
- package/src/models/GetResourceSessionActivity.ts +3 -2
- package/src/models/H5pState.ts +66 -0
- package/src/models/H5pStatementResult.ts +83 -0
- package/src/models/HostedScormAccessPolicy.ts +1 -1
- 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/LrsCredential.ts +127 -0
- package/src/models/LrsScope.ts +75 -0
- package/src/models/LrsStatement.ts +176 -0
- package/src/models/PostCourseExport.ts +3 -2
- package/src/models/PostCourseVersionItem.ts +1 -1
- package/src/models/PostDispatchCmi5Launch.ts +111 -0
- package/src/models/PostH5pStatement.ts +75 -0
- package/src/models/PostLibraryQuiz.ts +33 -2
- package/src/models/PostLrsCredential.ts +75 -0
- package/src/models/PostLrsCredentialResponse.ts +92 -0
- 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/PutLrsCredential.ts +73 -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/ResourceType.ts +3 -1
- package/src/models/index.ts +19 -0
package/docs/DispatchApi.md
CHANGED
|
@@ -8,12 +8,16 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
8
8
|
| [**getDispatchQuizSession**](DispatchApi.md#getdispatchquizsession) | **GET** /dispatch/runtime/quiz-sessions/{sessionId} | Get a registration-owned native quiz session |
|
|
9
9
|
| [**getDispatchQuizSessionResults**](DispatchApi.md#getdispatchquizsessionresults) | **GET** /dispatch/runtime/quiz-sessions/{sessionId}/results | Get the result of a registration-owned native quiz session |
|
|
10
10
|
| [**getDispatchRollup**](DispatchApi.md#getdispatchrollup) | **GET** /dispatch/sessions/{dispatchPackageId}/rollup | Get dispatch package rollup data |
|
|
11
|
+
| [**postDispatchCmi5Launch**](DispatchApi.md#postdispatchcmi5launch) | **POST** /dispatch/cmi5/launch | Start a hosted-course launch from a cmi5 launch |
|
|
11
12
|
| [**postDispatchItemLaunch**](DispatchApi.md#postdispatchitemlaunch) | **POST** /dispatch/runtime/items/{itemId}/launch | Start or resume a selected hosted course item |
|
|
12
13
|
| [**postDispatchLaunch**](DispatchApi.md#postdispatchlaunch) | **POST** /dispatch/launch | Launch a dispatch package |
|
|
14
|
+
| [**postDispatchQuizSessionAnswerCheck**](DispatchApi.md#postdispatchquizsessionanswercheck) | **POST** /dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId}/check | Check a saved answer for immediate feedback |
|
|
15
|
+
| [**postDispatchQuizSessionStart**](DispatchApi.md#postdispatchquizsessionstart) | **POST** /dispatch/runtime/quiz-sessions/{sessionId}/start | Begin a quiz attempt from its introduction page |
|
|
13
16
|
| [**postDispatchQuizSessionSubmit**](DispatchApi.md#postdispatchquizsessionsubmit) | **POST** /dispatch/runtime/quiz-sessions/{sessionId}/submit | Submit a registration-owned native quiz session |
|
|
14
17
|
| [**postDispatchTokenExchange**](DispatchApi.md#postdispatchtokenexchange) | **POST** /dispatch/runtime/token | Exchange a one-time hosted SCORM launch code |
|
|
15
18
|
| [**postDispatchTokenRefresh**](DispatchApi.md#postdispatchtokenrefresh) | **POST** /dispatch/runtime/token/refresh | Extend a valid hosted SCORM access token |
|
|
16
19
|
| [**putDispatchQuizSessionAnswer**](DispatchApi.md#putdispatchquizsessionanswer) | **PUT** /dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId} | Save a registration-owned native quiz answer |
|
|
20
|
+
| [**putDispatchQuizSessionQuestionFlag**](DispatchApi.md#putdispatchquizsessionquestionflag) | **PUT** /dispatch/runtime/quiz-sessions/{sessionId}/questions/{sessionQuestionId}/flag | Flag or unflag a question to review before submitting |
|
|
17
21
|
|
|
18
22
|
|
|
19
23
|
|
|
@@ -277,6 +281,78 @@ No authorization required
|
|
|
277
281
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
278
282
|
|
|
279
283
|
|
|
284
|
+
## postDispatchCmi5Launch
|
|
285
|
+
|
|
286
|
+
> PostDispatchLaunchResponse postDispatchCmi5Launch(postDispatchCmi5Launch)
|
|
287
|
+
|
|
288
|
+
Start a hosted-course launch from a cmi5 launch
|
|
289
|
+
|
|
290
|
+
Called by the launcher page of a cmi5 course export after it has exchanged the client LMS\'s fetch URL for LRS credentials. Applies the export\'s access policy to the client LRS origin, confirms the launch with that LRS when the export restricts origins, and returns the hosted player launch for the learner.
|
|
291
|
+
|
|
292
|
+
### Example
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
import {
|
|
296
|
+
Configuration,
|
|
297
|
+
DispatchApi,
|
|
298
|
+
} from '@easyedu/js-lsm-api';
|
|
299
|
+
import type { PostDispatchCmi5LaunchRequest } from '@easyedu/js-lsm-api';
|
|
300
|
+
|
|
301
|
+
async function example() {
|
|
302
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
303
|
+
const api = new DispatchApi();
|
|
304
|
+
|
|
305
|
+
const body = {
|
|
306
|
+
// PostDispatchCmi5Launch
|
|
307
|
+
postDispatchCmi5Launch: ...,
|
|
308
|
+
} satisfies PostDispatchCmi5LaunchRequest;
|
|
309
|
+
|
|
310
|
+
try {
|
|
311
|
+
const data = await api.postDispatchCmi5Launch(body);
|
|
312
|
+
console.log(data);
|
|
313
|
+
} catch (error) {
|
|
314
|
+
console.error(error);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Run the test
|
|
319
|
+
example().catch(console.error);
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Parameters
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
| Name | Type | Description | Notes |
|
|
326
|
+
|------------- | ------------- | ------------- | -------------|
|
|
327
|
+
| **postDispatchCmi5Launch** | [PostDispatchCmi5Launch](PostDispatchCmi5Launch.md) | | |
|
|
328
|
+
|
|
329
|
+
### Return type
|
|
330
|
+
|
|
331
|
+
[**PostDispatchLaunchResponse**](PostDispatchLaunchResponse.md)
|
|
332
|
+
|
|
333
|
+
### Authorization
|
|
334
|
+
|
|
335
|
+
No authorization required
|
|
336
|
+
|
|
337
|
+
### HTTP request headers
|
|
338
|
+
|
|
339
|
+
- **Content-Type**: `application/json`
|
|
340
|
+
- **Accept**: `application/json`
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
### HTTP response details
|
|
344
|
+
| Status code | Description | Response headers |
|
|
345
|
+
|-------------|-------------|------------------|
|
|
346
|
+
| **200** | Dispatch launch response | - |
|
|
347
|
+
| **400** | Invalid launch request, or the package is not a cmi5 export | - |
|
|
348
|
+
| **403** | LRS origin, validity window, or learner cap denied launch, or the client LRS did not confirm the launch | - |
|
|
349
|
+
| **404** | Package not found | - |
|
|
350
|
+
| **410** | Package revoked | - |
|
|
351
|
+
| **503** | Hosted player is not configured | - |
|
|
352
|
+
|
|
353
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
354
|
+
|
|
355
|
+
|
|
280
356
|
## postDispatchItemLaunch
|
|
281
357
|
|
|
282
358
|
> PostDispatchItemLaunchResponse postDispatchItemLaunch(itemId, postDispatchItemLaunch)
|
|
@@ -416,6 +492,145 @@ No authorization required
|
|
|
416
492
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
417
493
|
|
|
418
494
|
|
|
495
|
+
## postDispatchQuizSessionAnswerCheck
|
|
496
|
+
|
|
497
|
+
> GetLibraryQuizSession postDispatchQuizSessionAnswerCheck(sessionId, sessionQuestionId)
|
|
498
|
+
|
|
499
|
+
Check a saved answer for immediate feedback
|
|
500
|
+
|
|
501
|
+
Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
502
|
+
|
|
503
|
+
### Example
|
|
504
|
+
|
|
505
|
+
```ts
|
|
506
|
+
import {
|
|
507
|
+
Configuration,
|
|
508
|
+
DispatchApi,
|
|
509
|
+
} from '@easyedu/js-lsm-api';
|
|
510
|
+
import type { PostDispatchQuizSessionAnswerCheckRequest } from '@easyedu/js-lsm-api';
|
|
511
|
+
|
|
512
|
+
async function example() {
|
|
513
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
514
|
+
const api = new DispatchApi();
|
|
515
|
+
|
|
516
|
+
const body = {
|
|
517
|
+
// string
|
|
518
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
519
|
+
// string
|
|
520
|
+
sessionQuestionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
521
|
+
} satisfies PostDispatchQuizSessionAnswerCheckRequest;
|
|
522
|
+
|
|
523
|
+
try {
|
|
524
|
+
const data = await api.postDispatchQuizSessionAnswerCheck(body);
|
|
525
|
+
console.log(data);
|
|
526
|
+
} catch (error) {
|
|
527
|
+
console.error(error);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// Run the test
|
|
532
|
+
example().catch(console.error);
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Parameters
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
| Name | Type | Description | Notes |
|
|
539
|
+
|------------- | ------------- | ------------- | -------------|
|
|
540
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
541
|
+
| **sessionQuestionId** | `string` | | [Defaults to `undefined`] |
|
|
542
|
+
|
|
543
|
+
### Return type
|
|
544
|
+
|
|
545
|
+
[**GetLibraryQuizSession**](GetLibraryQuizSession.md)
|
|
546
|
+
|
|
547
|
+
### Authorization
|
|
548
|
+
|
|
549
|
+
No authorization required
|
|
550
|
+
|
|
551
|
+
### HTTP request headers
|
|
552
|
+
|
|
553
|
+
- **Content-Type**: Not defined
|
|
554
|
+
- **Accept**: `application/json`
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
### HTTP response details
|
|
558
|
+
| Status code | Description | Response headers |
|
|
559
|
+
|-------------|-------------|------------------|
|
|
560
|
+
| **200** | Quiz session including the checked question\'s feedback | - |
|
|
561
|
+
| **409** | The quiz shows feedback only after submission, the question has no saved answer, or the attempt has already been submitted | - |
|
|
562
|
+
|
|
563
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
## postDispatchQuizSessionStart
|
|
567
|
+
|
|
568
|
+
> GetLibraryQuizSession postDispatchQuizSessionStart(sessionId)
|
|
569
|
+
|
|
570
|
+
Begin a quiz attempt from its introduction page
|
|
571
|
+
|
|
572
|
+
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.
|
|
573
|
+
|
|
574
|
+
### Example
|
|
575
|
+
|
|
576
|
+
```ts
|
|
577
|
+
import {
|
|
578
|
+
Configuration,
|
|
579
|
+
DispatchApi,
|
|
580
|
+
} from '@easyedu/js-lsm-api';
|
|
581
|
+
import type { PostDispatchQuizSessionStartRequest } from '@easyedu/js-lsm-api';
|
|
582
|
+
|
|
583
|
+
async function example() {
|
|
584
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
585
|
+
const api = new DispatchApi();
|
|
586
|
+
|
|
587
|
+
const body = {
|
|
588
|
+
// string
|
|
589
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
590
|
+
} satisfies PostDispatchQuizSessionStartRequest;
|
|
591
|
+
|
|
592
|
+
try {
|
|
593
|
+
const data = await api.postDispatchQuizSessionStart(body);
|
|
594
|
+
console.log(data);
|
|
595
|
+
} catch (error) {
|
|
596
|
+
console.error(error);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// Run the test
|
|
601
|
+
example().catch(console.error);
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### Parameters
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
| Name | Type | Description | Notes |
|
|
608
|
+
|------------- | ------------- | ------------- | -------------|
|
|
609
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
610
|
+
|
|
611
|
+
### Return type
|
|
612
|
+
|
|
613
|
+
[**GetLibraryQuizSession**](GetLibraryQuizSession.md)
|
|
614
|
+
|
|
615
|
+
### Authorization
|
|
616
|
+
|
|
617
|
+
No authorization required
|
|
618
|
+
|
|
619
|
+
### HTTP request headers
|
|
620
|
+
|
|
621
|
+
- **Content-Type**: Not defined
|
|
622
|
+
- **Accept**: `application/json`
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
### HTTP response details
|
|
626
|
+
| Status code | Description | Response headers |
|
|
627
|
+
|-------------|-------------|------------------|
|
|
628
|
+
| **200** | Started quiz session | - |
|
|
629
|
+
| **409** | The attempt has already been submitted | - |
|
|
630
|
+
|
|
631
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
632
|
+
|
|
633
|
+
|
|
419
634
|
## postDispatchQuizSessionSubmit
|
|
420
635
|
|
|
421
636
|
> GetLibraryQuizResult postDispatchQuizSessionSubmit(sessionId)
|
|
@@ -677,3 +892,75 @@ No authorization required
|
|
|
677
892
|
|
|
678
893
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
679
894
|
|
|
895
|
+
|
|
896
|
+
## putDispatchQuizSessionQuestionFlag
|
|
897
|
+
|
|
898
|
+
> GetLibraryQuizSession putDispatchQuizSessionQuestionFlag(sessionId, sessionQuestionId, putLibraryQuizSessionQuestionFlag)
|
|
899
|
+
|
|
900
|
+
Flag or unflag a question to review before submitting
|
|
901
|
+
|
|
902
|
+
### Example
|
|
903
|
+
|
|
904
|
+
```ts
|
|
905
|
+
import {
|
|
906
|
+
Configuration,
|
|
907
|
+
DispatchApi,
|
|
908
|
+
} from '@easyedu/js-lsm-api';
|
|
909
|
+
import type { PutDispatchQuizSessionQuestionFlagRequest } from '@easyedu/js-lsm-api';
|
|
910
|
+
|
|
911
|
+
async function example() {
|
|
912
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
913
|
+
const api = new DispatchApi();
|
|
914
|
+
|
|
915
|
+
const body = {
|
|
916
|
+
// string
|
|
917
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
918
|
+
// string
|
|
919
|
+
sessionQuestionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
920
|
+
// PutLibraryQuizSessionQuestionFlag
|
|
921
|
+
putLibraryQuizSessionQuestionFlag: ...,
|
|
922
|
+
} satisfies PutDispatchQuizSessionQuestionFlagRequest;
|
|
923
|
+
|
|
924
|
+
try {
|
|
925
|
+
const data = await api.putDispatchQuizSessionQuestionFlag(body);
|
|
926
|
+
console.log(data);
|
|
927
|
+
} catch (error) {
|
|
928
|
+
console.error(error);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
// Run the test
|
|
933
|
+
example().catch(console.error);
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
### Parameters
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
| Name | Type | Description | Notes |
|
|
940
|
+
|------------- | ------------- | ------------- | -------------|
|
|
941
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
942
|
+
| **sessionQuestionId** | `string` | | [Defaults to `undefined`] |
|
|
943
|
+
| **putLibraryQuizSessionQuestionFlag** | [PutLibraryQuizSessionQuestionFlag](PutLibraryQuizSessionQuestionFlag.md) | | |
|
|
944
|
+
|
|
945
|
+
### Return type
|
|
946
|
+
|
|
947
|
+
[**GetLibraryQuizSession**](GetLibraryQuizSession.md)
|
|
948
|
+
|
|
949
|
+
### Authorization
|
|
950
|
+
|
|
951
|
+
No authorization required
|
|
952
|
+
|
|
953
|
+
### HTTP request headers
|
|
954
|
+
|
|
955
|
+
- **Content-Type**: `application/json`
|
|
956
|
+
- **Accept**: `application/json`
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
### HTTP response details
|
|
960
|
+
| Status code | Description | Response headers |
|
|
961
|
+
|-------------|-------------|------------------|
|
|
962
|
+
| **200** | Updated quiz session | - |
|
|
963
|
+
| **409** | The attempt has already been submitted | - |
|
|
964
|
+
|
|
965
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
966
|
+
|
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`effectiveMaxAttempts` | number
|
|
17
17
|
`attemptsUsed` | number
|
|
18
18
|
`attemptsRemaining` | number
|
|
19
|
+
`unlimited` | boolean
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -33,6 +34,7 @@ const example = {
|
|
|
33
34
|
"effectiveMaxAttempts": null,
|
|
34
35
|
"attemptsUsed": null,
|
|
35
36
|
"attemptsRemaining": null,
|
|
37
|
+
"unlimited": null,
|
|
36
38
|
} satisfies GetAttemptAllowance
|
|
37
39
|
|
|
38
40
|
console.log(example)
|
|
@@ -16,6 +16,11 @@ Name | Type
|
|
|
16
16
|
`scorePercentage` | number
|
|
17
17
|
`passed` | boolean
|
|
18
18
|
`pendingManualGrading` | boolean
|
|
19
|
+
`timedOut` | boolean
|
|
20
|
+
`passingScore` | number
|
|
21
|
+
`attemptNumber` | number
|
|
22
|
+
`maxAttempts` | number
|
|
23
|
+
`canRetake` | boolean
|
|
19
24
|
`questions` | Array<{ [key: string]: any; }>
|
|
20
25
|
|
|
21
26
|
## Example
|
|
@@ -35,6 +40,11 @@ const example = {
|
|
|
35
40
|
"scorePercentage": null,
|
|
36
41
|
"passed": null,
|
|
37
42
|
"pendingManualGrading": null,
|
|
43
|
+
"timedOut": null,
|
|
44
|
+
"passingScore": null,
|
|
45
|
+
"attemptNumber": null,
|
|
46
|
+
"maxAttempts": null,
|
|
47
|
+
"canRetake": null,
|
|
38
48
|
"questions": null,
|
|
39
49
|
} satisfies GetLibraryQuizResult
|
|
40
50
|
|
|
@@ -16,6 +16,13 @@ Name | Type
|
|
|
16
16
|
`quizVersionId` | string
|
|
17
17
|
`quizVersionNumber` | number
|
|
18
18
|
`quizName` | string
|
|
19
|
+
`description` | string
|
|
20
|
+
`hasStarted` | boolean
|
|
21
|
+
`passingScore` | number
|
|
22
|
+
`timeLimitMinutes` | number
|
|
23
|
+
`maxAttempts` | number
|
|
24
|
+
`feedbackTiming` | [QuizFeedbackTiming](QuizFeedbackTiming.md)
|
|
25
|
+
`requireAllQuestions` | boolean
|
|
19
26
|
`attemptNumber` | number
|
|
20
27
|
`isCurrent` | boolean
|
|
21
28
|
`status` | string
|
|
@@ -48,6 +55,13 @@ const example = {
|
|
|
48
55
|
"quizVersionId": null,
|
|
49
56
|
"quizVersionNumber": null,
|
|
50
57
|
"quizName": null,
|
|
58
|
+
"description": null,
|
|
59
|
+
"hasStarted": null,
|
|
60
|
+
"passingScore": null,
|
|
61
|
+
"timeLimitMinutes": null,
|
|
62
|
+
"maxAttempts": null,
|
|
63
|
+
"feedbackTiming": null,
|
|
64
|
+
"requireAllQuestions": null,
|
|
51
65
|
"attemptNumber": null,
|
|
52
66
|
"isCurrent": null,
|
|
53
67
|
"status": null,
|
|
@@ -20,6 +20,9 @@ Name | Type
|
|
|
20
20
|
`showCorrectAnswers` | boolean
|
|
21
21
|
`allowReview` | boolean
|
|
22
22
|
`requireAllQuestions` | boolean
|
|
23
|
+
`maxAttempts` | number
|
|
24
|
+
`showExplanations` | boolean
|
|
25
|
+
`feedbackTiming` | [QuizFeedbackTiming](QuizFeedbackTiming.md)
|
|
23
26
|
`settings` | { [key: string]: any; }
|
|
24
27
|
`questions` | [Array<LibraryQuizQuestion>](LibraryQuizQuestion.md)
|
|
25
28
|
`criteria` | [Array<LibraryQuizCriterion>](LibraryQuizCriterion.md)
|
|
@@ -51,6 +54,9 @@ const example = {
|
|
|
51
54
|
"showCorrectAnswers": null,
|
|
52
55
|
"allowReview": null,
|
|
53
56
|
"requireAllQuestions": null,
|
|
57
|
+
"maxAttempts": null,
|
|
58
|
+
"showExplanations": null,
|
|
59
|
+
"feedbackTiming": null,
|
|
54
60
|
"settings": null,
|
|
55
61
|
"questions": null,
|
|
56
62
|
"criteria": null,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# GetLrsCredentials
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`endpoint` | string
|
|
10
|
+
`availableScopes` | [Array<LrsScope>](LrsScope.md)
|
|
11
|
+
`credentials` | [Array<LrsCredential>](LrsCredential.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { GetLrsCredentials } from '@easyedu/js-lsm-api'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"endpoint": null,
|
|
21
|
+
"availableScopes": null,
|
|
22
|
+
"credentials": null,
|
|
23
|
+
} satisfies GetLrsCredentials
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetLrsCredentials
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# GetLrsStatementList
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`page` | number
|
|
10
|
+
`pageSize` | number
|
|
11
|
+
`totalPages` | number
|
|
12
|
+
`totalItems` | number
|
|
13
|
+
`items` | [Array<LrsStatement>](LrsStatement.md)
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { GetLrsStatementList } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"page": null,
|
|
23
|
+
"pageSize": null,
|
|
24
|
+
"totalPages": null,
|
|
25
|
+
"totalItems": null,
|
|
26
|
+
"items": null,
|
|
27
|
+
} satisfies GetLrsStatementList
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetLrsStatementList
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`id` | string
|
|
10
10
|
`text` | [RichTextDocument](RichTextDocument.md)
|
|
11
11
|
`isCorrect` | boolean
|
|
12
|
+
`lockPosition` | boolean
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"id": null,
|
|
21
22
|
"text": null,
|
|
22
23
|
"isCorrect": null,
|
|
24
|
+
"lockPosition": null,
|
|
23
25
|
} satisfies GetQuestionAnswerChoicesInner
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# GetQuizSettings
|
|
3
|
+
|
|
4
|
+
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.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`defaultMaxAttempts` | number
|
|
11
|
+
`defaultTimeLimitMinutes` | number
|
|
12
|
+
`defaultPassingScore` | number
|
|
13
|
+
`isCustomized` | boolean
|
|
14
|
+
`updatedAt` | number
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { GetQuizSettings } from '@easyedu/js-lsm-api'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"defaultMaxAttempts": null,
|
|
24
|
+
"defaultTimeLimitMinutes": null,
|
|
25
|
+
"defaultPassingScore": null,
|
|
26
|
+
"isCustomized": null,
|
|
27
|
+
"updatedAt": null,
|
|
28
|
+
} satisfies GetQuizSettings
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetQuizSettings
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|
package/docs/H5pState.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# H5pState
|
|
3
|
+
|
|
4
|
+
The saved in-progress state of an H5P activity for the session\'s learner.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`state` | { [key: string]: any; }
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { H5pState } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"state": null,
|
|
20
|
+
} satisfies H5pState
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as H5pState
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# H5pStatementResult
|
|
3
|
+
|
|
4
|
+
The learner\'s progress on the H5P activity after a statement was recorded.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`completionStatus` | string
|
|
11
|
+
`gradeStatus` | string
|
|
12
|
+
`scoreRaw` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { H5pStatementResult } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"completionStatus": null,
|
|
22
|
+
"gradeStatus": null,
|
|
23
|
+
"scoreRaw": null,
|
|
24
|
+
} satisfies H5pStatementResult
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as H5pStatementResult
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|