commit
7b097320cd
|
@ -33,7 +33,7 @@
|
||||||
<!-- List of files. -->
|
<!-- List of files. -->
|
||||||
<ion-list *ngIf="files && files.length > 0">
|
<ion-list *ngIf="files && files.length > 0">
|
||||||
<ng-container *ngFor="let file of files">
|
<ng-container *ngFor="let file of files">
|
||||||
<ion-item button *ngIf="file.isdir" class="item-file" (click)="openFolder(file)">
|
<ion-item button *ngIf="file.isdir" class="item-file" (click)="openFolder(file)" detail="true">
|
||||||
<ion-thumbnail slot="start">
|
<ion-thumbnail slot="start">
|
||||||
<img [src]="file.imgPath" alt="" role="presentation">
|
<img [src]="file.imgPath" alt="" role="presentation">
|
||||||
</ion-thumbnail>
|
</ion-thumbnail>
|
||||||
|
|
|
@ -127,10 +127,6 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR
|
||||||
this.showCompletion ? CoreCourse.invalidateModule(this.module.id) : undefined,
|
this.showCompletion ? CoreCourse.invalidateModule(this.module.id) : undefined,
|
||||||
]));
|
]));
|
||||||
|
|
||||||
if (this.showCompletion) {
|
|
||||||
this.module = await CoreCourse.getModule(this.module.id, this.courseId);
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.loadContent(true, sync, showErrors);
|
await this.loadContent(true, sync, showErrors);
|
||||||
} finally {
|
} finally {
|
||||||
this.refreshIcon = CoreConstants.ICON_REFRESH;
|
this.refreshIcon = CoreConstants.ICON_REFRESH;
|
||||||
|
@ -205,6 +201,14 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (refresh && this.showCompletion) {
|
||||||
|
try {
|
||||||
|
this.module = await CoreCourse.getModule(this.module.id, this.courseId);
|
||||||
|
} catch {
|
||||||
|
// Ignore errors.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await this.fetchContent(refresh, sync, showErrors);
|
await this.fetchContent(refresh, sync, showErrors);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!refresh) {
|
if (!refresh) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class CoreFileUploaderAlbumHandlerService implements CoreFileUploaderHand
|
||||||
return {
|
return {
|
||||||
title: 'core.fileuploader.photoalbums',
|
title: 'core.fileuploader.photoalbums',
|
||||||
class: 'core-fileuploader-album-handler',
|
class: 'core-fileuploader-album-handler',
|
||||||
icon: 'images',
|
icon: 'images', // Cannot use font-awesome in action sheet.
|
||||||
action: async (
|
action: async (
|
||||||
maxSize?: number,
|
maxSize?: number,
|
||||||
upload?: boolean,
|
upload?: boolean,
|
||||||
|
|
|
@ -73,7 +73,7 @@ export class CoreFileUploaderAudioHandlerService implements CoreFileUploaderHand
|
||||||
return {
|
return {
|
||||||
title: 'core.fileuploader.audio',
|
title: 'core.fileuploader.audio',
|
||||||
class: 'core-fileuploader-audio-handler',
|
class: 'core-fileuploader-audio-handler',
|
||||||
icon: 'mic',
|
icon: 'mic', // Cannot use font-awesome in action sheet.
|
||||||
action: async (
|
action: async (
|
||||||
maxSize?: number,
|
maxSize?: number,
|
||||||
upload?: boolean,
|
upload?: boolean,
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class CoreFileUploaderCameraHandlerService implements CoreFileUploaderHan
|
||||||
return {
|
return {
|
||||||
title: 'core.fileuploader.camera',
|
title: 'core.fileuploader.camera',
|
||||||
class: 'core-fileuploader-camera-handler',
|
class: 'core-fileuploader-camera-handler',
|
||||||
icon: 'camera',
|
icon: 'camera', // Cannot use font-awesome in action sheet.
|
||||||
action: async (
|
action: async (
|
||||||
maxSize?: number,
|
maxSize?: number,
|
||||||
upload?: boolean,
|
upload?: boolean,
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class CoreFileUploaderFileHandlerService implements CoreFileUploaderHandl
|
||||||
const handler: CoreFileUploaderHandlerData = {
|
const handler: CoreFileUploaderHandlerData = {
|
||||||
title: 'core.fileuploader.file',
|
title: 'core.fileuploader.file',
|
||||||
class: 'core-fileuploader-file-handler',
|
class: 'core-fileuploader-file-handler',
|
||||||
icon: 'folder',
|
icon: 'folder', // Cannot use font-awesome in action sheet.
|
||||||
};
|
};
|
||||||
|
|
||||||
if (CoreApp.isMobile()) {
|
if (CoreApp.isMobile()) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ export class CoreFileUploaderVideoHandlerService implements CoreFileUploaderHand
|
||||||
return {
|
return {
|
||||||
title: 'core.fileuploader.video',
|
title: 'core.fileuploader.video',
|
||||||
class: 'core-fileuploader-video-handler',
|
class: 'core-fileuploader-video-handler',
|
||||||
icon: 'videocam',
|
icon: 'videocam', // Cannot use font-awesome in action sheet.
|
||||||
action: async (
|
action: async (
|
||||||
maxSize?: number,
|
maxSize?: number,
|
||||||
upload?: boolean,
|
upload?: boolean,
|
||||||
|
|
|
@ -59,7 +59,7 @@ export class CoreSharedFilesUploadHandlerService implements CoreFileUploaderHand
|
||||||
return {
|
return {
|
||||||
title: 'core.sharedfiles.sharedfiles',
|
title: 'core.sharedfiles.sharedfiles',
|
||||||
class: 'core-sharedfiles-fileuploader-handler',
|
class: 'core-sharedfiles-fileuploader-handler',
|
||||||
icon: 'fas-folder',
|
icon: 'folder', // Cannot use font-awesome in action sheet.
|
||||||
action: (
|
action: (
|
||||||
maxSize?: number,
|
maxSize?: number,
|
||||||
upload?: boolean,
|
upload?: boolean,
|
||||||
|
|
Loading…
Reference in New Issue