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

random essay #2

Open
gabriosecco opened this issue Nov 13, 2018 · 9 comments
Open

random essay #2

gabriosecco opened this issue Nov 13, 2018 · 9 comments

Comments

@gabriosecco
Copy link

gabriosecco commented Nov 13, 2018

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
Copy link

slavakg commented Apr 11, 2020

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

@gabriosecco
Copy link
Author

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
Copy link

slavakg commented Apr 14, 2020

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
Copy link
Author

yes, exactly

@slavakg
Copy link

slavakg commented Apr 14, 2020

Everything working perfect. Thanks Gabrio again.

@jondo
Copy link

jondo commented May 19, 2020

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

@Kashmira9890
Copy link
Collaborator

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
Copy link

jondo commented Jun 4, 2020

Will test and incorporate it in the plugin

Hello @Kashmira9890 , could you please do this now?

@jondo
Copy link

jondo commented Jun 4, 2020

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

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

No branches or pull requests

4 participants