commons-assessment 12.0.39-dev.1 → 12.0.39-dev.3
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 +1 -0
- package/bundles/commons-assessment.umd.js +167 -85
- package/bundles/commons-assessment.umd.js.map +1 -1
- package/esm2015/lib/modules/assessment-maker/assessment-maker.component.js +1 -1
- package/esm2015/lib/modules/assessment-maker/components/add-edit-section-introduction/add-edit-section-introduction.component.js +1 -1
- package/esm2015/lib/modules/assessment-maker/components/assessment-builder/assessment-builder.component.js +1 -1
- package/esm2015/lib/modules/assessment-maker/components/question-details/question-details.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/assessment-taker.component.js +81 -5
- package/esm2015/lib/modules/assessment-taker/components/proctoring-consent/proctoring-consent.component.js +2 -2
- package/esm2015/lib/modules/assessment-taker/components/proctoring-result/proctoring-result.component.js +2 -2
- package/esm2015/lib/modules/assessment-taker/components/question-type-date-picker/question-type-date-picker.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-editor/question-type-editor.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-file-upload/question-type-file-upload.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-long/question-type-long.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-multiselect/question-type-multiselect.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-objective/question-type-objective.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-preference/question-type-preference.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/question-type-short/question-type-short.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/components/section-instructions/section-instructions.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/services/proctoring.service.js +14 -6
- package/esm2015/lib/shared/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm2015/lib/shared/components/skill-allocation/skill-allocation.component.js +1 -1
- package/esm2015/lib/shared/interfaces/proctoring.interface.js +1 -1
- package/fesm2015/commons-assessment.js +159 -76
- package/fesm2015/commons-assessment.js.map +1 -1
- package/lib/modules/assessment-taker/assessment-taker.component.d.ts +20 -1
- package/lib/modules/assessment-taker/services/proctoring.service.d.ts +1 -0
- package/lib/shared/interfaces/proctoring.interface.d.ts +7 -0
- package/package.json +1 -1
- package/src/lib/assets/json/labelConfig.json +3 -0
- package/src/lib/assets/theme/_theme.global.scss +1 -0
- package/src/lib/assets/theme/styles.global.scss +18 -0
|
@@ -43,6 +43,7 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
43
43
|
showOverallRemarks: boolean;
|
|
44
44
|
showCorrectAnswers: boolean;
|
|
45
45
|
resumeTimerAcrossVisits: boolean;
|
|
46
|
+
warnOnLeaveDuringProctoring: boolean;
|
|
46
47
|
proctorLinkLoader?: () => Promise<any>;
|
|
47
48
|
snackbarMessage: EventEmitter<{
|
|
48
49
|
message: string;
|
|
@@ -73,6 +74,8 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
73
74
|
expandedState: boolean[];
|
|
74
75
|
private youtubeUrlCache;
|
|
75
76
|
private newAssesseeSession;
|
|
77
|
+
private backGuardArmed;
|
|
78
|
+
private allowBackNavigation;
|
|
76
79
|
private _selectedTabIndex;
|
|
77
80
|
get selectedTabIndex(): number;
|
|
78
81
|
set selectedTabIndex(value: number);
|
|
@@ -81,6 +84,22 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
81
84
|
tooltipState: Record<number, boolean>;
|
|
82
85
|
isMobile: boolean;
|
|
83
86
|
onResize(): void;
|
|
87
|
+
/**
|
|
88
|
+
* While a proctoring session is running, warn the candidate before they refresh, close the tab, or
|
|
89
|
+
* navigate away. Browsers show their own generic "Leave site?" confirmation here — the message text
|
|
90
|
+
* cannot be customized for security reasons — so this only guarantees a prompt, not our wording.
|
|
91
|
+
*/
|
|
92
|
+
onBeforeUnload(event: BeforeUnloadEvent): void;
|
|
93
|
+
/**
|
|
94
|
+
* In-app Back button (SPA popstate — not caught by beforeunload). While proctoring runs we keep a
|
|
95
|
+
* sentinel history entry; when Back pops it we show a custom warning and either re-arm (stay) or
|
|
96
|
+
* proceed with the navigation (leave).
|
|
97
|
+
*/
|
|
98
|
+
onPopState(): void;
|
|
99
|
+
private isProctoringRunning;
|
|
100
|
+
/** Pushes a sentinel history entry so the next in-app Back press triggers our guard. */
|
|
101
|
+
private armBackGuard;
|
|
102
|
+
private confirmLeaveAssessment;
|
|
84
103
|
constructor(assessmentTakerService: AssessmentTakerService, fb: FormBuilder, responseBuilderService: ResponseBuilderService, sanitizer: DomSanitizer, dialog: MatDialog, cdr: ChangeDetectorRef, proctoringService: ProctoringService);
|
|
85
104
|
ngOnInit(): void;
|
|
86
105
|
ngOnDestroy(): void;
|
|
@@ -168,5 +187,5 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
168
187
|
trackByOptionId(index: number, option: any): string;
|
|
169
188
|
trackByChildId(index: number, id: any): string;
|
|
170
189
|
static ɵfac: i0.ɵɵFactoryDeclaration<AssessmentTakerComponent, never>;
|
|
171
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AssessmentTakerComponent, "lib-assessment-taker", never, { "labelConfig": "labelConfig"; "imageConfig": "imageConfig"; "showFooter": "showFooter"; "assessmentId": "assessmentId"; "assessmentInstanceId": "assessmentInstanceId"; "assesseeData": "assesseeData"; "assessorData": "assessorData"; "disabled": "disabled"; "previewMode": "previewMode"; "verticalView": "verticalView"; "enableMarks": "enableMarks"; "hideSectionTabs": "hideSectionTabs"; "assessmentContext": "assessmentContext"; "assesseeResponse": "assesseeResponse"; "markAsCompleted": "markAsCompleted"; "sectionWiseScore": "sectionWiseScore"; "showOverallRemarks": "showOverallRemarks"; "showCorrectAnswers": "showCorrectAnswers"; "resumeTimerAcrossVisits": "resumeTimerAcrossVisits"; "proctorLinkLoader": "proctorLinkLoader"; }, { "snackbarMessage": "snackbarMessage"; "submitAssessment": "submitAssessment"; "stepChanged": "stepChanged"; "consentToProceed": "consentToProceed"; }, never, never>;
|
|
190
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AssessmentTakerComponent, "lib-assessment-taker", never, { "labelConfig": "labelConfig"; "imageConfig": "imageConfig"; "showFooter": "showFooter"; "assessmentId": "assessmentId"; "assessmentInstanceId": "assessmentInstanceId"; "assesseeData": "assesseeData"; "assessorData": "assessorData"; "disabled": "disabled"; "previewMode": "previewMode"; "verticalView": "verticalView"; "enableMarks": "enableMarks"; "hideSectionTabs": "hideSectionTabs"; "assessmentContext": "assessmentContext"; "assesseeResponse": "assesseeResponse"; "markAsCompleted": "markAsCompleted"; "sectionWiseScore": "sectionWiseScore"; "showOverallRemarks": "showOverallRemarks"; "showCorrectAnswers": "showCorrectAnswers"; "resumeTimerAcrossVisits": "resumeTimerAcrossVisits"; "warnOnLeaveDuringProctoring": "warnOnLeaveDuringProctoring"; "proctorLinkLoader": "proctorLinkLoader"; }, { "snackbarMessage": "snackbarMessage"; "submitAssessment": "submitAssessment"; "stepChanged": "stepChanged"; "consentToProceed": "consentToProceed"; }, never, never>;
|
|
172
191
|
}
|
|
@@ -11,6 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class ProctoringService {
|
|
13
13
|
private session;
|
|
14
|
+
private offHandlers;
|
|
14
15
|
/**
|
|
15
16
|
* Creates a ProctorLink session with the given id + JWT and requests camera access.
|
|
16
17
|
* The returned observable completes once the candidate GRANTS camera access, and errors
|
|
@@ -22,6 +22,7 @@ export interface ProctoringSessionSummary {
|
|
|
22
22
|
endedAt?: number;
|
|
23
23
|
expiresAt?: number;
|
|
24
24
|
validatedAt?: number;
|
|
25
|
+
integritySummary?: IntegritySummary;
|
|
25
26
|
}
|
|
26
27
|
/** The proctoring report for a single session (fetched on demand by session id). */
|
|
27
28
|
export interface ProctoringReport {
|
|
@@ -92,3 +93,9 @@ export interface ProctoringPayload {
|
|
|
92
93
|
evidence?: ProctoringEvidence[];
|
|
93
94
|
timeline?: ProctoringTimelineEvent[];
|
|
94
95
|
}
|
|
96
|
+
export interface IntegritySummary {
|
|
97
|
+
proctoringSessionId?: number;
|
|
98
|
+
integrityScore?: number;
|
|
99
|
+
integrityLevel?: string;
|
|
100
|
+
integrityFlagged?: boolean;
|
|
101
|
+
}
|
package/package.json
CHANGED
|
@@ -102,6 +102,8 @@
|
|
|
102
102
|
"COMMONS_ASSESSMENT.PROCTORING.INTRO_MINUTES": "min",
|
|
103
103
|
"COMMONS_ASSESSMENT.PROCTORING.INTRO_WARNINGS_TITLE": "Please note",
|
|
104
104
|
"COMMONS_ASSESSMENT.PROCTORING.WARN_AUTO_SUBMIT": "This is a timed assessment — when the time runs out, your responses will be submitted automatically.",
|
|
105
|
+
"COMMONS_ASSESSMENT.PROCTORING.LEAVE_WARNING_TITLE": "Leave assessment?",
|
|
106
|
+
"COMMONS_ASSESSMENT.PROCTORING.LEAVE_WARNING_MESSAGE": "Proctoring is active. Leaving or navigating back may impact your final report. Do you wish to proceed?",
|
|
105
107
|
"COMMONS_ASSESSMENT.PROCTORING.WARN_ONE_ATTEMPT": "Complete the assessment in a single attempt — multiple attempts can impact your final score.",
|
|
106
108
|
"COMMONS_ASSESSMENT.PROCTORING.WARN_NO_TAB_SWITCH": "Do not switch tabs or leave the assessment window.",
|
|
107
109
|
"COMMONS_ASSESSMENT.PROCTORING.WARN_NO_REFRESH": "Do not refresh or close the page during the assessment.",
|
|
@@ -146,6 +148,7 @@
|
|
|
146
148
|
"COMMONS_ASSESSMENT.PROCTORING.EVENT.no_face.detected": "No face detected",
|
|
147
149
|
"COMMONS_ASSESSMENT.PROCTORING.EVENT.multi_face.detected": "Multiple faces detected",
|
|
148
150
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.browser_activity": "Browser activity",
|
|
151
|
+
"COMMONS_ASSESSMENT.PROCTORING.REASON.liveness_gap": "Liveness gap",
|
|
149
152
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.no_face": "No face detected",
|
|
150
153
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.multi_face": "Multiple faces detected",
|
|
151
154
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.impersonation": "Possible impersonation",
|
|
@@ -78,6 +78,12 @@ GLOBAL stylesheet for commons-assessment library
|
|
|
78
78
|
border-radius: var(--assessment-border-radius-two);
|
|
79
79
|
border: var(--assessment-input-border-one);
|
|
80
80
|
overflow: hidden;
|
|
81
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.angular-editor:focus-within {
|
|
85
|
+
border-color: var(--assessment-primary-one) !important;
|
|
86
|
+
box-shadow: var(--assessment-input-focus-box-shadow);
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
.angular-editor-textarea {
|
|
@@ -198,4 +204,16 @@ GLOBAL stylesheet for commons-assessment library
|
|
|
198
204
|
.mat-mdc-tab-header {
|
|
199
205
|
display: none !important;
|
|
200
206
|
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
input.assessment-input-border-one,
|
|
210
|
+
textarea.assessment-input-border-one {
|
|
211
|
+
transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
|
|
212
|
+
|
|
213
|
+
&:focus {
|
|
214
|
+
background-color: var(--assessment-white) !important;
|
|
215
|
+
border: var(--assessment-input-border-one) !important;
|
|
216
|
+
border-color: var(--assessment-primary-one) !important;
|
|
217
|
+
box-shadow: var(--assessment-input-focus-box-shadow);
|
|
218
|
+
}
|
|
201
219
|
}
|