overlib MDL-19735 Overlib is now included only where it is used

At the same time I have converted the calendar block to use YUI instead of overlib, this introduces one regression in that the panel is shown immediatly but should really have a minimal delay for usability.
This will be fixed once the theme changes for 2.0 have been commited
This commit is contained in:
samhemelryk
2009-09-17 07:46:20 +00:00
parent bb55642327
commit 458eb0d10c
16 changed files with 54 additions and 36 deletions
+5 -1
View File
@@ -277,7 +277,7 @@ class embedded_cloze_qtype extends default_questiontype {
}
function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) {
global $QTYPES, $CFG, $USER, $OUTPUT;
global $QTYPES, $CFG, $USER, $OUTPUT, $PAGE;
$readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
$disabled = empty($options->readonly) ? '' : 'disabled="disabled"';
@@ -307,6 +307,9 @@ class embedded_cloze_qtype extends default_questiontype {
// The regex will recognize text snippets of type {#X}
// where the X can be any text not containg } or white-space characters.
echo $PAGE->requires->js('lib/overlib/overlib.js')->asap();
echo $PAGE->requires->js('lib/overlib/overlib_cssstyle.js')->asap();
while (preg_match('~\{#([^[:space:]}]*)}~', $qtextremaining, $regs)) {
$qtextsplits = explode($regs[0], $qtextremaining, 2);
echo $qtextsplits[0];
@@ -360,6 +363,7 @@ class embedded_cloze_qtype extends default_questiontype {
$feedback .= '</div>';
}
}
if ($options->feedback) {
$chosenanswer = null;
switch ($wrapped->qtype) {