From f6c4bee314e91a65f0f4f239a346470ca5844d3e Mon Sep 17 00:00:00 2001 From: gbateson Date: Sun, 21 Oct 2007 03:02:55 +0000 Subject: [PATCH] improvements to XHTML compatability (merged from 1.9) --- mod/hotpot/index.php | 14 +++++++------- mod/hotpot/lib.php | 2 +- mod/hotpot/template/v6.php | 6 ++++-- mod/hotpot/view.php | 16 +++++++++------- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/mod/hotpot/index.php b/mod/hotpot/index.php index 6bec8c5277..cf9d727ade 100644 --- a/mod/hotpot/index.php +++ b/mod/hotpot/index.php @@ -116,7 +116,7 @@ print '' . '
' . '
' - . '' + . '' . '' . '' . $sesskey @@ -124,7 +124,7 @@ . '
' . '
  ' . '
' - . '' + . '' . $sesskey . '' . '
' @@ -313,10 +313,10 @@ // Show the zoom boxes if ($displaysection==$hotpot->section) { $strshowall = get_string('showall'.$course->format); - $printsection .= '
'.$strshowall.'
'; + $printsection .= '
'.$strshowall.'
'; } else { $strshowone = get_string('showonly'.preg_replace('|s$|', '', $course->format, 1), '', $hotpot->section); - $printsection .= '
'.$strshowone.'
'; + $printsection .= '
'.$strshowone.'
'; } } } @@ -327,7 +327,7 @@ } $class = ($hotpot->visible) ? '' : 'class="dimmed" '; - $quizname = ''.$hotpot->name.''; + $quizname = ''.$hotpot->name.''; $quizclose = empty($hotpot->timeclose) ? $strneverclosed : userdate($hotpot->timeclose); // are there any totals for this hotpot? @@ -369,7 +369,7 @@ if (has_capability('moodle/course:manageactivities', $coursecontext)) { $updatebutton = '' - . '
frametarget.'" method="get" action="'.$CFG->wwwroot.'/course/mod.php">' + . 'frametarget.' method="get" action="'.$CFG->wwwroot.'/course/mod.php">' . '' . $sesskey . '' @@ -388,7 +388,7 @@ $strregradecheck = get_string('regradecheck', 'hotpot', strtr($hotpot->name, $quotes)); $regradebutton = '' . '' - . '' + . '' . '' . '' . $sesskey diff --git a/mod/hotpot/lib.php b/mod/hotpot/lib.php index a8b1bf152f..de00a3ffe7 100644 --- a/mod/hotpot/lib.php +++ b/mod/hotpot/lib.php @@ -2551,7 +2551,7 @@ END_OF_SCRIPT; $html .= $spacer . 'js_value('hotpot-config-file,global,incorrect-indicator'); } function v6_expand_LastQCaption() { - return $this->parent->xml_value('hotpot-config-file,global,last-q-caption'); + $caption = $this->parent->xml_value('hotpot-config-file,global,last-q-caption'); + return ($caption=='<=' ? '<=' : $caption); } function v6_expand_NextCorrect() { $value = $this->js_value('hotpot-config-file,'.$this->parent->quiztype.',next-correct-part'); @@ -111,7 +112,8 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default { return $this->int_value('hotpot-config-file,global,include-next-ex'); } function v6_expand_NextExCaption() { - return $this->parent->xml_value('hotpot-config-file,global,next-ex-caption'); + $caption = $this->parent->xml_value('hotpot-config-file,global,next-ex-caption'); + return ($caption=='=>' ? '=>' : $caption); } function v6_expand_NextQCaption() { return $this->parent->xml_value('hotpot-config-file,global,next-q-caption'); diff --git a/mod/hotpot/view.php b/mod/hotpot/view.php index 3e18a599c6..84dd4f124c 100644 --- a/mod/hotpot/view.php +++ b/mod/hotpot/view.php @@ -340,7 +340,7 @@ default: // add a HotPot navigation frame at the top of the page //$rows = empty($CFG->resource_framesize) ? 85 : $CFG->resource_framesize; - //$frameset = "\n\t".''.$frameset; + //$frameset = "\n\t".''.$frameset; //$frameset_tags = preg_replace('|rows="(.*?)"|', 'rows="'.$rows.',\\1"', $frameset_tags); // put navigation into var NavBar=''; // add form to TopFrame in "WriteFeedback" function @@ -368,6 +368,8 @@ print($styles); exit; } + // closing tags for "page" and "content" divs + $footer = ''.$footer; switch ($hotpot->navigation) { case HOTPOT_NAVIGATION_BAR: //update_module_button($cm->id, $course->id, $strmodulename.'" style="font-size:0.8em') @@ -403,12 +405,12 @@ print "\n"; print "$title\n"; print "\n"; - print "id&framename=top\">\n"; - print "id&framename=main\">\n"; + print "id&framename=top\">\n"; + print "id&framename=main\">\n"; print "\n"; print "<p>$txtframesetinfo</p>\n"; - print "<ul><li><a href=\"view.php?id=$cm->id&framename=top\">$txttoptitle</a></li>\n"; - print "<li><a href=\"view.php?id=$cm->id&framename=main\">$txtmaintitle</a></li></ul>\n"; + print "<ul><li><a href=\"view.php?id=$cm->id&amp;framename=top\">$txttoptitle</a></li>\n"; + print "<li><a href=\"view.php?id=$cm->id&amp;framename=main\">$txtmaintitle</a></li></ul>\n"; print "\n"; print "\n"; print "\n"; @@ -432,8 +434,8 @@ if (!empty($available_msg)) { notify($available_msg); } - print "\n"; print $footer; -- 2.39.5