From 18cbc9683d5e7e804da1a79e4dcccb2a0cbf7377 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Wed, 22 Mar 2006 11:19:26 +0000 Subject: [PATCH] rqp questions set the type to rqp_nn where nn is the rqp_type id --- question/question.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/question/question.php b/question/question.php index fc5f52c2a1..7a659bca07 100644 --- a/question/question.php +++ b/question/question.php @@ -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) { -- 2.39.5