Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File submission 401 #1

Merged

Conversation

srobotta
Copy link
Collaborator

Fix handling of file uploads

  • Handle several question type files.
  • Allow upload of one file only per question type file.
  • New submit does not load previously existing files.
  • Adjust siganture of methods to their parent
  • Use questionaire id for file draft area instead of question id in the questionaire.
  • Do not prefill file uploads with previous files

What is missing/problematic

  • Files are not assigned correctly to the corresponding answer, when the form contains errors
  • Files are lost when another answer is added.

- Adjust siganture of methods to their parent
- Limit the files to upload to one for each question
- Use questionaire id for file draft area instead of question id in
  the questionaire.
- allow upload of one file only.
- new submit does not load previously existing files.
\mod_questionnaire\responsetype\file::fix_file_itemid($idmap[(int)$filerecord->id], $filerecord);
}
}

return $result;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should call
upgrade_mod_savepoint(true, 2023101501, 'questionnaire');
here

@lucaboesch lucaboesch merged commit 7cba8d7 into lucaboesch:file-submission-401 Jan 18, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants