Merge pull request #2552 from crazyserver/MOBILE-3523
MOBILE-3469 course: Remove unused propertymain
commit
8d95636690
|
@ -985,6 +985,7 @@ export class CoreCourseProvider {
|
||||||
await this.sitePluginsProvider.waitFetchPlugins();
|
await this.sitePluginsProvider.waitFetchPlugins();
|
||||||
|
|
||||||
if (typeof course.format == 'undefined') {
|
if (typeof course.format == 'undefined') {
|
||||||
|
// This block can be replaced by a call to CourseHelper.getCourse(), but it is circular dependant.
|
||||||
const coursesProvider = CoreCourses.instance;
|
const coursesProvider = CoreCourses.instance;
|
||||||
try {
|
try {
|
||||||
course = await coursesProvider.getUserCourse(course.id, true);
|
course = await coursesProvider.getUserCourse(course.id, true);
|
||||||
|
|
|
@ -24,7 +24,6 @@ import { CoreCoursesProvider } from '../../providers/courses';
|
||||||
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
|
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
|
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
|
||||||
import { CoreCourseFormatDelegate } from '@core/course/providers/format-delegate';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page that allows "previewing" a course and enrolling in it if enabled and not enrolled.
|
* Page that allows "previewing" a course and enrolling in it if enabled and not enrolled.
|
||||||
|
@ -64,13 +63,23 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy {
|
||||||
protected currentInstanceId: number;
|
protected currentInstanceId: number;
|
||||||
protected courseStatusObserver;
|
protected courseStatusObserver;
|
||||||
|
|
||||||
constructor(private navCtrl: NavController, navParams: NavParams, private sitesProvider: CoreSitesProvider,
|
constructor(
|
||||||
private domUtils: CoreDomUtilsProvider, private textUtils: CoreTextUtilsProvider, appProvider: CoreAppProvider,
|
protected navCtrl: NavController,
|
||||||
private coursesProvider: CoreCoursesProvider, private platform: Platform, private modalCtrl: ModalController,
|
navParams: NavParams,
|
||||||
private translate: TranslateService, private eventsProvider: CoreEventsProvider,
|
protected sitesProvider: CoreSitesProvider,
|
||||||
private courseOptionsDelegate: CoreCourseOptionsDelegate, private courseHelper: CoreCourseHelperProvider,
|
protected domUtils: CoreDomUtilsProvider,
|
||||||
private courseProvider: CoreCourseProvider, private courseFormatDelegate: CoreCourseFormatDelegate,
|
protected textUtils: CoreTextUtilsProvider,
|
||||||
private zone: NgZone) {
|
appProvider: CoreAppProvider,
|
||||||
|
protected coursesProvider: CoreCoursesProvider,
|
||||||
|
protected platform: Platform,
|
||||||
|
protected modalCtrl: ModalController,
|
||||||
|
protected translate: TranslateService,
|
||||||
|
protected eventsProvider: CoreEventsProvider,
|
||||||
|
protected courseOptionsDelegate: CoreCourseOptionsDelegate,
|
||||||
|
protected courseHelper: CoreCourseHelperProvider,
|
||||||
|
protected courseProvider: CoreCourseProvider,
|
||||||
|
protected zone: NgZone
|
||||||
|
) {
|
||||||
|
|
||||||
this.course = navParams.get('course');
|
this.course = navParams.get('course');
|
||||||
this.avoidOpenCourse = navParams.get('avoidOpenCourse');
|
this.avoidOpenCourse = navParams.get('avoidOpenCourse');
|
||||||
|
|
Loading…
Reference in New Issue