@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
- if (this.forPreview) {
24263
- this.router.navigate([navigationUrl], { queryParams: queryParams });
24264
- }
24265
- else {
24266
- const surveyId = this.environment.publicContentSurveyId || '';
24267
- const courseId = this.contentReadData?.identifier || '';
24268
- const courseName = this.contentReadData?.name || '';
24269
- const contextOrgId = this.contentReadData?.createdFor && this.contentReadData?.createdFor.length > 0 ?
24270
- this.contentReadData?.createdFor[0] : '';
24271
- this.clearExistingPublicSurveyData(surveyId, courseId);
24272
- const data = {
24273
- surveyId: surveyId,
24274
- courseId: courseId,
24275
- courseName: courseName,
24276
- contextOrgId: contextOrgId,
24277
- forPreview: this.forPreview
24278
- };
24279
- const dialogRef = this.dialog.open(PublicSurveyFormComponent, {
24280
- // disableClose: true,
24281
- width: '750px',
24282
- maxWidth: '90vw',
24283
- height: '80vh',
24284
- data: data,
24285
- autoFocus: false,
24286
- });
24287
- dialogRef.afterClosed().subscribe((result) => {
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;