$qtype = optional_param('qtype', '', PARAM_FILE);
$category = optional_param('category', 0, PARAM_INT);
+
+ $delete = optional_param('delete', 0, PARAM_INT);
+ $confirm = optional_param('confirm', 0, PARAM_INT);
// rqp questions set the type to rqp_nn where nn is the rqp_type id
if (substr($qtype, 0, 4) == 'rqp_') {
print_header_simple("$streditingquestion", "", $strediting);
- if (isset($_REQUEST['delete'])) {
- $delete = required_param('delete', PARAM_INT);
- if (isset($confirm) and confirm_sesskey()) {
+ if ($delete) {
+ if ($confirm and confirm_sesskey()) {
if ($confirm == md5($delete)) {
if (record_exists('quiz_question_instances', 'question', $question->id) or
record_exists('question_states', 'originalquestion', $question->id)) {