rqp questions set the type to rqp_nn where nn is the rqp_type id

This commit is contained in:
gustav_delius 2006-03-22 11:19:26 +00:00
parent ead293420d
commit 18cbc9683d

View File

@ -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) {