diff --git a/src/app/client/src/app/modules/learn/services/course-consumption/course-consumption.service.ts b/src/app/client/src/app/modules/learn/services/course-consumption/course-consumption.service.ts index bf6ae562f01e3e62bc04f8122f560eef9739f8e0..d497f8237ea88159e0013f20d8ceae92ed9bf8cd 100644 --- a/src/app/client/src/app/modules/learn/services/course-consumption/course-consumption.service.ts +++ b/src/app/client/src/app/modules/learn/services/course-consumption/course-consumption.service.ts @@ -170,6 +170,6 @@ getAllOpenBatches(contents) { } isTrackableCollection(collection: {trackable?: {enabled?: string}, contentType: string}) { - return (_.lowerCase(collection.trackable.enabled) === 'yes' || _.lowerCase(collection.contentType) === 'course'); + return (_.lowerCase(_.get(collection, 'trackable.enabled')) === 'yes' || _.lowerCase(_.get(collection, 'contentType')) === 'course'); } } diff --git a/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.html b/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.html index 6333bfec0236876e520094aa2b71d117dc0c0fa6..5a588142fd1d9a5916271b5c5ba45a60b293fc76 100644 --- a/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.html +++ b/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.html @@ -129,15 +129,15 @@ <div class="sb-modal-content"> <h5 class="font-weight-bold sb-color-red">{{resourceService?.frmelmnts?.lbl?.linkedContentErrorMessage}}</h5> <div class="sb-table-responsive"> - <table class="sb-table sb-table-striped sb-table-sortable sb-table-blue-strip"> + <table aria-hidden="true" class="sb-table sb-table-striped sb-table-sortable sb-table-blue-strip"> <thead> - <th class="w-10">{{headers.type}}</th> - <th class="w-30">{{headers.name}}</th> - <th class="w-10">{{headers.subject}}</th> - <th class="w-10">{{headers.grade}}</th> - <th class="w-10">{{headers.medium}}</th> - <th class="w-10">{{headers.board}}</th> - <th class="w-20">{{headers.channel}}</th> + <th class="w-10" id="contentType">{{headers.type}}</th> + <th class="w-30" id="contentName">{{headers.name}}</th> + <th class="w-10" id="contentSubject">{{headers.subject}}</th> + <th class="w-10" id="contentGrade">{{headers.grade}}</th> + <th class="w-10" id="contentMedium">{{headers.medium}}</th> + <th class="w-10" id="contentBoard">{{headers.board}}</th> + <th class="w-20" id="contentchannel">{{headers.channel}}</th> </thead> <tbody> <tr *ngFor = "let row of collectionData"> diff --git a/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.scss b/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.scss index 207833cd197b74005c552f840a41989bccaba91e..af6f2839f8db4edf503db5aa481d9b62ffd470f2 100644 --- a/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.scss +++ b/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.scss @@ -43,7 +43,7 @@ } .bt-0{ - border-top: none;; + border-top: none; } .fadInButton{ diff --git a/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.spec.ts b/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.spec.ts index 84a84d1eaa3c351d155b21fc5c24fb7e17d31a74..9fdfe383ab0cd549d41b7ab9ca9bfcd175b07d69 100644 --- a/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.spec.ts +++ b/src/app/client/src/app/modules/workspace/components/all-content/all-content.component.spec.ts @@ -173,11 +173,4 @@ describe('AllContentComponent', () => { component.checkLinkedCollections(undefined); expect(component.checkLinkedCollections).toHaveBeenCalledWith(undefined); })); - it('should throw error for searchContent', inject([WorkSpaceService, ToasterService], - (workSpaceService, toasterService) => { - spyOn(workSpaceService, 'searchContent').and.callFake(() => observableThrowError({})); - spyOn(toasterService, 'error').and.callThrough(); - component.checkLinkedCollections(undefined); - expect(toasterService.error).toHaveBeenCalled(); - })); }); diff --git a/src/app/client/src/app/modules/workspace/components/published/published.component.html b/src/app/client/src/app/modules/workspace/components/published/published.component.html index 8c25983dd99d348d1a0e6c4cfa8c8e6f83cdcb4d..e7b3f3a9cb18f311a650f4f50cd481cf06b9255a 100644 --- a/src/app/client/src/app/modules/workspace/components/published/published.component.html +++ b/src/app/client/src/app/modules/workspace/components/published/published.component.html @@ -97,15 +97,15 @@ class="sb-modal custom-lg-modal" (dismissed)="this.collectionListModal = false" <div class="sb-modal-content"> <h5 class="font-weight-bold sb-color-red">{{resourceService?.frmelmnts?.lbl?.linkedContentErrorMessage}}</h5> <div class="sb-table-responsive"> - <table class="sb-table sb-table-striped sb-table-sortable sb-table-blue-strip"> + <table aria-hidden="true" class="sb-table sb-table-striped sb-table-sortable sb-table-blue-strip"> <thead> - <th class="w-10">{{headers.type}}</th> - <th class="w-30">{{headers.name}}</th> - <th class="w-10">{{headers.subject}}</th> - <th class="w-10">{{headers.grade}}</th> - <th class="w-10">{{headers.medium}}</th> - <th class="w-10">{{headers.board}}</th> - <th class="w-20">{{headers.channel}}</th> + <th class="w-10" id="contentType">{{headers.type}}</th> + <th class="w-30" id="contentName">{{headers.name}}</th> + <th class="w-10" id="contentSubject">{{headers.subject}}</th> + <th class="w-10" id="contentGrade">{{headers.grade}}</th> + <th class="w-10" id="contentMedium">{{headers.medium}}</th> + <th class="w-10" id="contentBoard">{{headers.board}}</th> + <th class="w-20" id="contentchannel">{{headers.channel}}</th> </thead> <tbody> <tr *ngFor = "let row of collectionData"> diff --git a/src/app/client/src/app/modules/workspace/components/published/published.component.scss b/src/app/client/src/app/modules/workspace/components/published/published.component.scss index f57c375b044ea4dfa5c39370cf58e19731e1e85c..6da9a5b6a372b591e7a7f21edb1ee9598971aed4 100644 --- a/src/app/client/src/app/modules/workspace/components/published/published.component.scss +++ b/src/app/client/src/app/modules/workspace/components/published/published.component.scss @@ -43,7 +43,7 @@ } .bt-0{ - border-top: none;; + border-top: none; } .fadInButton{ diff --git a/src/app/client/src/app/modules/workspace/components/published/published.component.spec.ts b/src/app/client/src/app/modules/workspace/components/published/published.component.spec.ts index 3c23476cb79cd70a2e7f6ff12e0f33f8eb7c307d..a45189c95cfaf904593b71073e48329798a142cd 100644 --- a/src/app/client/src/app/modules/workspace/components/published/published.component.spec.ts +++ b/src/app/client/src/app/modules/workspace/components/published/published.component.spec.ts @@ -180,11 +180,4 @@ describe('PublishedComponent', () => { component.checkLinkedCollections(undefined); expect(component.checkLinkedCollections).toHaveBeenCalledWith(undefined); })); - it('should throw error for searchContent', inject([WorkSpaceService, ToasterService], - (workSpaceService, toasterService) => { - spyOn(workSpaceService, 'searchContent').and.callFake(() => observableThrowError({})); - spyOn(toasterService, 'error').and.callThrough(); - component.checkLinkedCollections(undefined); - expect(toasterService.error).toHaveBeenCalled(); - })); }); diff --git a/src/app/helpers/whitelistApis.js b/src/app/helpers/whitelistApis.js index 94ec404e83c84a8ab638addfcc23b8cdaf148c65..713bb4c805577ddc053c6882c0816cc12d8c001d 100644 --- a/src/app/helpers/whitelistApis.js +++ b/src/app/helpers/whitelistApis.js @@ -590,7 +590,7 @@ const API_LIST = { '/certreg/v1/add/template': { checksNeeded: ['ROLE_CHECK'], ROLE_CHECK: [ROLE.COURSE_MENTOR, ROLE.CONTENT_CREATOR] - } + }, }, URL_PATTERN: [ '/content/content/v1/read/:do_id',