Merge pull request #2130 from dpalou/MOBILE-3132

MOBILE-3132 course: Fix errors when opening activities in offline
main
Juan Leyva 2019-10-22 15:56:45 +02:00 committed by GitHub
commit 0d945fa8ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 11 deletions

View File

@ -18,7 +18,7 @@
<ion-icon name="time"></ion-icon> {{ 'addon.mod_chat.sessionstart' | translate:{$a: chatInfo} }}
</ion-card>
<div padding>
<div padding *ngIf="chat">
<a ion-button block color="primary" (click)="enterChat()">{{ 'addon.mod_chat.enterchat' | translate }}</a>
<a ion-button block color="light" margin-top *ngIf="sessionsAvailable" (click)="viewSessions()">{{ 'addon.mod_chat.viewreport' | translate }}</a>
</div>

View File

@ -47,7 +47,7 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
timeAvailableFromReadable: string | boolean;
timeAvailableTo: number | boolean;
timeAvailableToReadable: string | boolean;
isEmpty = false;
isEmpty = true;
groupInfo: CoreGroupInfo;
entries = [];
firstEntry = false;

View File

@ -37,7 +37,7 @@
</core-tabs>
</ng-container>
<ng-container *ngIf="!showTabs">
<ng-container *ngIf="feedback && !showTabs">
<ng-container *ngTemplateOutlet="tabOverview"></ng-container>
</ng-container>
</core-loading>

View File

@ -113,9 +113,11 @@ export class AddonModFeedbackIndexComponent extends CoreCourseModuleMainActivity
super.ngOnInit();
this.loadContent(false, true).then(() => {
if (this.feedback) {
this.feedbackProvider.logView(this.feedback.id, this.feedback.name).catch(() => {
// Ignore errors.
});
}
}).finally(() => {
this.tabsReady = true;
});
@ -199,10 +201,12 @@ export class AddonModFeedbackIndexComponent extends CoreCourseModuleMainActivity
// Now fill the context menu.
this.fillContextMenu(refresh);
if (this.feedback) {
// Check if there are responses stored in offline.
return this.feedbackOffline.hasFeedbackOfflineData(this.feedback.id).then((hasOffline) => {
this.hasOffline = hasOffline;
});
}
});
}

View File

@ -1316,7 +1316,7 @@
"core.back": "Back",
"core.block.blocks": "Blocks",
"core.cancel": "Cancel",
"core.cannotconnect": "Cannot connect: Verify that you have correctly typed the URL and that your site uses Moodle 2.4 or later.",
"core.cannotconnect": "Cannot connect: Verify that you have correctly typed the URL and that your site uses Moodle 3.1 or later.",
"core.cannotdownloadfiles": "File downloading is disabled. Please contact your site administrator.",
"core.captureaudio": "Record audio",
"core.capturedimage": "Taken picture.",