commons-assessment 12.1.2-dev.1 → 12.1.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/README.md +9 -2
- package/bundles/commons-assessment.umd.js +174 -25
- package/bundles/commons-assessment.umd.js.map +1 -1
- package/esm2015/lib/modules/assessment-maker/assessment-maker.component.js +15 -3
- 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 +66 -2
- package/esm2015/lib/modules/assessment-maker/components/question-bank-picker/question-bank-picker.component.js +2 -2
- package/esm2015/lib/modules/assessment-maker/components/question-details/question-details.component.js +2 -2
- package/esm2015/lib/modules/assessment-maker/services/assessment-maker.service.js +18 -3
- package/esm2015/lib/modules/assessment-taker/assessment-taker.component.js +14 -2
- package/esm2015/lib/modules/assessment-taker/components/proctoring-consent/proctoring-consent.component.js +14 -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 +2 -2
- 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 +14 -2
- package/esm2015/lib/modules/assessment-taker/components/section-instructions/section-instructions.component.js +1 -1
- package/esm2015/lib/modules/assessment-taker/services/assessment-taker.service.js +15 -2
- package/esm2015/lib/modules/question-bank/question-bank.component.js +2 -2
- package/esm2015/lib/shared/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
- package/esm2015/lib/shared/components/skill-allocation/skill-allocation.component.js +1 -1
- package/esm2015/lib/shared/controllers.js +2 -2
- package/esm2015/lib/shared/pipes/order-by.pipe.js +4 -3
- package/fesm2015/commons-assessment.js +165 -27
- package/fesm2015/commons-assessment.js.map +1 -1
- package/lib/modules/assessment-maker/assessment-maker.component.d.ts +1 -0
- package/lib/modules/assessment-maker/components/assessment-builder/assessment-builder.component.d.ts +9 -0
- package/lib/modules/assessment-maker/services/assessment-maker.service.d.ts +3 -1
- package/lib/modules/assessment-taker/assessment-taker.component.d.ts +3 -0
- package/lib/modules/assessment-taker/components/question-type-short/question-type-short.component.d.ts +3 -0
- package/lib/modules/assessment-taker/services/assessment-taker.service.d.ts +18 -16
- package/package.json +1 -1
- package/src/lib/assets/images/info.svg +2 -2
- package/src/lib/assets/images/lock.svg +3 -0
- package/src/lib/assets/json/imageConfig.json +2 -1
- package/src/lib/assets/json/labelConfig.json +10 -2
- package/src/lib/assets/theme/_theme.global.scss +1 -0
- package/src/lib/assets/theme/styles.global.scss +12 -0
- package/src/lib/assets/theme/styles.scss +5 -0
|
@@ -55,6 +55,7 @@ export declare class AssessmentMakerComponent implements OnInit {
|
|
|
55
55
|
};
|
|
56
56
|
private readonly PROCTORING_CONFIG_KEY;
|
|
57
57
|
toggleDropdown(id: string, event?: Event): void;
|
|
58
|
+
onDocumentClick(event: MouseEvent): void;
|
|
58
59
|
closeAllDropdowns(): void;
|
|
59
60
|
constructor(assessmentMakerService: AssessmentMakerService, assessmentBuilderService: AssessmentBuilderService, dialog: MatDialog);
|
|
60
61
|
ngOnInit(): void;
|
package/lib/modules/assessment-maker/components/assessment-builder/assessment-builder.component.d.ts
CHANGED
|
@@ -39,9 +39,18 @@ export declare class AssessmentBuilderComponent implements OnInit {
|
|
|
39
39
|
standaloneMode: boolean;
|
|
40
40
|
isLocked: boolean;
|
|
41
41
|
isSubmitting: boolean;
|
|
42
|
+
mediaUploading: boolean;
|
|
43
|
+
mediaError: string;
|
|
42
44
|
skillsList: RefData[];
|
|
45
|
+
private readonly MAX_MEDIA_SIZE;
|
|
46
|
+
mediaFileInput: ElementRef;
|
|
43
47
|
constructor(formBuilder: FormBuilder, assessmentBuilderService: AssessmentBuilderService, assessmentMakerService: AssessmentMakerService, dialogRef: MatDialogRef<AssessmentBuilderComponent>, dialogData: any);
|
|
44
48
|
ngOnInit(): void;
|
|
49
|
+
triggerMediaUpload(): void;
|
|
50
|
+
onMediaFileSelected(event: any): void;
|
|
51
|
+
/** Shows the media error inline in the dialog and also surfaces it via the host snackbar. */
|
|
52
|
+
private setMediaError;
|
|
53
|
+
private uploadMedia;
|
|
45
54
|
generateChildQuestionList(): AssessmentQuestion[];
|
|
46
55
|
setupFormGroup(): void;
|
|
47
56
|
populateForm(questionDetails: AssessmentQuestion, buildChildGroups?: boolean): void;
|
|
@@ -4,11 +4,13 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class AssessmentMakerService {
|
|
5
5
|
private http;
|
|
6
6
|
private readonly assetsBaseUrl;
|
|
7
|
+
private configCache;
|
|
7
8
|
constructor(http: HttpClient);
|
|
8
9
|
private getHeaders;
|
|
9
10
|
createParams(params: any): HttpParams;
|
|
10
|
-
getConfigJSON(fileName: string): Observable<
|
|
11
|
+
getConfigJSON(fileName: string): Observable<any>;
|
|
11
12
|
getResponseCount(assessmentInstanceId: number): Observable<Object>;
|
|
13
|
+
uploadAttachment(fileUploadPayload: FormData, params: any): Observable<Object>;
|
|
12
14
|
createAssessmentAndQuestionPaper(payload: any): Observable<Object>;
|
|
13
15
|
patchAssessmentAndQuestionPaper(payload: any): Observable<Object>;
|
|
14
16
|
createQuestion(payload: any): Observable<Object>;
|
|
@@ -171,6 +171,9 @@ export declare class AssessmentTakerComponent implements OnInit, OnDestroy {
|
|
|
171
171
|
scrollToFirstInvalidField(sectionIndex: number): void;
|
|
172
172
|
save(goNext?: boolean, saveData?: boolean): void;
|
|
173
173
|
getAnswersByAiaId(assesseeId: number): void;
|
|
174
|
+
/** Question/section media can be an uploaded image, an uploaded/hosted video, or a YouTube link. */
|
|
175
|
+
isImageUrl(url: string): boolean;
|
|
176
|
+
isVideoUrl(url: string): boolean;
|
|
174
177
|
addYoutubeIframeSrc(videoUrl: string): any;
|
|
175
178
|
getVideoId(videoUrl: string): string | null;
|
|
176
179
|
openInstructionsDialog(section: QuestionPaperSection): void;
|
|
@@ -30,6 +30,9 @@ export declare class QuestionTypeShortComponent implements ControlValueAccessor
|
|
|
30
30
|
registerOnTouched(fn: Function): void;
|
|
31
31
|
setDisabledState(isDisabled: boolean): void;
|
|
32
32
|
get maxCharCount(): number;
|
|
33
|
+
get isUrlType(): boolean;
|
|
34
|
+
/** Absolute href for the preview link — prefixes `https://` when the value has no scheme. */
|
|
35
|
+
get linkHref(): string;
|
|
33
36
|
get inputType(): string;
|
|
34
37
|
restrictNumberOnly(event: KeyboardEvent): void;
|
|
35
38
|
preventScroll(event: WheelEvent): void;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class AssessmentTakerService {
|
|
4
5
|
private http;
|
|
5
6
|
private readonly assetsBaseUrl;
|
|
7
|
+
private configCache;
|
|
6
8
|
constructor(http: HttpClient);
|
|
7
9
|
private getHeaders;
|
|
8
10
|
createParams(params: any): HttpParams;
|
|
9
|
-
getConfigJSON(fileName: string):
|
|
10
|
-
getAssessmentContextById(params: any):
|
|
11
|
-
getAssessmentQuestionPaper(instanceId: number):
|
|
12
|
-
getAssessmentQuestions(instanceId: any, questionIds: any):
|
|
13
|
-
getChildQuestionsWithIdList(instanceId: any, questionIds: any):
|
|
14
|
-
uploadAttachment(fileUploadPayload: FormData, params: any):
|
|
15
|
-
getAttachments(params: any):
|
|
16
|
-
submitAssessment(payload: any):
|
|
17
|
-
patchAssessment(payload: any):
|
|
18
|
-
getAnswersByAiaId(aiaId: any):
|
|
19
|
-
updateMarks(payload: any):
|
|
20
|
-
refreshProctoringToken(assesseeId: number):
|
|
21
|
-
endProctoringSession(assesseeId: number):
|
|
22
|
-
getProctoringSessions(assesseeId: number, params: any):
|
|
23
|
-
getProctoringReportBySession(sessionId: number):
|
|
24
|
-
checkGoogleDriveLinkPublic(googleDriveLink: string):
|
|
11
|
+
getConfigJSON(fileName: string): Observable<any>;
|
|
12
|
+
getAssessmentContextById(params: any): Observable<Object>;
|
|
13
|
+
getAssessmentQuestionPaper(instanceId: number): Observable<Object>;
|
|
14
|
+
getAssessmentQuestions(instanceId: any, questionIds: any): Observable<Object>;
|
|
15
|
+
getChildQuestionsWithIdList(instanceId: any, questionIds: any): Observable<Object>;
|
|
16
|
+
uploadAttachment(fileUploadPayload: FormData, params: any): Observable<Object>;
|
|
17
|
+
getAttachments(params: any): Observable<Object>;
|
|
18
|
+
submitAssessment(payload: any): Observable<Object>;
|
|
19
|
+
patchAssessment(payload: any): Observable<Object>;
|
|
20
|
+
getAnswersByAiaId(aiaId: any): Observable<Object>;
|
|
21
|
+
updateMarks(payload: any): Observable<Object>;
|
|
22
|
+
refreshProctoringToken(assesseeId: number): Observable<Object>;
|
|
23
|
+
endProctoringSession(assesseeId: number): Observable<Object>;
|
|
24
|
+
getProctoringSessions(assesseeId: number, params: any): Observable<Object>;
|
|
25
|
+
getProctoringReportBySession(sessionId: number): Observable<Object>;
|
|
26
|
+
checkGoogleDriveLinkPublic(googleDriveLink: string): Observable<Object>;
|
|
25
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<AssessmentTakerService, never>;
|
|
26
28
|
static ɵprov: i0.ɵɵInjectableDeclaration<AssessmentTakerService>;
|
|
27
29
|
}
|
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
2
|
-
<path id="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="25.603" height="25.603" viewBox="0 0 25.603 25.603">
|
|
2
|
+
<path id="information" d="M12.05,20.538a.972.972,0,0,1-.612-.223.939.939,0,0,1-.334-.946l1.364-6.957-.751.417a.979.979,0,1,1-.974-1.7L13.33,9.657a.972.972,0,0,1,1.057.056,1.019,1.019,0,0,1,.39.974l-1.419,7.236,1.169-.5a.972.972,0,0,1,.779,1.781l-2.866,1.252A.889.889,0,0,1,12.05,20.538ZM14.8,7.236a1.417,1.417,0,0,0,.417-.974,1.305,1.305,0,0,0-.417-.974,1.417,1.417,0,0,0-.974-.417,1.305,1.305,0,0,0-.974.417,1.417,1.417,0,0,0-.417.974,1.305,1.305,0,0,0,.417.974,1.417,1.417,0,0,0,.974.417A1.305,1.305,0,0,0,14.8,7.236ZM25.6,12.8A12.8,12.8,0,1,0,12.8,25.6,12.8,12.8,0,0,0,25.6,12.8Zm-2.226,0A10.575,10.575,0,1,1,12.8,2.226,10.57,10.57,0,0,1,23.376,12.8Z" fill="#9aa0a6"/>
|
|
3
3
|
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8 11V7C8 5.93913 8.42143 4.92172 9.17157 4.17157C9.92172 3.42143 10.9391 3 12 3C13.0609 3 14.0783 3.42143 14.8284 4.17157C15.5786 4.92172 16 5.93913 16 7V11M5 13C5 12.4696 5.21071 11.9609 5.58579 11.5858C5.96086 11.2107 6.46957 11 7 11H17C17.5304 11 18.0391 11.2107 18.4142 11.5858C18.7893 11.9609 19 12.4696 19 13V19C19 19.5304 18.7893 20.0391 18.4142 20.4142C18.0391 20.7893 17.5304 21 17 21H7C6.46957 21 5.96086 20.7893 5.58579 20.4142C5.21071 20.0391 5 19.5304 5 19V13ZM11 16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16C13 15.7348 12.8946 15.4804 12.7071 15.2929C12.5196 15.1054 12.2652 15 12 15C11.7348 15 11.4804 15.1054 11.2929 15.2929C11.1054 15.4804 11 15.7348 11 16Z" stroke="#354052" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -26,5 +26,6 @@
|
|
|
26
26
|
"COMMONS_ASSESSMENT.ICON.USER": "assets/commons-assessment/images/user.svg",
|
|
27
27
|
"COMMONS_ASSESSMENT.ICON.ARROW_DOWN_BLUE": "assets/commons-assessment/images/arrow-down-blue.svg",
|
|
28
28
|
"COMMONS_ASSESSMENT.ICON.ARROW_UP_BLUE": "assets/commons-assessment/images/arrow-up-blue.svg",
|
|
29
|
-
"COMMONS_ASSESSMENT.ICON.FILE_IMPORT": "assets/commons-assessment/images/file-import.svg"
|
|
29
|
+
"COMMONS_ASSESSMENT.ICON.FILE_IMPORT": "assets/commons-assessment/images/file-import.svg",
|
|
30
|
+
"COMMONS_ASSESSMENT.ICON.LOCK": "assets/commons-assessment/images/lock.svg"
|
|
30
31
|
}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
"COMMONS_ASSESSMENT.LABEL.ADD_INSTRUCTIONS": "Add instructions",
|
|
6
6
|
"COMMONS_ASSESSMENT.LABEL.DUPLICATE": "Duplicate",
|
|
7
7
|
"COMMONS_ASSESSMENT.LABEL.DELETE": "Delete",
|
|
8
|
+
"COMMONS_ASSESSMENT.LABEL.UPLOAD_MEDIA": "Upload image / video",
|
|
9
|
+
"COMMONS_ASSESSMENT.LABEL.MEDIA_UPLOAD_HINT": "Image or video, up to 5 MB",
|
|
10
|
+
"COMMONS_ASSESSMENT.LABEL.OPEN_FULL_IMAGE": "Open full image in a new tab",
|
|
11
|
+
"COMMONS_ASSESSMENT.ERROR.INVALID_MEDIA_TYPE": "Only image or video files are allowed.",
|
|
8
12
|
"COMMONS_ASSESSMENT.LABEL.QUESTION": "Question",
|
|
9
13
|
"COMMONS_ASSESSMENT.LABEL.ADD_A_QUESTION": "Add a Question",
|
|
10
14
|
"COMMONS_ASSESSMENT.LABEL.ADD_A_SECTION": "Add a Section",
|
|
@@ -68,7 +72,7 @@
|
|
|
68
72
|
"COMMONS_ASSESSMENT.LABEL.READ_MORE": "Read more",
|
|
69
73
|
"COMMONS_ASSESSMENT.ERROR.INVALID_URL": "Please enter a valid URL",
|
|
70
74
|
"COMMONS_ASSESSMENT.PLACEHOLDER.ENTER_INSTRUCTIONS_MEDIA": "Enter video url for instructions",
|
|
71
|
-
"COMMONS_ASSESSMENT.PLACEHOLDER.ENTER_QUESTION_MEDIA": "Enter
|
|
75
|
+
"COMMONS_ASSESSMENT.PLACEHOLDER.ENTER_QUESTION_MEDIA": "Enter media url",
|
|
72
76
|
"COMMONS_ASSESSMENT.LABEL.NO_QUESTIONS": "No Data Found!",
|
|
73
77
|
"COMMONS_ASSESSMENT.LABEL.SUBMIT": "Submit",
|
|
74
78
|
"COMMONS_ASSESSMENT.LABEL.NEXT": "Next",
|
|
@@ -109,6 +113,7 @@
|
|
|
109
113
|
"COMMONS_ASSESSMENT.PROCTORING.WARN_NO_REFRESH": "Do not refresh or close the page during the assessment.",
|
|
110
114
|
"COMMONS_ASSESSMENT.PROCTORING.WARN_QUIET_ROOM": "Stay in a well-lit, quiet room and keep your face clearly visible.",
|
|
111
115
|
"COMMONS_ASSESSMENT.PROCTORING.CAMERA_DENIED": "Camera access is required for proctoring. Please allow camera access in your browser and try again.",
|
|
116
|
+
"COMMONS_ASSESSMENT.PROCTORING.REFERENCE_IMAGE_REJECTED": "We couldn't verify your photo — no clear face was detected. Please retake a clear, unobstructed photo of your face in good lighting.",
|
|
112
117
|
"COMMONS_ASSESSMENT.PROCTORING.SESSION_ERROR": "Could not start the proctoring session. Please try again.",
|
|
113
118
|
"COMMONS_ASSESSMENT.PROCTORING.RESULT_TITLE": "Proctoring report",
|
|
114
119
|
"COMMONS_ASSESSMENT.PROCTORING.VIEW_REPORT": "Proctoring report",
|
|
@@ -148,6 +153,7 @@
|
|
|
148
153
|
"COMMONS_ASSESSMENT.PROCTORING.EVENT.no_face.detected": "No face detected",
|
|
149
154
|
"COMMONS_ASSESSMENT.PROCTORING.EVENT.multi_face.detected": "Multiple faces detected",
|
|
150
155
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.browser_activity": "Browser activity",
|
|
156
|
+
"COMMONS_ASSESSMENT.PROCTORING.REASON.liveness_gap": "Liveness gap",
|
|
151
157
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.no_face": "No face detected",
|
|
152
158
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.multi_face": "Multiple faces detected",
|
|
153
159
|
"COMMONS_ASSESSMENT.PROCTORING.REASON.impersonation": "Possible impersonation",
|
|
@@ -216,5 +222,7 @@
|
|
|
216
222
|
"COMMONS_ASSESSMENT.LABEL.CLEAR_FILTERS": "Clear Filters",
|
|
217
223
|
"COMMONS_ASSESSMENT.LABEL.IMPORT_QUESTIONS_INTO_NEW_SECTION": "Import questions into a new section",
|
|
218
224
|
"COMMONS_ASSESSMENT.LABEL.CREATE_NEW_QUESTION": "Create New Question",
|
|
219
|
-
"COMMONS_ASSESSMENT.LABEL.ADD_QUESTION": "Add Question"
|
|
225
|
+
"COMMONS_ASSESSMENT.LABEL.ADD_QUESTION": "Add Question",
|
|
226
|
+
"COMMONS_ASSESSMENT.LABEL.LOADING": "Loading...",
|
|
227
|
+
"COMMONS_ASSESSMENT.LABEL.CLEAR_SEARCH": "Clear Search"
|
|
220
228
|
}
|
|
@@ -327,4 +327,16 @@ GLOBAL stylesheet for commons-assessment library
|
|
|
327
327
|
opacity: 1;
|
|
328
328
|
transform: translateY(0);
|
|
329
329
|
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
input.assessment-input-border-one,
|
|
333
|
+
textarea.assessment-input-border-one {
|
|
334
|
+
transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
|
|
335
|
+
|
|
336
|
+
&:focus {
|
|
337
|
+
background-color: var(--assessment-white) !important;
|
|
338
|
+
border: var(--assessment-input-border-one) !important;
|
|
339
|
+
border-color: var(--assessment-primary-one) !important;
|
|
340
|
+
box-shadow: var(--assessment-input-focus-box-shadow);
|
|
341
|
+
}
|
|
330
342
|
}
|