Merge pull request #1600 from crazyserver/MOBILE-2722
MOBILE-2722 dashboard: Fix dashboard for 3.1main
commit
321af91cb3
|
@ -40,8 +40,10 @@ export class AddonBlockTimelineHandler extends CoreBlockBaseHandler {
|
|||
* @return {boolean} Whether or not the handler is enabled on a site level.
|
||||
*/
|
||||
isEnabled(): boolean | Promise<boolean> {
|
||||
return this.timelineProvider.isAvailable() && (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6') ||
|
||||
!this.coursesProvider.isMyCoursesDisabledInSite());
|
||||
return this.timelineProvider.isAvailable().then((enabled) => {
|
||||
return enabled && (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6') ||
|
||||
!this.coursesProvider.isMyCoursesDisabledInSite());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -218,7 +218,8 @@ export class AddonBlockTimelineProvider {
|
|||
*/
|
||||
isAvailable(siteId?: string): Promise<boolean> {
|
||||
return this.sitesProvider.getSite(siteId).then((site) => {
|
||||
return site.wsAvailable('core_calendar_get_action_events_by_courses');
|
||||
return site.wsAvailable('core_calendar_get_action_events_by_courses') &&
|
||||
site.wsAvailable('core_calendar_get_action_events_by_timesort');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ ion-app.app-root {
|
|||
}
|
||||
|
||||
input {
|
||||
@include text-align('end');
|
||||
@include text-align('start');
|
||||
@include rtl() {
|
||||
text-align: right;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ export class CoreSiteHomeIndexComponent implements OnInit {
|
|||
hasSupportedBlock: boolean;
|
||||
items: any[] = [];
|
||||
siteHomeId: number;
|
||||
blocks: any[];
|
||||
blocks = [];
|
||||
|
||||
constructor(private domUtils: CoreDomUtilsProvider, private sitesProvider: CoreSitesProvider,
|
||||
private courseProvider: CoreCourseProvider, private courseHelper: CoreCourseHelperProvider,
|
||||
|
|
Loading…
Reference in New Issue