MOBILE-3132 course: Fix errors when opening activities in offline
This commit is contained in:
		
							parent
							
								
									4c03c0174a
								
							
						
					
					
						commit
						23da8bf471
					
				| @ -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> | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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> | ||||
|  | ||||
| @ -113,9 +113,11 @@ export class AddonModFeedbackIndexComponent extends CoreCourseModuleMainActivity | ||||
|         super.ngOnInit(); | ||||
| 
 | ||||
|         this.loadContent(false, true).then(() => { | ||||
|             this.feedbackProvider.logView(this.feedback.id, this.feedback.name).catch(() => { | ||||
|                 // Ignore errors.
 | ||||
|             }); | ||||
|             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); | ||||
| 
 | ||||
|             // Check if there are responses stored in offline.
 | ||||
|             return this.feedbackOffline.hasFeedbackOfflineData(this.feedback.id).then((hasOffline) => { | ||||
|                 this.hasOffline = hasOffline; | ||||
|             }); | ||||
|             if (this.feedback) { | ||||
|                 // Check if there are responses stored in offline.
 | ||||
|                 return this.feedbackOffline.hasFeedbackOfflineData(this.feedback.id).then((hasOffline) => { | ||||
|                     this.hasOffline = hasOffline; | ||||
|                 }); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -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.", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user