qtype_multianswer MDL-25841 feedback pop-up was appearing in the wrong place.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 18 Jan 2011 23:30:40 +0000 (23:30 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 18 Jan 2011 23:30:40 +0000 (23:30 +0000)
It seems that overlib was getting confused by its div being inside another positioned div. The simplest solution is to not create the div at all. Then the overlib JS creates it when needed, and that works.

question/type/multianswer/questiontype.php

index 1c713f2..012cc43 100644 (file)
@@ -278,12 +278,6 @@ class embedded_cloze_qtype extends default_questiontype {
     function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) {
         global $QTYPES, $CFG, $USER, $OUTPUT, $PAGE;
 
     function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) {
         global $QTYPES, $CFG, $USER, $OUTPUT, $PAGE;
 
-        static $overlibdivoutput = false;
-        if (!$overlibdivoutput) {
-            echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
-            $overlibdivoutput = true;
-        }
-
         $readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
         $disabled = empty($options->readonly) ? '' : 'disabled="disabled"';
         $formatoptions = new stdClass;
         $readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
         $disabled = empty($options->readonly) ? '' : 'disabled="disabled"';
         $formatoptions = new stdClass;