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 question type #471

Open
wants to merge 1 commit into
base: MOODLE_39_STABLE
Choose a base branch
from

Conversation

martin-call-learning
Copy link

Hi,
Here is an improvement where we added a file question type.
This type allows the user to submit a pdf or an image file to the questionnaire.
FIxes #287

Thanks for your time reviewing this pull request.

Kind regards.

@mchurchward
Copy link
Contributor

Hi. For a new feature like this, it will need to be applied to the MOODLE_400_STABLE branch. Can you redo your pull request for that?

@lucaboesch
Copy link
Contributor

@laurentdavid I think you have a file-submission-400 branch and a file-submission-401 branch at your place.
Care to update the pull requests?
That would be awesome!

Best,
Luca

@smlavoie
Copy link

Hi! Looks like a feature requested by one teacher I assist. When do you think we'll be able to get this new question type?

@lucaboesch
Copy link
Contributor

@smlavoie with the patch by @laurentdavid I've identified some bugs. For example, if more than one file question is inserted into a questionnaire, only one is able to save the files. And in classes/responsetype/file.php as well as in classes/question/file.php a condition has to be set in order that results can also be seen if a file question is not mandatory and the file submission is optional (see e9060c1).

@smlavoie
Copy link

@lucaboesch , thanks for the followup. Will the bugs be fixed? If so, when do you think it'll be done?

@laurentdavid
Copy link

Hi @smlavoie & @lucaboesch,

Sorry for not answering earlier. I will not be able to answer quickly on this one as I have a lot on my plate right now.
I have seen your comment @lucaboesch and you are right ref. the bug identified. Is it possible to do a PR or I can give you direct access to my fork if there is a bit of emergency in getting this resolved or you can also fork my branch. If not I can have a look at it mid-november.
There is only one constraint, all behat/phpunit test should pass so there is a bit of work to do there too.
I forgot also: there is a 4.00 branch here: https://github.com/call-learning/moodle-mod_questionnaire/tree/laurentd/file-submission-400

Laurent

@smlavoie
Copy link

@laurentdavid many thanks for the followup. Hope to see this feature up and running in questionnaire soon.

@smlavoie
Copy link

smlavoie commented Dec 8, 2023

Hello, sorry to annoy you again. Any news on an update on this much wanted question type availability?

@lucaboesch
Copy link
Contributor

@smlavoie
Copy link

This branch https://github.com/lucaboesch/moodle-mod_questionnaire/tree/file-submission-401 here is improved in regards to the one by @laurentdavid . There's also https://github.com/lucaboesch/moodle-mod_questionnaire/tree/file-submission-403.

Hello @lucaboesch , I installed this version on our dev. Works great! I noticed, there is a one file limit per question. Is there a way to manage that or to remove that limitation?

@srobotta
Copy link

Hello @lucaboesch , I installed this version on our dev. Works great! I noticed, there is a one file limit per question. Is there a way to manage that or to remove that limitation?

The limitation is there by intention. The handling of mutliple files doesn't work for a simple file type question. However, you can add several file type questions to one questionnaire. This may solves the case to have multiple uploads but may not exactly fit your workflow.
HTH, Stephan

@smlavoie
Copy link

Hi @srobotta , thanks for your answer. As you suspected, I knew the limitation is intentional and with our students, it's best to present them as few questions as possible, that is the reason for my request. Is there an easy way to add a setting to let the teacher how many files could be upload in one question?

@srobotta
Copy link

Is there an easy way to add a setting to let the teacher how many files could be upload in one question?
Unfortunately there is no setting so far. I was busy to get the file upload working correctly in the first place and used the existing code to establish this. To change that, the whole storing process of the files would have to be rewritten to support multiple files.
It might be an idea that once this pull request has been accepted it could make sense to open a new feature request.

@smlavoie
Copy link

@srobotta, Thanks for your time, I'll follow your advice and in time will make a new feature request.

@srobotta
Copy link

Hi folks,

We adapted @laurentdavid patch at our institution and after some improvements using this successfull for 1/2 a year now. There were several pull requests regarding this issue which never got merged. Today I have created #599 with the codebase that we use on our production site.

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.

6 participants