IITBombayWeb / moodle-quiz_downloadsubmissions

Moodle Quiz Report Plugin for downloading essay submissions.
5 stars 14 forks source link

random essay #2

Open gabriosecco opened 5 years ago

gabriosecco commented 5 years ago

if the question of type "essay" is random on the quiz its qtype is "random" but the plugin only check for "essay" qtype. I mean, if I have a quiz and I have just a random question, even if it is from a pool of "essay" questions, the plugin will say there is no question available, so that check would have to consider random qtype too

slavakg commented 4 years ago

Hi, what happened with this issue? Is there any solution for downloading essay attachments with random pick from questions bank?

gabriosecco commented 4 years ago

I fixed the code myself, but I was hoping for an official version. anyway you just need something like this if ($question->qtype == 'essay' || $question->qtype == 'random') {

slavakg commented 4 years ago

Gabrio, thanks for reply. I assume that this goes in line 56 of report.php

$hasessayquestions = false; if ($questions) { foreach ($questions as $question) { if ($question->qtype == 'essay') { $hasessayquestions = true; break; } } }

I will try and inform.

gabriosecco commented 4 years ago

yes, exactly

slavakg commented 4 years ago

Everything working perfect. Thanks Gabrio again.

jondo commented 4 years ago

This (and the fact that currently there is no version for Moodle 3.8) blocks adoption at our university.

Kashmira9890 commented 4 years ago

Hello all, @gabriosecco thanks for working out the solution for qtype 'random'. Will test and incorporate it in the plugin and release plugin version for newer versions of Moodle soon. Thanks.

jondo commented 4 years ago

Will test and incorporate it in the plugin

Hello @Kashmira9890 , could you please do this now?

jondo commented 4 years ago

Note that @lucaboesch has got this (and some other) fix in his fork.