Permalink
Browse files

improvements to XHTML compatability in index.php:

(1) remove unnecessary quote in <form ";
(2) change </A> to lowercase;
(3) correctly terminate <input .. /> and <img /> tags;
(4) change & to &amp; in URLs
  • Loading branch information...
1 parent 661b8d9 commit a78a688961e3b5f69add410b7c05e3b83bfb5997 gbateson committed Oct 21, 2007
Showing with 7 additions and 8 deletions.
  1. +7 −8 mod/hotpot/index.php
View
@@ -41,7 +41,6 @@
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
}
print_header($title, $heading, $navigation, "", "", true, "", navmenu($course));
-
$next_url = "$CFG->wwwroot/course/view.php?id=$course->id";
// get display section, if any
@@ -115,15 +114,15 @@
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
. '<input type="submit" value="'.get_string("yes").'" />'
. '</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>'
@@ -312,10 +311,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 />';
}
}
}
@@ -326,7 +325,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?
@@ -368,7 +367,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.'" />'
@@ -387,7 +386,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

0 comments on commit a78a688

Please sign in to comment.