MOBILE-3469 course: Remove unused property

main
Pau Ferrer Ocaña 2020-09-29 09:44:28 +02:00
parent ad2b5c4529
commit ce9ec993c5
2 changed files with 18 additions and 8 deletions

View File

@ -985,6 +985,7 @@ export class CoreCourseProvider {
await this.sitePluginsProvider.waitFetchPlugins();
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;
try {
course = await coursesProvider.getUserCourse(course.id, true);

View File

@ -24,7 +24,6 @@ import { CoreCoursesProvider } from '../../providers/courses';
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
import { CoreCourseProvider } from '@core/course/providers/course';
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.
@ -64,13 +63,23 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy {
protected currentInstanceId: number;
protected courseStatusObserver;
constructor(private navCtrl: NavController, navParams: NavParams, private sitesProvider: CoreSitesProvider,
private domUtils: CoreDomUtilsProvider, private textUtils: CoreTextUtilsProvider, appProvider: CoreAppProvider,
private coursesProvider: CoreCoursesProvider, private platform: Platform, private modalCtrl: ModalController,
private translate: TranslateService, private eventsProvider: CoreEventsProvider,
private courseOptionsDelegate: CoreCourseOptionsDelegate, private courseHelper: CoreCourseHelperProvider,
private courseProvider: CoreCourseProvider, private courseFormatDelegate: CoreCourseFormatDelegate,
private zone: NgZone) {
constructor(
protected navCtrl: NavController,
navParams: NavParams,
protected sitesProvider: CoreSitesProvider,
protected domUtils: CoreDomUtilsProvider,
protected textUtils: CoreTextUtilsProvider,
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.avoidOpenCourse = navParams.get('avoidOpenCourse');