commit
938e04b836
|
@ -45,7 +45,7 @@
|
||||||
<core-format-text [text]=" competency.competency.description "></core-format-text>
|
<core-format-text [text]=" competency.competency.description "></core-format-text>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>{{ 'addon.competency.path' | translate }}</strong>:
|
<strong>{{ 'addon.competency.path' | translate }}</strong>
|
||||||
{{ competency.comppath.framework.name }}
|
{{ competency.comppath.framework.name }}
|
||||||
<span *ngFor="let ancestor of competency.comppath.ancestors">
|
<span *ngFor="let ancestor of competency.comppath.ancestors">
|
||||||
/ <a (click)="openCompetencySummary(ancestor.id)">{{ ancestor.name }}</a>
|
/ <a (click)="openCompetencySummary(ancestor.id)">{{ ancestor.name }}</a>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<core-format-text [text]="competency.competency.competency.description"></core-format-text>
|
<core-format-text [text]="competency.competency.competency.description"></core-format-text>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item text-wrap>
|
<ion-item text-wrap>
|
||||||
<strong>{{ 'addon.competency.path' | translate }}</strong>:
|
<strong>{{ 'addon.competency.path' | translate }}</strong>
|
||||||
{{ competency.competency.comppath.framework.name }}
|
{{ competency.competency.comppath.framework.name }}
|
||||||
<span *ngFor="let ancestor of competency.competency.comppath.ancestors">
|
<span *ngFor="let ancestor of competency.competency.comppath.ancestors">
|
||||||
/ <a (click)="openCompetencySummary(ancestor.id)">{{ ancestor.name }}</a>
|
/ <a (click)="openCompetencySummary(ancestor.id)">{{ ancestor.name }}</a>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<span *ngIf="coursemodules.length == 0">
|
<span *ngIf="coursemodules.length == 0">
|
||||||
{{ 'addon.competency.noactivities' | translate }}
|
{{ 'addon.competency.noactivities' | translate }}
|
||||||
</span>
|
</span>
|
||||||
<a ion-item text-wrap *ngFor="let activity of coursemodules" [href]="activity.url" [title]="activity.name">
|
<a ion-item text-wrap *ngFor="let activity of coursemodules" [href]="activity.url" [title]="activity.name" core-link capture="true">
|
||||||
<img item-start core-external-content [src]="activity.iconurl" alt="" role="presentation" *ngIf="activity.iconurl" class="core-module-icon">
|
<img item-start core-external-content [src]="activity.iconurl" alt="" role="presentation" *ngIf="activity.iconurl" class="core-module-icon">
|
||||||
<core-format-text [text]="activity.name"></core-format-text>
|
<core-format-text [text]="activity.name"></core-format-text>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<core-format-text [text]="competency.competency.description"></core-format-text>
|
<core-format-text [text]="competency.competency.description"></core-format-text>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item text-wrap>
|
<ion-item text-wrap>
|
||||||
<strong>{{ 'addon.competency.path' | translate }}</strong>:
|
<strong>{{ 'addon.competency.path' | translate }}</strong>
|
||||||
{{ competency.comppath.framework.name }}
|
{{ competency.comppath.framework.name }}
|
||||||
<span *ngFor="let ancestor of competency.comppath.ancestors">
|
<span *ngFor="let ancestor of competency.comppath.ancestors">
|
||||||
/ <a (click)="openCompetencySummary(ancestor.id)">{{ ancestor.name }}</a>
|
/ <a (click)="openCompetencySummary(ancestor.id)">{{ ancestor.name }}</a>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { Component, OnInit, NgZone } from '@angular/core';
|
import { Component, OnInit, NgZone } from '@angular/core';
|
||||||
import { Platform } from 'ionic-angular';
|
import { Platform, IonicApp } from 'ionic-angular';
|
||||||
import { StatusBar } from '@ionic-native/status-bar';
|
import { StatusBar } from '@ionic-native/status-bar';
|
||||||
import { CoreAppProvider } from '@providers/app';
|
import { CoreAppProvider } from '@providers/app';
|
||||||
import { CoreEventsProvider } from '@providers/events';
|
import { CoreEventsProvider } from '@providers/events';
|
||||||
|
@ -37,7 +37,7 @@ export class MoodleMobileApp implements OnInit {
|
||||||
constructor(private platform: Platform, statusBar: StatusBar, logger: CoreLoggerProvider, keyboard: Keyboard,
|
constructor(private platform: Platform, statusBar: StatusBar, logger: CoreLoggerProvider, keyboard: Keyboard,
|
||||||
private eventsProvider: CoreEventsProvider, private loginHelper: CoreLoginHelperProvider, private zone: NgZone,
|
private eventsProvider: CoreEventsProvider, private loginHelper: CoreLoginHelperProvider, private zone: NgZone,
|
||||||
private appProvider: CoreAppProvider, private langProvider: CoreLangProvider, private sitesProvider: CoreSitesProvider,
|
private appProvider: CoreAppProvider, private langProvider: CoreLangProvider, private sitesProvider: CoreSitesProvider,
|
||||||
private screenOrientation: ScreenOrientation) {
|
private screenOrientation: ScreenOrientation, app: IonicApp) {
|
||||||
this.logger = logger.getInstance('AppComponent');
|
this.logger = logger.getInstance('AppComponent');
|
||||||
|
|
||||||
platform.ready().then(() => {
|
platform.ready().then(() => {
|
||||||
|
@ -50,6 +50,12 @@ export class MoodleMobileApp implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
keyboard.hideFormAccessoryBar(false);
|
keyboard.hideFormAccessoryBar(false);
|
||||||
|
|
||||||
|
let desktopClass = this.appProvider.isDesktop() ? 'platform-desktop' : '';
|
||||||
|
desktopClass += this.appProvider.isMac() ? ' platform-mac' : '';
|
||||||
|
desktopClass += this.appProvider.isLinux() ? ' platform-linux' : '';
|
||||||
|
desktopClass += this.appProvider.isWindows() ? ' platform-windows' : '';
|
||||||
|
app.setElementClass(desktopClass, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -140,7 +146,18 @@ export class MoodleMobileApp implements OnInit {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.eventsProvider.on(CoreEventsProvider.LOGIN, () => {
|
this.eventsProvider.on(CoreEventsProvider.LOGIN, (data) => {
|
||||||
|
if (data.siteId) {
|
||||||
|
this.sitesProvider.getSite(data.siteId).then((site) => {
|
||||||
|
const info = site.getInfo();
|
||||||
|
if (info) {
|
||||||
|
// Add version classes to body.
|
||||||
|
this.removeVersionClass();
|
||||||
|
this.addVersionClass(this.sitesProvider.getReleaseNumber(info.release || ''));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
loadCustomStrings();
|
loadCustomStrings();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue