@sunbird-cb/consumption 0.0.96 → 0.0.97

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.
@@ -3252,31 +3252,38 @@
3252
3252
  */
3253
3253
  function (content) {
3254
3254
  return __awaiter(this, void 0, void 0, function () {
3255
- var enrolledCourse, enrolledCourseData, data, data;
3255
+ var urlData, enrolledCourse, enrolledCourseData, data, data;
3256
3256
  return __generator(this, function (_a) {
3257
3257
  switch (_a.label) {
3258
- case 0: return [4 /*yield*/, this.getEnrolledData(content.identifier)];
3259
- case 1:
3258
+ case 0:
3259
+ if (!content.externalId) return [3 /*break*/, 1];
3260
+ urlData = {
3261
+ url: "app/toc/ext/" + content.contentId,
3262
+ queryParams: { batchId: content.batchId },
3263
+ };
3264
+ return [2 /*return*/, urlData];
3265
+ case 1: return [4 /*yield*/, this.getEnrolledData(content.identifier)];
3266
+ case 2:
3260
3267
  enrolledCourse = _a.sent();
3261
- if (!(enrolledCourse && enrolledCourse.length)) return [3 /*break*/, 5];
3268
+ if (!(enrolledCourse && enrolledCourse.length)) return [3 /*break*/, 6];
3262
3269
  enrolledCourseData = enrolledCourse[0];
3263
3270
  if (!(enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.BLENDED_PROGRAM ||
3264
3271
  enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.INVITE_ONLY_PROGRAM ||
3265
3272
  enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.MODERATED_PROGRAM ||
3266
3273
  enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.BLENDED_PROGRAM ||
3267
- enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM)) return [3 /*break*/, 3];
3274
+ enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM)) return [3 /*break*/, 4];
3268
3275
  if (!this.isBatchInProgress(enrolledCourseData.batch)) {
3269
3276
  return [2 /*return*/, this.gotoTocPage(content)];
3270
3277
  }
3271
3278
  return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
3272
- case 2:
3279
+ case 3:
3273
3280
  data = _a.sent();
3274
3281
  return [2 /*return*/, data];
3275
- case 3: return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
3276
- case 4:
3282
+ case 4: return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
3283
+ case 5:
3277
3284
  data = _a.sent();
3278
3285
  return [2 /*return*/, data];
3279
- case 5: return [2 /*return*/, this.gotoTocPage(content)];
3286
+ case 6: return [2 /*return*/, this.gotoTocPage(content)];
3280
3287
  }
3281
3288
  });
3282
3289
  });