From 0e143b35149df579bb2bc449089c04c217297d16 Mon Sep 17 00:00:00 2001 From: gbateson Date: Fri, 18 Nov 2005 06:07:02 +0000 Subject: [PATCH] allow "penalties" to be returned from Rottmeier Find-It quizzes --- mod/hotpot/hotpot-full.js | 6306 +++++++++++++++++++------------------ mod/hotpot/lib.php | 12 +- 2 files changed, 3217 insertions(+), 3101 deletions(-) diff --git a/mod/hotpot/hotpot-full.js b/mod/hotpot/hotpot-full.js index 027c203d887..67a034ff03e 100644 --- a/mod/hotpot/hotpot-full.js +++ b/mod/hotpot/hotpot-full.js @@ -1,3097 +1,3209 @@ - + diff --git a/mod/hotpot/lib.php b/mod/hotpot/lib.php index c8575f48ea6..d2c0cb22431 100644 --- a/mod/hotpot/lib.php +++ b/mod/hotpot/lib.php @@ -2012,12 +2012,16 @@ function hotpot_adjust_response_field($quiztype, &$question, &$num, &$name, &$da break; case 'jcloze': $question->type = HOTPOT_JCLOZE; - $question->name = $num; + if (is_numeric($num)) { + $question->name = $num; + } switch ($name) { case 'penalties': - $name = 'checks'; - if (is_numeric($data)) { - $data++; + if (is_numeric($num)) { + $name = 'checks'; + if (is_numeric($data)) { + $data++; + } } break; case 'clue_shown':