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.
|
* Component being initialized.
|
||||||
*/
|
*/
|
||||||
async ngOnInit(): Promise<void> {
|
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.acceptedTypes = this.configs?.filetypeslist;
|
||||||
this.maxSize = this.configs?.maxsubmissionsizebytes
|
this.maxSize = this.configs?.maxsubmissionsizebytes
|
||||||
? parseInt(this.configs.maxsubmissionsizebytes, 10)
|
? parseInt(this.configs.maxsubmissionsizebytes, 10)
|
||||||
|
@ -58,6 +52,12 @@ export class AddonModAssignSubmissionFileComponent extends AddonModAssignSubmiss
|
||||||
? parseInt(this.configs.maxfilesubmissions, 10)
|
? parseInt(this.configs.maxfilesubmissions, 10)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
// Get the offline data.
|
||||||
|
const filesData = await CoreUtils.ignoreErrors(
|
||||||
|
AddonModAssignOffline.getSubmission(this.assign.id),
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (filesData && filesData.plugindata && filesData.plugindata.files_filemanager) {
|
if (filesData && filesData.plugindata && filesData.plugindata.files_filemanager) {
|
||||||
const offlineDataFiles = <CoreFileUploaderStoreFilesResult>filesData.plugindata.files_filemanager;
|
const offlineDataFiles = <CoreFileUploaderStoreFilesResult>filesData.plugindata.files_filemanager;
|
||||||
|
|
Loading…
Reference in New Issue