mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
rqp questions set the type to rqp_nn where nn is the rqp_type id
This commit is contained in:
parent
ead293420d
commit
18cbc9683d
@ -26,15 +26,15 @@
|
||||
require_once($CFG->libdir.'/questionlib.php');
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
|
||||
$id = optional_param('id'); // question id
|
||||
$id = optional_param('id', 0, PARAM_INT); // question id
|
||||
|
||||
$qtype = optional_param('qtype');
|
||||
$category = optional_param('category');
|
||||
$qtype = optional_param('qtype', '', PARAM_FILE);
|
||||
$category = optional_param('category', 0, PARAM_INT);
|
||||
|
||||
// a qtype > 99 means a remote question
|
||||
if ($qtype > 99) {
|
||||
$typeid = $qtype - 100;
|
||||
$qtype = RQP;
|
||||
// rqp questions set the type to rqp_nn where nn is the rqp_type id
|
||||
if (substr($qtype, 0, 4) == 'rqp_') {
|
||||
$typeid = (int) substr($qtype, 4);
|
||||
$qtype = 'rqp';
|
||||
}
|
||||
|
||||
if ($id) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user