MOBILE-3780 assign: Fix getSizeForEdit in file submissions
parent
3a51b361fd
commit
be0ce93a0f
|
@ -15,7 +15,7 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { CoreFileUploader, CoreFileUploaderStoreFilesResult } from '@features/fileuploader/services/fileuploader';
|
||||
import { CoreSites, CoreSitesCommonWSOptions } from '@services/sites';
|
||||
import { FileEntry } from '@ionic-native/file/ngx';
|
||||
import { FileEntry, DirectoryEntry } from '@ionic-native/file/ngx';
|
||||
import {
|
||||
AddonModAssignProvider,
|
||||
AddonModAssignAssign,
|
||||
|
|
|
@ -187,7 +187,8 @@ export class AddonModAssignSubmissionFileHandlerService implements AddonModAssig
|
|||
plugin: AddonModAssignPlugin,
|
||||
): Promise<number> {
|
||||
// Check if there's any change.
|
||||
if (this.hasDataChanged(assign, submission, plugin)) {
|
||||
const hasChanged = await this.hasDataChanged(assign, submission, plugin);
|
||||
if (hasChanged) {
|
||||
const files = CoreFileSession.getFiles(AddonModAssignProvider.COMPONENT, assign.id);
|
||||
|
||||
return CoreFileHelper.getTotalFilesSize(files);
|
||||
|
|
Loading…
Reference in New Issue