Skip to content

Commit

Permalink
XHTML compliance
Browse files Browse the repository at this point in the history
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
  • Loading branch information
gustav_delius committed Sep 16, 2004
1 parent e5c6a35 commit 839f245
Show file tree
Hide file tree
Showing 801 changed files with 3,997 additions and 4,208 deletions.
4 changes: 2 additions & 2 deletions admin/blocks.php
Expand Up @@ -160,10 +160,10 @@

if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'" title="'.$strhide.'">'.
'<img src="'.$pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" /></a>';
'<img src="'.$pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" alt=\"\" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'" title="'.$strshow.'">'.
'<img src="'.$pixpath.'/i/show.gif" style="height: 16px; width: 16px;" /></a>';
'<img src="'.$pixpath.'/i/show.gif" style="height: 16px; width: 16px;" alt=\"\" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}

Expand Down
2 changes: 1 addition & 1 deletion admin/config.php
Expand Up @@ -91,7 +91,7 @@
$httpsurl = str_replace('http://', 'https://', $CFG->wwwroot);
if ($httpsurl != $CFG->wwwroot) {
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
echo '<script>'."\n";
echo '<script type="text/javascript">'."\n";
echo '<!--'."\n";
echo "eval('document.form.loginhttps.disabled=true');\n";
echo '-->'."\n";
Expand Down
2 changes: 1 addition & 1 deletion admin/creators.html
Expand Up @@ -55,7 +55,7 @@
?>
</select>
<br />
<script>
<script type="text/javascript">
function
</script>
<input type="text" name="searchtext" size="30" value="<?php echo $searchtext ?>"
Expand Down
2 changes: 1 addition & 1 deletion admin/delete.php
Expand Up @@ -19,7 +19,7 @@
}

if (!$reallysure) {
notice_yesno ("Are you REALLY REALLY completely sure you want to delete everything inside the directory $deletedir (this includes all user images, and any other course files that have been created) ?", "delete.php?sure=yes&reallysure=yes", "index.php");
notice_yesno ("Are you REALLY REALLY completely sure you want to delete everything inside the directory $deletedir (this includes all user images, and any other course files that have been created) ?", "delete.php?sure=yes&amp;reallysure=yes", "index.php");
exit;
}

Expand Down
4 changes: 2 additions & 2 deletions admin/index.php
Expand Up @@ -21,7 +21,7 @@

/// Check some PHP server settings

$documentationlink = "please read the <a href=\"../doc/?frame=install.html&sub=webserver\">install documentation</a>";
$documentationlink = "please read the <a href=\"../doc/?frame=install.html&amp;sub=webserver\">install documentation</a>";

if (ini_get_bool('session.auto_start')) {
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
Expand Down Expand Up @@ -328,7 +328,7 @@

$userdata .= "<font size=+1>&nbsp;</font><a href=\"../course/index.php?edit=on\">".get_string("assignteachers")."</a> - <font size=\"1\">".
get_string("adminhelpassignteachers").
" <img src=\"../pix/t/user.gif\" height=\"11\" width=\"11\"></font><br />";
" <img src=\"../pix/t/user.gif\" height=\"11\" width=\"11\" alt=\"\"></font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"creators.php\">".get_string("assigncreators")."</a> - <font size=\"1\">".
get_string("adminhelpassigncreators")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"admin.php\">".get_string("assignadmins")."</a> - <font size=\"1\">".
Expand Down
4 changes: 2 additions & 2 deletions admin/lang.php
Expand Up @@ -159,7 +159,7 @@
if (lang_save_file($langdir, $currentfile, $newstrings)) {
notify(get_string("changessaved")." ($langdir/$currentfile)", "green");
} else {
error("Could not save the file '$currentfile'!", "lang.php?mode=compare&currentfile=$currentfile");
error("Could not save the file '$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
}
}

Expand All @@ -171,7 +171,7 @@
if ($file == $currentfile) {
echo "<b>$file</b> &nbsp; ";
} else {
echo "<a href=\"lang.php?mode=compare&currentfile=$file\">$file</a> &nbsp; ";
echo "<a href=\"lang.php?mode=compare&amp;currentfile=$file\">$file</a> &nbsp; ";
}
}
echo '</font></center>';
Expand Down
8 changes: 4 additions & 4 deletions admin/modules.php
Expand Up @@ -64,7 +64,7 @@

if (empty($confirm)) {
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&confirm=$delete",
"modules.php?delete=$delete&amp;confirm=$delete",
"modules.php");
print_footer();
exit;
Expand Down Expand Up @@ -160,7 +160,7 @@

foreach ($modulebyname as $modulename => $module) {

$icon = "<img src=\"$modpixpath/$module->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\">";
$icon = "<img src=\"$modpixpath/$module->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";

$delete = "<a href=\"modules.php?delete=$module->name\">$strdelete</a>";

Expand All @@ -174,11 +174,11 @@

if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name\" title=\"$strhide\">".
"<img src=\"$pixpath/i/hide.gif\" align=\"absmiddle\" height=\"16\" width=\"16\" border=\"0\"></a>";
"<img src=\"$pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
$class = "";
} else {
$visible = "<a href=\"modules.php?show=$module->name\" title=\"$strshow\">".
"<img src=\"$pixpath/i/show.gif\" align=\"absmiddle\" height=\"16\" width=\"16\" border=\"0\"></a>";
"<img src=\"$pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
$class = "class=\"dimmed_text\"";
}
if ($module->name == "forum") {
Expand Down
36 changes: 18 additions & 18 deletions admin/user.php
Expand Up @@ -62,7 +62,7 @@
$USER->teacher["$site->id"] = true;
$USER->newadminuser = true;

redirect("$CFG->wwwroot/user/edit.php?id=$user->id&course=$site->id");
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
exit;

} else {
Expand Down Expand Up @@ -94,7 +94,7 @@
}
}

redirect("$CFG->wwwroot/user/edit.php?id=$user->id&course=$site->id");
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id");

} else { // List all users for editing

Expand Down Expand Up @@ -147,7 +147,7 @@
if ($confirm != md5($delete)) {
$fullname = fullname($user, true);
notice_yesno(get_string("deletecheckfull", "", "'$fullname'"),
"user.php?delete=$delete&confirm=".md5($delete), "user.php");
"user.php?delete=$delete&amp;confirm=".md5($delete), "user.php");

exit;
} else if (!$user->deleted) {
Expand Down Expand Up @@ -188,10 +188,10 @@
} else {
$columnicon = $dir == "ASC" ? "down":"up";
}
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" />";
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" alt=\"\" />";

}
$$column = "<a href=\"user.php?sort=$column&dir=$columndir&search=$search&firstinitial=$firstinitial&lastinitial=$lastinitial\">".$string[$column]."</a>$columnicon";
$$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir&amp;search=$search&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial\">".$string[$column]."</a>$columnicon";
}

if ($sort == "name") {
Expand All @@ -218,17 +218,17 @@
echo "<center><p align=\"center\">";
echo get_string("firstname")." : ";
if ($firstinitial) {
echo " <a href=\"user.php?sort=firstname&dir=ASC&".
"perpage=$perpage&lastinitial=$lastinitial\">$strall</a> ";
echo " <a href=\"user.php?sort=firstname&amp;dir=ASC&".
"perpage=$perpage&amp;lastinitial=$lastinitial\">$strall</a> ";
} else {
echo " <b>$strall</b> ";
}
foreach ($alphabet as $letter) {
if ($letter == $firstinitial) {
echo " <b>$letter</b> ";
} else {
echo " <a href=\"user.php?sort=firstname&dir=ASC&".
"perpage=$perpage&lastinitial=$lastinitial&firstinitial=$letter\">$letter</a> ";
echo " <a href=\"user.php?sort=firstname&amp;dir=ASC&".
"perpage=$perpage&amp;lastinitial=$lastinitial&amp;firstinitial=$letter\">$letter</a> ";
}
}
echo "<br />";
Expand All @@ -237,24 +237,24 @@

echo get_string("lastname")." : ";
if ($lastinitial) {
echo " <a href=\"user.php?sort=lastname&dir=ASC&".
"perpage=$perpage&firstinitial=$firstinitial\">$strall</a> ";
echo " <a href=\"user.php?sort=lastname&amp;dir=ASC&".
"perpage=$perpage&amp;firstinitial=$firstinitial\">$strall</a> ";
} else {
echo " <b>$strall</b> ";
}
foreach ($alphabet as $letter) {
if ($letter == $lastinitial) {
echo " <b>$letter</b> ";
} else {
echo " <a href=\"user.php?sort=lastname&dir=ASC&".
"perpage=$perpage&firstinitial=$firstinitial&lastinitial=$letter\">$letter</a> ";
echo " <a href=\"user.php?sort=lastname&amp;dir=ASC&".
"perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$letter\">$letter</a> ";
}
}
echo "</p>";
echo "</center>";

print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&dir=$dir&perpage=$perpage&firstinitial=$firstinitial&lastinitial=$lastinitial&search=$search&");
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=$search&");

flush();

Expand Down Expand Up @@ -313,12 +313,12 @@
$confirmbutton = "";
}
$fullname = fullname($user, true);
$table->data[] = array ("<a href=\"../user/view.php?id=$user->id&course=$site->id\">$fullname</a>",
$table->data[] = array ("<a href=\"../user/view.php?id=$user->id&amp;course=$site->id\">$fullname</a>",
"$user->email",
"$user->city",
"$user->country",
$strlastaccess,
"<a href=\"../user/edit.php?id=$user->id&course=$site->id\">$stredit</a>",
"<a href=\"../user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>",
$deletebutton,
$confirmbutton);
}
Expand All @@ -338,8 +338,8 @@
print_table($table);

print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&dir=$dir&perpage=$perpage".
"&firstinitial=$firstinitial&lastinitial=$lastinitial&search=$search&");
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=$search&");

}

Expand Down
2 changes: 1 addition & 1 deletion admin/users.php
Expand Up @@ -39,7 +39,7 @@
$table->data[] = array("<b><a href=\"../course/index.php?edit=off\">".get_string("assignstudents")."</a></b>",
get_string("adminhelpassignstudents"));
$table->data[] = array("<b><a href=\"../course/index.php?edit=on\">".get_string("assignteachers")."</a></b>",
get_string("adminhelpassignteachers")." <img src=\"../pix/t/user.gif\" height=\"11\" width=\"11\">");
get_string("adminhelpassignteachers")." <img src=\"../pix/t/user.gif\" height=\"11\" width=\"11\" alt=\"\" />");
$table->data[] = array("<b><a href=\"creators.php\">".get_string("assigncreators")."</a></b>",
get_string("adminhelpassigncreators"));
$table->data[] = array("<b><a href=\"admin.php\">".get_string("assignadmins")."</a></b>",
Expand Down
2 changes: 1 addition & 1 deletion auth/db/config.html
Expand Up @@ -140,7 +140,7 @@
<td>
<input name="auth_user_firstname" type="text" size="30" value="<?php echo $config->auth_user_firstname?>" />
</td>
<td rowspan="12" valign="center">
<td rowspan="12" valign="middle">
<?php print_string("auth_dbextrafields","auth") ?>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/config.html
Expand Up @@ -162,7 +162,7 @@
<td>
<input name="auth_user_firstname" type="text" size="30" value="<?php echo $config->auth_user_firstname?>" />
</td>
<td rowspan="12" valign="center">
<td rowspan="12" valign="middle">
<?php print_string("auth_ldapextrafields","auth") ?>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion backup/restore.php
Expand Up @@ -40,7 +40,7 @@

//Check backup_version
if ($file) {
$linkto = "restore.php?id=".$id."&file=".$file;
$linkto = "restore.php?id=".$id."&amp;file=".$file;
} else {
$linkto = "restore.php";
}
Expand Down
8 changes: 4 additions & 4 deletions backup/restorelib.php
Expand Up @@ -1591,7 +1591,7 @@ function restore_log_course($restore,$log) {
$log->info = $user->new_id;
//Now, extract the mode from the url field
$mode = substr(strrchr($log->url,"="),1);
$log->url = "user.php?id=".$log->course."&user=".$log->info."&mode=".$mode;
$log->url = "user.php?id=".$log->course."&amp;user=".$log->info."&amp;mode=".$mode;
$toinsert = true;
}
break;
Expand Down Expand Up @@ -1717,7 +1717,7 @@ function restore_log_user($restore,$log) {
$user = backup_getid($restore->backup_unique_code,"user",$log->info);
if ($user) {
$log->info = $user->new_id;
$log->url = "view.php?id=".$log->info."&course=".$log->course;
$log->url = "view.php?id=".$log->info."&amp;course=".$log->course;
$toinsert = true;
}
break;
Expand All @@ -1726,7 +1726,7 @@ function restore_log_user($restore,$log) {
$user = backup_getid($restore->backup_unique_code,"user",$log->info);
if ($user) {
$log->info = $user->new_id;
$log->url = "view.php?id=".$log->info."&course=".$log->course;
$log->url = "view.php?id=".$log->info."&amp;course=".$log->course;
$toinsert = true;
}
break;
Expand All @@ -1743,7 +1743,7 @@ function restore_log_user($restore,$log) {
$user = backup_getid($restore->backup_unique_code,"user",$userid);
if ($user) {
$log->info = "";
$log->url = "view.php?id=".$user->new_id."&course=".$log->course;
$log->url = "view.php?id=".$user->new_id."&amp;course=".$log->course;
$toinsert = true;
}
break;
Expand Down
2 changes: 1 addition & 1 deletion blocks/course_summary/block_course_summary.php
Expand Up @@ -32,7 +32,7 @@ function get_content() {
} else {
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->course->id;
}
$this->content->text .= '<div style="text-align: right;"><a href="'.$editpage.'"><img src="'.$CFG->pixpath.'/t/edit.gif" /></a></div>';
$this->content->text .= "<div align=\"right\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"\" /></a></div>";
}
$this->content->footer = '';

Expand Down
12 changes: 6 additions & 6 deletions blocks/moodleblock.class.php
Expand Up @@ -156,26 +156,26 @@ function add_edit_controls($options, $blockid) {
}

$movebuttons .= '<a style="margin-right: 6px; margin-left: 3px;" title="'.$title.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=toggle&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.$icon.'" /></a>';
'<img src="'.$pixpath.$icon.'" alt=\"\" /></a>';

$movebuttons .= '<a title="'.$this->str->delete.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=delete&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/delete.gif" /></a> ';
'<img src="'.$pixpath.'/t/delete.gif" alt=\"\" /></a> ';

if ($options & BLOCK_MOVE_LEFT) {
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveleft.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=moveside&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/left.gif" /></a>';
'<img src="'.$pixpath.'/t/left.gif" alt=\"\" /></a>';
}
if ($options & BLOCK_MOVE_UP) {
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveup.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=moveup&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/up.gif" /></a>';
'<img src="'.$pixpath.'/t/up.gif" alt=\"\" /></a>';
}
if ($options & BLOCK_MOVE_DOWN) {
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->movedown.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=movedown&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/down.gif" /></a>';
'<img src="'.$pixpath.'/t/down.gif" alt=\"\" /></a>';
}
if ($options & BLOCK_MOVE_RIGHT) {
$movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveright.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=moveside&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/right.gif" /></a>';
'<img src="'.$pixpath.'/t/right.gif" alt=\"\" /></a>';
}

$movebuttons .= '</div>';
Expand Down
8 changes: 4 additions & 4 deletions blocks/online_users/block_online_users.php
Expand Up @@ -122,12 +122,12 @@ function get_content() {
$this->content->text .= '<div style="text-align: left; font-size: 0.75em; padding-top: 5px;">';
$timeago = format_time(time() - max($user->timeaccess, $user->lastaccess)); //bruno to calculate correctly on frontpage
if ($user->picture==0) {
$this->content->text .= '<img src="'.$CFG->pixpath.'/i/user.gif" style="height: 16px; width=16px; vertical-align: middle;" alt="" /> ';
$this->content->text .= '<img src="'.$CFG->pixpath.'/i/user.gif" style="height: 16px; width:16px; vertical-align: middle;" alt="" /> ';
} else {
if ($CFG->slasharguments) {
$imgtag = '<img src="'.$CFG->wwwroot.'/user/pix.php/'.$user->id.'/f2.jpg" style="height: 16px; width=16px; vertical-align: middle;" alt="" /> ';
$imgtag = '<img src="'.$CFG->wwwroot.'/user/pix.php/'.$user->id.'/f2.jpg" style="height: 16px; width:16px; vertical-align: middle;" alt="" /> ';
} else {
$imgtag = '<img src="'.$CFG->wwwroot.'/user/pix.php?file=/'.$user->id.'/f2.jpg" style="height: 16px; width=16px; vertical-align: middle;" alt="" /> ';
$imgtag = '<img src="'.$CFG->wwwroot.'/user/pix.php?file=/'.$user->id.'/f2.jpg" style="height: 16px; width:16px; vertical-align: middle;" alt="" /> ';
}
$this->content->text .= $imgtag;
}
Expand All @@ -142,7 +142,7 @@ function get_content() {
// Slightly hacky way to do it but...
ob_start();
print_table($table);
//$this->content->text .= "<br>".ob_get_contents();
//$this->content->text .= "<br />".ob_get_contents();
ob_end_clean();
*/
} else {
Expand Down
2 changes: 1 addition & 1 deletion blocks/section_links/block_section_links.php
Expand Up @@ -80,7 +80,7 @@ function get_content() {
$isvisible = get_field('course_sections', 'visible', 'course', $this->course->id, 'section', $highlight);
if ($isvisible or isteacher($this->course->id)) {
$style = ($isvisible) ? '' : ' class="dimmed"';
$text .= "<br><a href=\"$link$highlight\"$style>$linktext</a>";
$text .= "<br /><a href=\"$link$highlight\"$style>$linktext</a>";
}
}

Expand Down

0 comments on commit 839f245

Please sign in to comment.