commons-assessment 12.0.35 → 12.0.37
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/README.md +5 -3
- package/bundles/commons-assessment.umd.js +394 -252
- package/bundles/commons-assessment.umd.js.map +1 -1
- package/esm2015/lib/modules/assessment-maker/assessment-maker.component.js +33 -16
- package/esm2015/lib/modules/assessment-maker/services/assessment-builder.service.js +14 -4
- package/esm2015/lib/modules/assessment-taker/assessment-taker.component.js +133 -82
- package/esm2015/lib/modules/assessment-taker/components/proctoring-consent/proctoring-consent.component.js +44 -27
- package/esm2015/lib/modules/assessment-taker/components/proctoring-result/proctoring-result.component.js +2 -2
- package/esm2015/lib/modules/assessment-taker/components/question-type-multiselect/question-type-multiselect.component.js +2 -2
- package/esm2015/lib/modules/assessment-taker/components/question-type-objective/question-type-objective.component.js +2 -2
- package/esm2015/lib/modules/assessment-taker/components/question-type-preference/question-type-preference.component.js +4 -3
- package/esm2015/lib/modules/assessment-taker/services/proctoring.service.js +14 -7
- package/esm2015/lib/modules/assessment-taker/services/response-builder.service.js +15 -1
- package/esm2015/lib/shared/interfaces/assessment.interface.js +1 -1
- package/esm2015/lib/shared/interfaces/proctoring.interface.js +1 -1
- package/fesm2015/commons-assessment.js +336 -217
- package/fesm2015/commons-assessment.js.map +1 -1
- package/lib/modules/assessment-maker/assessment-maker.component.d.ts +9 -1
- package/lib/modules/assessment-maker/services/assessment-builder.service.d.ts +8 -1
- package/lib/modules/assessment-taker/assessment-taker.component.d.ts +33 -12
- package/lib/modules/assessment-taker/components/proctoring-consent/proctoring-consent.component.d.ts +13 -22
- package/lib/modules/assessment-taker/services/proctoring.service.d.ts +6 -3
- package/lib/modules/assessment-taker/services/response-builder.service.d.ts +9 -0
- package/lib/shared/interfaces/assessment.interface.d.ts +1 -0
- package/lib/shared/interfaces/proctoring.interface.d.ts +2 -0
- package/package.json +2 -8
- package/src/lib/assets/json/labelConfig.json +15 -7
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ The library uses Bootstrap styles and requires the following modules to be impor
|
|
|
15
15
|
- `AssessmentMakerModule` (If creating assessments)
|
|
16
16
|
- `AssessmentTakerModule` (If rendering assessments)
|
|
17
17
|
|
|
18
|
-
**Proctoring (optional):**
|
|
18
|
+
**Proctoring (optional):** the library does **not** import `@proctorlink/sdk` directly, so apps that don't use proctoring need not install it and build cleanly. If you use proctoring, install it (`npm install @proctorlink/sdk`) and pass a loader to the taker via `[proctorLinkLoader]="() => import('@proctorlink/sdk')"` — the SDK is then fetched on demand only when a proctored session starts, and the module reference stays in your app's bundle. Also allow the proctoring enclave in your app's `Content-Security-Policy`: `frame-src https://app-dev.proctorlink.com;`.
|
|
19
19
|
|
|
20
20
|
## Installation & Configuration
|
|
21
21
|
|
|
@@ -163,6 +163,7 @@ export class Component {
|
|
|
163
163
|
| `[assessmentContext]` | `@Input` | `AssessmentContext` | (Optional) Pre-loaded assessment context data to bypass the initial data load API call. |
|
|
164
164
|
| `[checkForResponses]` | `@Input` | `boolean` | If true, show a warning on deletion of sections and questions if any responses are linked to them. Default is false. |
|
|
165
165
|
| `[showProctoringToggle]` | `@Input` | `boolean` | (Optional) If true, shows a toggle to enable/disable proctoring. Default is false. Works only when partial response submission is allowed. |
|
|
166
|
+
| `[showTimeInput]` | `@Input` | `boolean` | (Optional) If true, shows an optional duration (minutes) input. The value is saved (in seconds) to the assessment instance's `duration` — bundled into the patch API when the instance exists, or set on the created instance otherwise. Leave it empty for an untimed assessment. Default is false. |
|
|
166
167
|
| `(assessmentIdChange)` | `@Output` | `EventEmitter<number>` | Emits the new `assessmentId` when an assessment is successfully created. |
|
|
167
168
|
| `(assessmentInstanceIdChange)` | `@Output` | `EventEmitter<number>` | Emits the new instance ID integer when an assessment is published. |
|
|
168
169
|
| `(snackbarMessage)` | `@Output` | `EventEmitter<{ message: string, type: 'success' \| 'error' \| 'info' }>` | Emits message status updates representing errors and workflow successes from the service. |
|
|
@@ -216,9 +217,10 @@ To render the assessment taker interface, use the `<lib-assessment-taker>` compo
|
|
|
216
217
|
| `[showOverallRemarks]` | `@Input` | `boolean` | (Optional) Shows overall remarks field. Default is false. |
|
|
217
218
|
| `[showCorrectAnswers]` | `@Input` | `boolean` | (Optional) Shows correct and incorrect answers for objective and multiselect type questions. Default is false. |
|
|
218
219
|
| `[enableSkillsToQuestionMapping]` | `@Input` | `boolean` | (Optional) Enables ability to map skills to questions. Default is false. |
|
|
220
|
+
| `[proctorLinkLoader]` | `@Input` | `() => Promise<any>` | (Optional) Loader for the optional `@proctorlink/sdk`, e.g. `() => import('@proctorlink/sdk')`. Required only when proctoring is enabled; keeps the SDK out of the library bundle so non-proctoring apps don't need the package installed. |
|
|
221
|
+
| `[resumeTimerAcrossVisits]` | `@Input` | `boolean` | (Optional) For timed assessments, anchors the countdown to the assessee's first-visit time (`assesseeResponse.createdAt`) so it keeps elapsing across reloads/absences instead of restarting each visit. On begin, the assessee is created up front (already created when proctoring is enabled) so `createdAt` exists. On return, remaining time = `duration - elapsedSinceCreatedAt`; if it has already elapsed, the timer shows `00:00` and the assessment auto-submits. Default is false. |
|
|
219
222
|
| `(stepChanged)` | `@Output` | `EventEmitter<{ currentStepIndex: number, totalSteps: number, isLastStep: boolean }>` | Emits initially and on every step change. Provides the current step index, total steps, and indicating boolean. |
|
|
220
|
-
| `(
|
|
221
|
-
| `(proctoringSession)` | `@Output` | `EventEmitter<ProctoringSession>` | Emits the proctoring session issued on consent. |
|
|
223
|
+
| `(consentToProceed)` | `@Output` | `EventEmitter<boolean>` | A full-screen intro gate is shown before the assessment starts when proctoring is enabled, or when `[resumeTimerAcrossVisits]` is set on a timed assessment. It presents the assessment details/warnings (and, for proctoring, the consent notice + reference-photo capture). On proceed, the assessee is created (and the proctoring session started, when proctored) with a loader; emits `true` once the candidate agrees and the assessment begins. |
|
|
222
224
|
| `(submitAssessment)` | `@Output` | `EventEmitter<{ assesseeId: number, completed: boolean }>` | Emits when the assessment is submitted, containing the `assesseeId` and a `completed` flag indicating if the taker finished the entire assessment. |
|
|
223
225
|
| `(snackbarMessage)` | `@Output` | `EventEmitter<{ message: string, type: 'success' \| 'error' \| 'info' }>` | Emits message status updates representing errors and workflow successes from the service. |
|
|
224
226
|
|