commit
beb41430cf
|
@ -13,6 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { CoreLoggerProvider } from '@providers/logger';
|
||||
import { CoreSitesProvider } from '@providers/sites';
|
||||
import { CoreSite } from '@classes/site';
|
||||
|
@ -131,7 +132,8 @@ export class AddonCalendarProvider {
|
|||
|
||||
constructor(logger: CoreLoggerProvider, private sitesProvider: CoreSitesProvider, private groupsProvider: CoreGroupsProvider,
|
||||
private coursesProvider: CoreCoursesProvider, private timeUtils: CoreTimeUtilsProvider,
|
||||
private localNotificationsProvider: CoreLocalNotificationsProvider, private configProvider: CoreConfigProvider) {
|
||||
private localNotificationsProvider: CoreLocalNotificationsProvider, private configProvider: CoreConfigProvider,
|
||||
private translate: TranslateService) {
|
||||
this.logger = logger.getInstance('AddonCalendarProvider');
|
||||
this.sitesProvider.createTablesFromSchema(this.tablesSchema);
|
||||
}
|
||||
|
@ -460,6 +462,11 @@ export class AddonCalendarProvider {
|
|||
title: event.name,
|
||||
text: startDate.toLocaleString(),
|
||||
at: dateTriggered,
|
||||
channelParams: {
|
||||
channelID: 'notifications',
|
||||
channelName: this.translate.instant('addon.notifications.notifications'),
|
||||
importance: 4 // IMPORTANCE_HIGH
|
||||
},
|
||||
data: {
|
||||
eventid: event.id,
|
||||
siteid: siteId
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</ion-card>
|
||||
|
||||
<!-- List of user attempts. -->
|
||||
<ion-card class="addon-mod_quiz-table" *ngIf="attempts && attempts.length">
|
||||
<ion-card class="addon-mod_quiz-table" *ngIf="quiz && attempts && attempts.length">
|
||||
<ion-card-header text-wrap>
|
||||
<h2>{{ 'addon.mod_quiz.summaryofattempts' | translate }}</h2>
|
||||
</ion-card-header>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</ion-card>
|
||||
|
||||
<!-- Result info. -->
|
||||
<ion-card *ngIf="showResults && (gradeResult || gradeOverridden || gradebookFeedback || (quiz.showFeedbackColumn && overallFeedback))">
|
||||
<ion-card *ngIf="quiz && showResults && (gradeResult || gradeOverridden || gradebookFeedback || (quiz.showFeedbackColumn && overallFeedback))">
|
||||
<ion-list>
|
||||
<ion-item text-wrap *ngIf="gradeResult">{{ gradeResult }}</ion-item>
|
||||
<ion-item text-wrap *ngIf="gradeOverridden">{{ 'core.course.overriddennotice' | translate }}</ion-item>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable, NgZone } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Platform } from 'ionic-angular';
|
||||
import { Badge } from '@ionic-native/badge';
|
||||
import { Push, PushObject, PushOptions } from '@ionic-native/push';
|
||||
|
@ -65,7 +66,8 @@ export class AddonPushNotificationsProvider {
|
|||
protected pushNotificationsDelegate: AddonPushNotificationsDelegate, protected sitesProvider: CoreSitesProvider,
|
||||
private badge: Badge, private localNotificationsProvider: CoreLocalNotificationsProvider,
|
||||
private utils: CoreUtilsProvider, private textUtils: CoreTextUtilsProvider, private push: Push,
|
||||
private configProvider: CoreConfigProvider, private device: Device, private zone: NgZone) {
|
||||
private configProvider: CoreConfigProvider, private device: Device, private zone: NgZone,
|
||||
private translate: TranslateService) {
|
||||
this.logger = logger.getInstance('AddonPushNotificationsProvider');
|
||||
this.appDB = appProvider.getDB();
|
||||
this.appDB.createTablesFromSchema(this.tablesSchema);
|
||||
|
@ -154,6 +156,11 @@ export class AddonPushNotificationsProvider {
|
|||
const localNotif = {
|
||||
id: 1,
|
||||
at: new Date(),
|
||||
channelParams: {
|
||||
channelID: 'notifications',
|
||||
channelName: this.translate.instant('addon.notifications.notifications'),
|
||||
importance: 4 // IMPORTANCE_HIGH
|
||||
},
|
||||
data: {
|
||||
notif: data.notif,
|
||||
site: data.site
|
||||
|
|
|
@ -539,6 +539,7 @@ export class CoreQuestionHelperProvider {
|
|||
prepareAnswers(questions: any[], answers: any, offline?: boolean, siteId?: string): Promise<any> {
|
||||
const promises = [];
|
||||
|
||||
questions = questions || [];
|
||||
questions.forEach((question) => {
|
||||
promises.push(this.questionDelegate.prepareAnswersForQuestion(question, answers, offline, siteId));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue