improvements to XHTML compatability (merged from 1.9)

This commit is contained in:
gbateson 2007-10-21 03:02:55 +00:00
parent e3516b2da1
commit f6c4bee314
4 changed files with 21 additions and 17 deletions

View File

@ -116,7 +116,7 @@
print ''
. '<div align="center"><table border="0"><tr><td>'
. '<form target="_parent" method="post" action="'.$ME.'">'
. '<input type="hidden" name="id" value="'.$course->id.'">'
. '<input type="hidden" name="id" value="'.$course->id.'" />'
. '<input type="hidden" name="regrade" value="'.$regrade.'" />'
. '<input type="hidden" name="confirm" value="1" />'
. $sesskey
@ -124,7 +124,7 @@
. '</form>'
. '</td><td> &nbsp; </td><td>'
. '<form target="_parent" method="post" action="'.$ME.'">'
. '<input type="hidden" name="id" value="'.$course->id.'">'
. '<input type="hidden" name="id" value="'.$course->id.'" />'
. $sesskey
. '<input type="submit" value="'.get_string("no").'" />'
. '</form>'
@ -313,10 +313,10 @@
// Show the zoom boxes
if ($displaysection==$hotpot->section) {
$strshowall = get_string('showall'.$course->format);
$printsection .= '<br /><a href="index.php?id='.$course->id.'&section=all" title="'.$strshowall.'"><img src="'.$CFG->pixpath.'/i/all.gif" style="height:25px; width:16px; border:0px" alt="'.$strshowall.'"></a><br />';
$printsection .= '<br /><a href="index.php?id='.$course->id.'&amp;section=all" title="'.$strshowall.'"><img src="'.$CFG->pixpath.'/i/all.gif" style="height:25px; width:16px; border:0px" alt="'.$strshowall.'" /></a><br />';
} else {
$strshowone = get_string('showonly'.preg_replace('|s$|', '', $course->format, 1), '', $hotpot->section);
$printsection .= '<br /><a href="index.php?id='.$course->id.'&section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$CFG->pixpath.'/i/one.gif" class="icon" alt="'.$strshowone.'"></a><br />';
$printsection .= '<br /><a href="index.php?id='.$course->id.'&amp;section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$CFG->pixpath.'/i/one.gif" class="icon" alt="'.$strshowone.'" /></a><br />';
}
}
}
@ -327,7 +327,7 @@
}
$class = ($hotpot->visible) ? '' : 'class="dimmed" ';
$quizname = '<a '.$class.'href="view.php?id='.$hotpot->coursemodule.'">'.$hotpot->name.'</A>';
$quizname = '<a '.$class.'href="view.php?id='.$hotpot->coursemodule.'">'.$hotpot->name.'</a>';
$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 = ''
. '<form '.$CFG->frametarget.'" method="get" action="'.$CFG->wwwroot.'/course/mod.php">'
. '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/course/mod.php">'
. '<input type="hidden" name="update" value="'.$hotpot->coursemodule.'" />'
. $sesskey
. '<input type="submit" value="'.$strupdate.'" />'
@ -388,7 +388,7 @@
$strregradecheck = get_string('regradecheck', 'hotpot', strtr($hotpot->name, $quotes));
$regradebutton = ''
. '<form target="_parent" method="post" action="'.$ME.'" onsubmit="var x=window.confirm('."'$strregradecheck'".');this.confirm.value=x;return x;">'
. '<input type="hidden" name="id" value="'.$course->id.'">'
. '<input type="hidden" name="id" value="'.$course->id.'" />'
. '<input type="hidden" name="regrade" value="'.$hotpot->id.'" />'
. '<input type="hidden" name="confirm" value="" />'
. $sesskey

View File

@ -2551,7 +2551,7 @@ END_OF_SCRIPT;
$html .= $spacer
. '<a href="'
. $CFG->wwwroot.'/mod/hotpot/show.php'
. '?course='.$course.'&location='.$location.'&reference='.urlencode($reference).'&action='.$action
. '?course='.$course.'&amp;location='.$location.'&amp;reference='.urlencode($reference).'&amp;action='.$action
. '"'
. ' onclick="return setLink(this);"'
. ($new_window ? ' target="_blank"' : '')

View File

@ -98,7 +98,8 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
return $this->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=='<=' ? '&lt;=' : $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=='=>' ? '=&gt;' : $caption);
}
function v6_expand_NextQCaption() {
return $this->parent->xml_value('hotpot-config-file,global,next-q-caption');

View File

@ -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".'<frame src="view.php?id='.$cm->id.'&framename=top" frameborder="0" name="top"></frame>'.$frameset;
//$frameset = "\n\t".'<frame src="view.php?id='.$cm->id.'&amp;framename=top" frameborder="0" name="top"></frame>'.$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 = '</div></div>'.$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 "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n";
print "<head><title>$title</title></head>\n";
print "<frameset rows=$rows,*>\n";
print "<frame title=\"$txttoptitle\" src=\"view.php?id=$cm->id&framename=top\">\n";
print "<frame title=\"$txtmaintitle\" src=\"view.php?id=$cm->id&framename=main\">\n";
print "<frame title=\"$txttoptitle\" src=\"view.php?id=$cm->id&amp;framename=top\">\n";
print "<frame title=\"$txtmaintitle\" src=\"view.php?id=$cm->id&amp;framename=main\">\n";
print "<noframes>\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 "</noframes>\n";
print "</frameset>\n";
print "</html>\n";
@ -432,8 +434,8 @@
if (!empty($available_msg)) {
notify($available_msg);
}
print "<iframe id=\"$iframe_id\" src=\"view.php?id=$cm->id&framename=main\" height=\"100%\" width=\"100%\">";
print "<ilayer name=\"$iframe_id\" src=\"view.php?id=$cm->id&framename=main\" height=\"100%\" width=\"100%\">";
print "<iframe id=\"$iframe_id\" src=\"view.php?id=$cm->id&amp;framename=main\" height=\"100%\" width=\"100%\">";
print "<ilayer name=\"$iframe_id\" src=\"view.php?id=$cm->id&amp;framename=main\" height=\"100%\" width=\"100%\">";
print "</ilayer>\n";
print "</iframe>\n";
print $footer;