MDL-47494 gapselect: NOBUG took out the appended group no in box id. It is not needed...
authorJamie Pratt <me@jamiep.org>
Thu, 13 Oct 2011 14:19:30 +0000 (21:19 +0700)
committerJamie Pratt <me@jamiep.org>
Thu, 13 Oct 2011 14:19:30 +0000 (21:19 +0700)
unique already.

question/type/gapselect/renderer.php
question/type/gapselect/rendererbase.php

index 2e4d9d9..c3a0ec7 100755 (executable)
@@ -46,7 +46,7 @@ class qtype_gapselect_renderer extends qtype_elements_embedded_in_question_text_
         $value = $qa->get_last_qt_var($question->field($place));
 
         $attributes = array(
-            'id' => $this->box_id($qa, 'p' . $place, $group),
+            'id' => $this->box_id($qa, 'p' . $place),
         );
         $groupclass = 'group' . $group;
 
index 49c44cf..4ededd3 100755 (executable)
@@ -81,8 +81,8 @@ abstract class qtype_elements_embedded_in_question_text_renderer
         return '';
     }
 
-    protected function box_id(question_attempt $qa, $place, $group) {
-        return $qa->get_qt_field_name($place) . '_' . $group;
+    protected function box_id(question_attempt $qa, $place) {
+        return str_replace(':', '_', $qa->get_qt_field_name($place));
     }
 
     public function specific_feedback(question_attempt $qa) {