@sunbird-cb/toc 0.35.15 → 0.36.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.
|
@@ -24259,40 +24259,35 @@ class AppTocHomeV2Component {
|
|
|
24259
24259
|
}
|
|
24260
24260
|
openPublicSurveyPopup(navigationUrl, queryParams) {
|
|
24261
24261
|
// Get survey ID and course ID from environment and content data
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24276
|
-
|
|
24277
|
-
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
|
|
24281
|
-
|
|
24282
|
-
|
|
24283
|
-
|
|
24284
|
-
|
|
24285
|
-
|
|
24286
|
-
|
|
24287
|
-
|
|
24288
|
-
if (result) {
|
|
24289
|
-
// Navigate to the intended URL only when survey is submitted successfully
|
|
24290
|
-
if (navigationUrl) {
|
|
24291
|
-
this.router.navigate([navigationUrl], { queryParams: queryParams });
|
|
24292
|
-
}
|
|
24262
|
+
const surveyId = this.environment.publicContentSurveyId || '';
|
|
24263
|
+
const courseId = this.contentReadData?.identifier || '';
|
|
24264
|
+
const courseName = this.contentReadData?.name || '';
|
|
24265
|
+
const contextOrgId = this.contentReadData?.createdFor && this.contentReadData?.createdFor.length > 0 ?
|
|
24266
|
+
this.contentReadData?.createdFor[0] : '';
|
|
24267
|
+
this.clearExistingPublicSurveyData(surveyId, courseId);
|
|
24268
|
+
const data = {
|
|
24269
|
+
surveyId: surveyId,
|
|
24270
|
+
courseId: courseId,
|
|
24271
|
+
courseName: courseName,
|
|
24272
|
+
contextOrgId: contextOrgId,
|
|
24273
|
+
forPreview: this.forPreview
|
|
24274
|
+
};
|
|
24275
|
+
const dialogRef = this.dialog.open(PublicSurveyFormComponent, {
|
|
24276
|
+
// disableClose: true,
|
|
24277
|
+
width: '750px',
|
|
24278
|
+
maxWidth: '90vw',
|
|
24279
|
+
height: '80vh',
|
|
24280
|
+
data: data,
|
|
24281
|
+
autoFocus: false,
|
|
24282
|
+
});
|
|
24283
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
24284
|
+
if (result) {
|
|
24285
|
+
// Navigate to the intended URL only when survey is submitted successfully
|
|
24286
|
+
if (navigationUrl) {
|
|
24287
|
+
this.router.navigate([navigationUrl], { queryParams: queryParams });
|
|
24293
24288
|
}
|
|
24294
|
-
}
|
|
24295
|
-
}
|
|
24289
|
+
}
|
|
24290
|
+
});
|
|
24296
24291
|
}
|
|
24297
24292
|
resumeContentData() {
|
|
24298
24293
|
const navigationUrl = (this.resumeData && !this.certData) ? this.resumeDataLink?.url : this.firstResourceLink?.url;
|