Open jmatikainen opened 11 months ago
Hi, A random question is not a question type as such, but is a way of inserting a randomly-chosen question from a specified category into a quiz.
This means that different students are likely to get a different selection of questions, and when a quiz allows multiple attempts then each attempt is likely to contain a new selection of questions
the query doesnt deep link the question usage per student, rather per quiz, hence random is not accounted for. Let me check with my colleagues and see if they want to do something about it.
I am having the same issue. But actually, I have found that the problem only is in the verification of the question types on a given quiz (via filedownloader_get_valid_qtypes
) and there is actually no problem downloading the actual files, even if they come from a random question (i.e., filedownloader_process_files
does its job correctly).
A simple way to prove this is to make a quiz that has a non-random essay question and another random question which will be of type essay. Then, as filedownloader_get_valid_qtypes
is able to validate that "essay" is a question type present on the quiz, it will download both questions of type essay. But, if you happen to remove the non-random question, the validation fails… Even though filedownloader_process_files
would still work.
To confirm that, I have tried returning in a hard-coded way a fixed validated array from filedownloader_get_valid_qtypes
, and it all works out fine (except that, of course, no validation is carried out any more).
public function filedownloader_get_valid_qtypes($questions, $configfileareas, $configqtypes) {
return array("errors" => array(), "valid" => array("essay"));
}
So, no downloading logic should be changed — just the qtype validation logic.
It seems that this plugin doesn't support random questions. For example, a random essay question isn't recognized. Is it currently possible to enable random questions in the plugin settings, or if random questions are not supported, could this feature be added to the plugin?