Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improvements to XHTML compatability:

(1) lib.php: change "&" to "&" in URLs in "hotpot_print_show_links" function;
(2) mod.html: change size=40 to size="40", remove obselete </span>, change nowrap to nowrap="true", change "&" to "&amp;" in URLs;
(3) view.php: add closing </div> tags for "page" and "content" divs, change "&" to "&amp;" in URLs;
(4) template/v6.php: change "<=" to "&lt;="in strLastQCaption, change  "=>" to "=&gt;" in strNextQCaption
  • Loading branch information...
commit 661b8d9dec4fdd420d0af88295e061e1883ad33b 1 parent 909abdd
gbateson authored
View
2  mod/hotpot/lib.php
@@ -2441,7 +2441,7 @@ function getDir(s) {
$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
41 mod/hotpot/mod.html
@@ -77,7 +77,7 @@
} else {
print '<input type="hidden" name="namesource" value="'.HOTPOT_TEXTSOURCE_SPECIFIC.'" />';
}
- print '<input type="text" name="name" size=40 value="'.$form->name.'">';
+ print '<input type="text" name="name" size="40" value="'.$form->name.'" />';
?></td>
</tr>
<tr valign="top">
@@ -99,7 +99,6 @@
emoticonhelpbutton("form", "description");
}
?></font>
- </span>
</td>
<td align="left"><?php
if ($form->mode=='add') {
@@ -145,7 +144,7 @@
?></td>
</tr>
<tr valign="top">
- <td align="right" nowrap>
+ <td align="right" nowrap="true">
<b><?php print get_string("location","hotpot") ?>:</b>
</td>
<td align="left"><?php
@@ -181,10 +180,10 @@
// set button url depending on Moodle version
if ($CFG->version < 2004083125) { // version may need refining
// up to and including Moodle 1.4.1
- $url = "/mod/resource/coursefiles.php?id=$id&wdir=$wdir";
+ $url = "/mod/resource/coursefiles.php?id=$id&amp;wdir=$wdir";
} else {
// Moodle 1.4.2 and beyond
- $url = "/files/index.php?id=$id&wdir=$wdir&choose=form.reference";
+ $url = "/files/index.php?id=$id&amp;wdir=$wdir&amp;choose=form.reference";
}
$strchooseafile = get_string("chooseafile", "resource");
@@ -193,12 +192,12 @@
?></td>
</tr>
<tr valign="top">
- <td align="right" nowrap>
+ <td align="right" nowrap="true">
<b><?php print_string("filename", "resource") ?>:</b>
</td>
<td align="left"><?php
if (function_exists("button_to_popup_window")) {
- print '<input name="reference" size="50" value="'.$form->reference.'">&nbsp;';
+ print '<input name="reference" size="50" value="'.$form->reference.'" />&nbsp;';
} else if (function_exists("get_directory_list")) {
// Moodle 1.1 (and perhaps some others)
@@ -211,7 +210,7 @@
} else {
// a very old Moodle (may be none left :-)
- print '<input name="reference" size="50" value="'.$form->reference.'">&nbsp;';
+ print '<input name="reference" size="50" value="'.$form->reference.'" />&nbsp;';
}
print '<br />';
hotpot_print_show_links($form->course, $form->location, $form->reference, '', ' &nbsp; ', true);
@@ -249,7 +248,7 @@
"return hotpot_lockoptions('form', 'studentfeedback', feedbacklockitems, feedbackoffvalues)"
);
print '<span id="studentfeedbackurlSPAN">';
- print "<input name=\"studentfeedbackurl\" size=\"50\" value=\"$form->studentfeedbackurl\">";
+ print "<input name=\"studentfeedbackurl\" size=\"50\" value=\"$form->studentfeedbackurl\" />";
print '</span>';
helpbutton("studentfeedback", get_string("studentfeedback","hotpot"), "hotpot");
?></td>
@@ -312,14 +311,14 @@
<tr valign="top">
<td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
<td align="left">
- <input type="text" name="password" size=40 value="<?php p($form->password) ?>">
+ <input type="text" name="password" size="40" value="<?php p($form->password) ?>" />
<?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
<td align="left">
- <input type="text" name="subnet" size=40 value="<?php p($form->subnet) ?>">
+ <input type="text" name="subnet" size="40" value="<?php p($form->subnet) ?>" />
<?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
</td>
</tr>
@@ -337,7 +336,7 @@
<td align="right">&nbsp;</td>
<td align="left">
<!-- buttons -->
- <input type="submit" value="<?php print_string("savechanges") ?>"> &nbsp; &nbsp;
+ <input type="submit" value="<?php print_string("savechanges") ?>" /> &nbsp; &nbsp;
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" /><br />
<?php
if (isset($CFG->release) && substr($CFG->release, 0, 3)>=1.5) {
@@ -351,18 +350,20 @@
print '<input type="hidden" name="displaynext" value="'.HOTPOT_NO.'" />'."\n";
}
?>
+ </td>
+ </tr>
</table>
<!-- hidden fields -->
-<input type="hidden" name="course" value="<?php p($form->course) ?>">
-<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>">
-<input type="hidden" name="section" value="<?php p($form->section) ?>">
-<input type="hidden" name="module" value="<?php p($form->module) ?>">
-<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>">
-<input type="hidden" name="instance" value="<?php p($form->instance) ?>">
-<input type="hidden" name="mode" value="<?php p($form->mode) ?>">
+<input type="hidden" name="course" value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="section" value="<?php p($form->section) ?>" />
+<input type="hidden" name="module" value="<?php p($form->module) ?>" />
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<?php if (isset($USER->sesskey)) { ?>
-<input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>">
+<input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>" />
<?php } ?>
</form>
View
6 mod/hotpot/template/v6.php
@@ -98,7 +98,8 @@ function v6_expand_IncorrectIndicator() {
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 @@ function v6_expand_NextEx() {
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
16 mod/hotpot/view.php
@@ -341,7 +341,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
@@ -369,6 +369,8 @@
print($styles);
exit;
}
+ // finish "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')
@@ -407,12 +409,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";
@@ -436,8 +438,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;

0 comments on commit 661b8d9

Please sign in to comment.
Something went wrong with that request. Please try again.