MDL-83710 report_questioninstances: fix missing type query params.

This commit is contained in:
Paul Holden 2024-11-13 21:14:46 +00:00
parent 2b337b49f9
commit 01b145a5bb
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -69,8 +69,10 @@ if ($requestedqtype) {
$othertypes = array_keys($qtypes);
$key = array_search('missingtype', $othertypes);
unset($othertypes[$key]);
list($sqlqtypetest, $params) = $DB->get_in_or_equal($othertypes, SQL_PARAMS_QM, '', false);
[$sqlqtypetest, $sqlqtypetestparams] = $DB->get_in_or_equal($othertypes, SQL_PARAMS_QM, '', false);
$sqlqtypetest = 'WHERE qtype ' . $sqlqtypetest;
$params = array_merge($params, $sqlqtypetestparams);
} else if ($requestedqtype == '_all_') {
$title = get_string('reportforallqtypes', 'report_questioninstances');