commons-assessment 12.0.39-dev.0 → 12.0.39-dev.2
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/bundles/commons-assessment.umd.js +154 -69
- package/bundles/commons-assessment.umd.js.map +1 -1
- package/esm2015/lib/modules/assessment-taker/assessment-taker.component.js +80 -2
- package/esm2015/lib/modules/assessment-taker/components/proctoring-result/proctoring-result.component.js +2 -2
- package/esm2015/lib/modules/assessment-taker/services/proctoring.service.js +16 -8
- package/esm2015/lib/shared/interfaces/proctoring.interface.js +1 -1
- package/fesm2015/commons-assessment.js +145 -60
- package/fesm2015/commons-assessment.js.map +1 -1
- package/lib/modules/assessment-taker/assessment-taker.component.d.ts +18 -0
- package/lib/modules/assessment-taker/services/proctoring.service.d.ts +4 -1
- package/lib/shared/interfaces/proctoring.interface.d.ts +7 -0
- package/package.json +1 -1
- package/src/lib/assets/json/labelConfig.json +2 -0
|
@@ -73,6 +73,8 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
73
73
|
expandedState: boolean[];
|
|
74
74
|
private youtubeUrlCache;
|
|
75
75
|
private newAssesseeSession;
|
|
76
|
+
private backGuardArmed;
|
|
77
|
+
private allowBackNavigation;
|
|
76
78
|
private _selectedTabIndex;
|
|
77
79
|
get selectedTabIndex(): number;
|
|
78
80
|
set selectedTabIndex(value: number);
|
|
@@ -81,6 +83,22 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
81
83
|
tooltipState: Record<number, boolean>;
|
|
82
84
|
isMobile: boolean;
|
|
83
85
|
onResize(): void;
|
|
86
|
+
/**
|
|
87
|
+
* While a proctoring session is running, warn the candidate before they refresh, close the tab, or
|
|
88
|
+
* navigate away. Browsers show their own generic "Leave site?" confirmation here — the message text
|
|
89
|
+
* cannot be customized for security reasons — so this only guarantees a prompt, not our wording.
|
|
90
|
+
*/
|
|
91
|
+
onBeforeUnload(event: BeforeUnloadEvent): void;
|
|
92
|
+
/**
|
|
93
|
+
* In-app Back button (SPA popstate — not caught by beforeunload). While proctoring runs we keep a
|
|
94
|
+
* sentinel history entry; when Back pops it we show a custom warning and either re-arm (stay) or
|
|
95
|
+
* proceed with the navigation (leave).
|
|
96
|
+
*/
|
|
97
|
+
onPopState(): void;
|
|
98
|
+
private isProctoringRunning;
|
|
99
|
+
/** Pushes a sentinel history entry so the next in-app Back press triggers our guard. */
|
|
100
|
+
private armBackGuard;
|
|
101
|
+
private confirmLeaveAssessment;
|
|
84
102
|
constructor(assessmentTakerService: AssessmentTakerService, fb: FormBuilder, responseBuilderService: ResponseBuilderService, sanitizer: DomSanitizer, dialog: MatDialog, cdr: ChangeDetectorRef, proctoringService: ProctoringService);
|
|
85
103
|
ngOnInit(): void;
|
|
86
104
|
ngOnDestroy(): void;
|
|
@@ -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
|
|
@@ -31,7 +32,9 @@ export declare class ProctoringService {
|
|
|
31
32
|
/** End capture and flush pending data. */
|
|
32
33
|
stop(): void;
|
|
33
34
|
/** Tear down and remove the camera preview. */
|
|
34
|
-
destroy(
|
|
35
|
+
destroy(params?: {
|
|
36
|
+
endSession: boolean;
|
|
37
|
+
}): void;
|
|
35
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProctoringService, never>;
|
|
36
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<ProctoringService>;
|
|
37
40
|
}
|
|
@@ -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.",
|