MOBILE-3320 assign: Fix attachments max files and types
parent
1cd937961f
commit
f5e73877a6
|
@ -44,12 +44,6 @@ export class AddonModAssignSubmissionFileComponent extends AddonModAssignSubmiss
|
|||
* Component being initialized.
|
||||
*/
|
||||
async ngOnInit(): Promise<void> {
|
||||
// Get the offline data.
|
||||
const filesData = await CoreUtils.ignoreErrors(
|
||||
AddonModAssignOffline.getSubmission(this.assign.id),
|
||||
undefined,
|
||||
);
|
||||
|
||||
this.acceptedTypes = this.configs?.filetypeslist;
|
||||
this.maxSize = this.configs?.maxsubmissionsizebytes
|
||||
? parseInt(this.configs.maxsubmissionsizebytes, 10)
|
||||
|
@ -58,6 +52,12 @@ export class AddonModAssignSubmissionFileComponent extends AddonModAssignSubmiss
|
|||
? parseInt(this.configs.maxfilesubmissions, 10)
|
||||
: undefined;
|
||||
|
||||
// Get the offline data.
|
||||
const filesData = await CoreUtils.ignoreErrors(
|
||||
AddonModAssignOffline.getSubmission(this.assign.id),
|
||||
undefined,
|
||||
);
|
||||
|
||||
try {
|
||||
if (filesData && filesData.plugindata && filesData.plugindata.files_filemanager) {
|
||||
const offlineDataFiles = <CoreFileUploaderStoreFilesResult>filesData.plugindata.files_filemanager;
|
||||
|
|
Loading…
Reference in New Issue