src/app/modules/core/services/course/course.service.ts
Service for course API calls.
Properties |
|
Methods |
|
constructor(userService: UserService, learnerService: LearnerService, config: ConfigService, contentService: ContentService)
|
||||||||||||||||||||
the "constructor"
Parameters :
|
findEnrolledCourses | ||||
findEnrolledCourses(courseId)
|
||||
Parameters :
Returns :
any
|
Public getCourseSection |
getCourseSection()
|
Returns :
any
|
Public getCourseSectionDetails |
getCourseSectionDetails()
|
Returns :
any
|
Public getEnrolledCourses |
getEnrolledCourses()
|
api call for enrolled courses.
Returns :
any
|
Public getQRCodeFile |
getQRCodeFile()
|
api call for getting course QR code CSV file.
Returns :
any
|
Public initialize |
initialize()
|
call enroll course api and subscribe. Behavior subject will emit enrolled course data
Returns :
void
|
Public setExtContentMsg | ||||||
setExtContentMsg(isExtContent: boolean)
|
||||||
Parameters :
Returns :
void
|
Public updateCourseProgress | ||||||||
updateCourseProgress(courseId, batchId, Progress)
|
||||||||
Parameters :
Returns :
void
|
_enrolledCourseData$ |
Default value : new BehaviorSubject<IEnrolledCourses>(undefined)
|
BehaviorSubject Containing enrolled courses. |
Private config |
Type : ConfigService
|
To get url, app configs. |
Public Readonly enrolledCourseData$ |
Type : Observable<IEnrolledCourses>
|
Default value : this._enrolledCourseData$.asObservable()
.pipe(skipWhile(data => data === undefined || data === null))
|
Read only observable Containing enrolled courses. |
Private enrolledCourses |
Type : Array<ICourses>
|
Private learnerService |
Type : LearnerService
|
To do learner service api call. |
Public revokeConsent |
Default value : new EventEmitter<void>()
|
sectionId |
Type : any
|
showExtContentMsg |
Default value : false
|
Notification message for external content onclick of Resume course button |
Private userService |
Type : UserService
|
To get details about user profile. |