Skip to content

Commit

Permalink
Issue #SH-883 merge: Merge pull request #1180 from balakrishna10/rele…
Browse files Browse the repository at this point in the history
…ase-3.1.0

Issue #SH-883 fix: Course completion certificate issue
  • Loading branch information
AmiableAnil authored Jul 31, 2020
2 parents d659fdb + 50ed0d0 commit 1215f48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,11 @@ describe('EnrolledCourseDetailsPage', () => {
const batchId = 'sample-batch-id';
const batchStatus = 2;
mockPreferences.putString = jest.fn(() => of());
enrolledCourseDetailsPage.courseHeirarchy = {
contentData: {
leafNodes: ['node1']
}
};
// act
enrolledCourseDetailsPage.saveContentContext(userId, courseId, batchId, batchStatus);
// assert
Expand Down Expand Up @@ -1102,7 +1107,7 @@ describe('EnrolledCourseDetailsPage', () => {
enrolledCourseDetailsPage.getContentState(false);
// assert
setTimeout(() => {
expect(enrolledCourseDetailsPage.courseCardData.progress).toEqual(1);
expect(enrolledCourseDetailsPage.courseCardData.progress).toBeUndefined();
done();
}, 0);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,8 @@ export class EnrolledCourseDetailsPage implements OnInit, OnDestroy {
contentContextMap['courseId'] = courseId;
contentContextMap['batchId'] = batchId;
contentContextMap['isCertified'] = this.isCertifiedCourse;
const leafNodeIds = this.getLeafNodeIdsWithoutDuplicates([this.courseHeirarchy]);
// const leafNodeIds = this.getLeafNodeIdsWithoutDuplicates([this.courseHeirarchy]);
const leafNodeIds = this.courseHeirarchy.contentData.leafNodes;
contentContextMap['leafNodeIds'] = leafNodeIds;
if (batchStatus) {
contentContextMap['batchStatus'] = batchStatus;
Expand Down

0 comments on commit 1215f48

Please sign in to comment.