?>
<form method="post" enctype="multipart/form-data" action="edit.php">
-<table cellpadding=9 cellspacing=0 >
+<table cellpadding="9" cellspacing="0" >
<?php
if (isadmin()) {
$theadmin = get_admin();
$adminself = (($theadmin->id == $USER->id) and ($USER->id == $user->id));
- echo "<tr valign=top>";
- echo "<td align=right><p>".get_string("username").":</td>";
+ echo "<tr valign=\"top\">";
+ echo "<td align=\"right\"><p>".get_string("username").":</p></td>";
if ($adminself || is_internal_auth($user->auth) ){
- echo "<td><input type=\"text\" name=\"username\" size=20 value=\"";
+ echo "<td><input type=\"text\" name=\"username\" size=\"20\" value=\"";
p($user->username);
- echo "\">";
+ echo "\"/>";
if (isset($err["username"])) formerr($err["username"]);
} else {
echo "<td>";
p($user->username);
echo "<input type=\"hidden\" name=\"username\" value=\"";
p($user->username);
- echo "\">";
+ echo "\"/>";
}
echo "</td>";
echo "</tr>";
if ($adminself || is_internal_auth($user->auth) ){
- echo "<tr valign=top>";
- echo "<td align=right><p>".get_string("newpassword").":</td>";
- echo "<td><input type=\"text\" name=\"newpassword\" size=20 value=\"";
+ echo "<tr valign=\"top\">";
+ echo "<td align=\"right\"><p>".get_string("newpassword").":</p></td>";
+ echo "<td><input type=\"text\" name=\"newpassword\" size=\"20\" value=\"";
if (isset($user->newpassword)) p($user->newpassword);
- echo "\">";
+ echo "\"/>";
if (isset($err["newpassword"])) {
formerr($err["newpassword"]);
} else if (empty($user->newpassword)) {
}
echo "</td>";
echo "</tr>";
- echo "<tr><td colspan=2><HR></td></tr>";
+ echo "<tr><td colspan=\"2\"><hr /></td></tr>";
}
}
?>
-<tr valign=top>
- <td align=right><p><?php print_string("firstname") ?>:</td>
- <td><input type="text" name="firstname" size="30" maxlength="20" value="<?php p($user->firstname) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("firstname") ?>:</p></td>
+ <td><input type="text" name="firstname" size="30" maxlength="20" value="<?php p($user->firstname) ?>" />
<?php if (isset($err["firstname"])) formerr($err["firstname"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("lastname") ?>:</td>
- <td><input type="text" name="lastname" size="30" maxlength="20" value="<?php p($user->lastname) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("lastname") ?>:</p></td>
+ <td><input type="text" name="lastname" size="30" maxlength="20" value="<?php p($user->lastname) ?>" />
<?php if (isset($err["lastname"])) formerr($err["lastname"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("email") ?>:</td>
- <td><input type="text" name="email" size="30" maxlength="100" value="<?php p($user->email) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("email") ?>:</p></td>
+ <td><input type="text" name="email" size="30" maxlength="100" value="<?php p($user->email) ?>" />
<?php if (isset($err["email"])) formerr($err["email"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("emaildisplay") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("emaildisplay") ?>:</p></td>
<td><?php
unset($choices);
$choices["0"] = get_string("emaildisplayno");
choose_from_menu ($choices, "maildisplay", $user->maildisplay, "") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("emailactive") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("emailactive") ?>:</p></td>
<td><?php
unset($choices);
$choices["0"] = get_string("emailenable");
choose_from_menu ($choices, "emailstop", $user->emailstop, "") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("emailformat") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("emailformat") ?>:</p></td>
<td><?php
unset($choices);
$choices["0"] = get_string("textformat");
choose_from_menu ($choices, "mailformat", $user->mailformat, "") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string('emaildigest') ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string('emaildigest') ?>:</p></td>
<td><?php
unset($choices);
$choices['0'] = get_string('emaildigestoff');
choose_from_menu ($choices, 'maildigest', $user->maildigest, "") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("autosubscribe") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("autosubscribe") ?>:</p></td>
<td><?php
unset($choices);
$choices["1"] = get_string("autosubscribeyes");
</td>
</tr>
<?php if ($CFG->htmleditor) { ?>
-<tr valign=top>
- <td align=right><p><?php print_string("textediting") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("textediting") ?>:</p></td>
<td><?php
unset($choices);
$choices["0"] = get_string("texteditor");
</td>
</tr>
<?php } ?>
-<tr valign=top>
- <td align=right><p><?php print_string("city") ?>:</td>
- <td><input type="text" name="city" size="25" maxlength="20" value="<?php p($user->city) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("city") ?>:</p></td>
+ <td><input type="text" name="city" size="25" maxlength="20" value="<?php p($user->city) ?>" />
<?php if (isset($err["city"])) formerr($err["city"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("country") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("country") ?>:</p></td>
<td><?php
if (!$user->country and $CFG->country) {
<?php if (isset($err["country"])) formerr($err["country"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("preferredlanguage") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("preferredlanguage") ?>:</p></td>
<td><?php if ($languages = get_list_of_languages()) {
if (!$user->lang) {
$user->lang = $CFG->lang;
?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("timezone") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("timezone") ?>:</p></td>
<td><?php
if (abs($user->timezone) > 13) {
$user->timezone = 99;
?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("userdescription") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("userdescription") ?>:</p></td>
<td><?php if (isset($err["description"])) {
formerr($err["description"]);
echo "<br />";
$maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes);
if (!empty($CFG->gdversion) and $maxbytes and empty($CFG->disableuserimages)) {
?>
-<tr valign=top>
- <td align=right><p><?php print_string("currentpicture") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("currentpicture") ?>:</p></td>
<td>
<?php print_user_picture($user->id, $course->id, $user->picture, false, false, false);
if ($user->picture) {
?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("newpicture") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("newpicture") ?>:</p></td>
<td>
- <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxbytes ?>">
- <input type="file" name="imagefile" size=40>
+ <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxbytes ?>" />
+ <input type="file" name="imagefile" size=40 />
<?php helpbutton("picture", get_string("helppicture"));
print_string("maxsize", "", display_size($maxbytes));
if (isset($err["imagefile"])) formerr($err["imagefile"]);
</td>
</tr>
<?php } else if (empty($CFG->gdversion) and isadmin()) { ?>
-<tr valign=top>
- <td align=right><p><?php print_string("newpicture") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("newpicture") ?>:</p></td>
<td>
<?php
echo "<a href=\"$CFG->wwwroot/$CFG->admin/config.php\">";
</tr>
<?php } ?>
-<tr valign=top>
- <td align=right><p><?php print_string("webpage") ?>:</td>
- <td><input type="text" name="url" size="50" maxlength="255" value="<?php p($user->url) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("webpage") ?>:</p></td>
+ <td><input type="text" name="url" size="50" maxlength="255" value="<?php p($user->url) ?>" />
<?php if (isset($err["url"])) formerr($err["url"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("icqnumber") ?>:</td>
- <td><input type="text" name="icq" size="25" maxlength="15" value="<?php p($user->icq) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("icqnumber") ?>:</p></td>
+ <td><input type="text" name="icq" size="25" maxlength="15" value="<?php p($user->icq) ?>" />
<?php if (isset($err["icq"])) formerr($err["icq"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("idnumber") ?>:</td>
- <td><input type="text" name="idnumber" size="25" maxlength="12" value="<?php p($user->idnumber) ?>"> <?php p($teacheronly) ?>
+<tr valign="top">
+ <td align="right"><p><?php print_string("idnumber") ?>:</p></td>
+ <td><input type="text" name="idnumber" size="25" maxlength="12" value="<?php p($user->idnumber) ?>" /> <?php p($teacheronly) ?>
<?php if (isset($err["idnumber"])) formerr($err["idnumber"]); ?>
</td>
</tr>
<?php if (isadmin()) { ?>
-<tr valign=top>
- <td align=right><p><?php print_string("institution") ?>:</td>
- <td><input type="text" name="institution" size="25" maxlength="40" value="<?php p($user->institution) ?>"> <?php p($teacheronly) ?>
+<tr valign="top">
+ <td align="right"><p><?php print_string("institution") ?>:</p></td>
+ <td><input type="text" name="institution" size="25" maxlength="40" value="<?php p($user->institution) ?>" /> <?php p($teacheronly) ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("department") ?>:</td>
- <td><input type="text" name="department" size="25" maxlength="30" value="<?php p($user->department) ?>"> <?php p($teacheronly) ?>
+<tr valign="top">
+ <td align="right"><p><?php print_string("department") ?>:</p></td>
+ <td><input type="text" name="department" size="25" maxlength="30" value="<?php p($user->department) ?>" /> <?php p($teacheronly) ?>
</td>
</tr>
<?php } ?>
-<tr valign=top>
- <td align=right><p><?php print_string("phone") ?> 1:</td>
- <td><input type="text" name="phone1" size="25" maxlength="20" value="<?php p($user->phone1) ?>"> <?php p($teacheronly) ?>
+<tr valign="top">
+ <td align="right"><p><?php print_string("phone") ?> 1:</p></td>
+ <td><input type="text" name="phone1" size="25" maxlength="20" value="<?php p($user->phone1) ?>" /> <?php p($teacheronly) ?>
<?php if (isset($err["phone1"])) formerr($err["phone1"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("phone") ?> 2:</td>
- <td><input type="text" name="phone2" size="25" maxlength="20" value="<?php p($user->phone2) ?>"> <?php p($teacheronly) ?>
+<tr valign="top">
+ <td align="right"><p><?php print_string("phone") ?> 2:</p></td>
+ <td><input type="text" name="phone2" size="25" maxlength="20" value="<?php p($user->phone2) ?>"/> <?php p($teacheronly) ?>
<?php if (isset($err["phone2"])) formerr($err["phone2"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><?php print_string("address") ?>:</td>
- <td><input type="text" name="address" size="25" maxlength="70" value="<?php p($user->address) ?>"> <?php p($teacheronly) ?>
+<tr valign="top">
+ <td align="right"><p><?php print_string("address") ?>:</p></td>
+ <td><input type="text" name="address" size="25" maxlength="70" value="<?php p($user->address) ?>" /> <?php p($teacheronly) ?>
<?php if (isset($err["address"])) formerr($err["address"]); ?>
</td>
</tr>
<tr>
<td></td>
- <td align=right><input type="submit" value="<?php print_string("updatemyprofile") ?>"></td>
+ <td align="right"><input type="submit" value="<?php print_string("updatemyprofile") ?>" /></td>
</table>
-<input type="hidden" name="course" value="<?php p($course->id) ?>">
-<input type="hidden" name="id" value="<?php p($user->id) ?>">
+<input type="hidden" name="course" value="<?php p($course->id) ?>" />
+<input type="hidden" name="id" value="<?php p($user->id) ?>" />
</form>
if ($course->category) {
print_header("$course->shortname: ".get_string("participants"), "$course->fullname",
- "<A HREF=../course/view.php?id=$course->id>$course->shortname</A> -> ".
+ "<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> -> ".
"$participantslink", "", "", true, " ", navmenu($course));
} else {
print_header("$course->shortname: ".get_string("participants"), "$course->fullname",
}
}
- echo "<h2 align=center>$totalcount $course->students";
+ echo "<h2 align=\"center\">$totalcount $course->students";
if (isteacheredit($course->id)) {
echo ' <a href="../course/student.php?id='.$course->id.'">';
- echo '<img src="'.$CFG->pixpath.'/i/edit.gif" height="16" width="16" alt=""></a>';
+ echo '<img src="'.$CFG->pixpath.'/i/edit.gif" height="16" width="16" alt="" /></a>';
}
echo '</h2>';
if (($CFG->longtimenosee < 500) and (!$page) and ($sort == "lastaccess")) {
- echo "<center><p><font size=1>(";
+ echo "<center><p><font size=\"1\">(";
print_string("unusedaccounts","",$CFG->longtimenosee);
echo ")</font></p></center>";
}
$table->head = array (" ", "$firstname / $lastname", $city, $country, $lastaccess);
- $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left", "left", "left");
$table->size = array ("10", "*", "*", "*", "*");
$table->size = array ("10", "*", "*", "*", "*");
$table->cellpadding = 4;
$table->data[] = array ($picture,
"<b><a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a></b>",
- "<font size=2>$user->city</font>",
- "<font size=2>$user->country</font>",
- "<font size=2>$lastaccess</font>");
+ "<font size=\"2\">$user->city</font>",
+ "<font size=\"2\">$user->country</font>",
+ "<font size=\"2\">$lastaccess</font>");
}
print_table($table);
}
// Print name and edit button across top
- echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td nowrap>";
+ echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td nowrap=\"nowrap\">";
echo "<h3>$fullname</h3>";
echo "</td><td align=\"right\">";
if (($currentuser and !isguest()) or isadmin()) {
// Print the description
if ($user->description) {
- echo "<p>".format_text($user->description, FORMAT_MOODLE)."</p><hr>";
+ echo "<p>".format_text($user->description, FORMAT_MOODLE)."</p><hr />";
}
// Print all the little details in a list
}
$emailswitch = " <a title=\"$switchclick\" ".
"href=\"view.php?id=$user->id&course=$course->id&$switchparam=$user->id\">".
- "<img border=\"0\" width=11 height=11 src=\"$CFG->pixpath/t/$switchpix\"></a>";
+ "<img border=\"0\" width=11 height=11 src=\"$CFG->pixpath/t/$switchpix\" /></a>";
} else {
$emailswitch = '';
}
}
if ($user->icq) {
- print_row("ICQ:","<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&img=5\" width=18 height=18 border=0></a>");
+ print_row("ICQ:","<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&img=5\" width=\"18\" height=\"18\" border=\"0\" /></a>");
}
if (isteacher($course->id)) {
}
// Print other functions
- echo "<center><table align=center><tr>";
+ echo "<center><table align=\"center\"><tr>";
if ($currentuser and !isguest()) {
if ($internalpassword) {
- echo "<td nowrap><p><form action=\"$internalpassword\" method=get>";
- echo "<input type=hidden name=id value=\"$course->id\">";
- echo "<input type=submit value=\"".get_string("changepassword")."\">";
+ echo "<td nowrap=\"nowrap\"><p><form action=\"$internalpassword\" method=\"get\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
echo "</form></p></td>";
} else if (strlen($CFG->changepassword) > 1) {
- echo "<td nowrap><p><form action=\"$CFG->changepassword\" method=get>";
- echo "<input type=submit value=\"".get_string("changepassword")."\">";
+ echo "<td nowrap=\"nowrap\"><p><form action=\"$CFG->changepassword\" method=\"get\">";
+ echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
echo "</form></p></td>";
}
}
if ($course->category and
((isstudent($course->id) and ($user->id == $USER->id) and !isguest() and $CFG->allowunenroll) or
(isteacheredit($course->id) and isstudent($course->id, $user->id))) ) {
- echo "<td nowrap><p><form action=\"../course/unenrol.php\" method=get>";
- echo "<input type=hidden name=id value=\"$course->id\">";
- echo "<input type=hidden name=user value=\"$user->id\">";
- echo "<input type=submit value=\"".get_string("unenrolme", "", $course->shortname)."\">";
+ echo "<td nowrap=\"nowrap\"><p><form action=\"../course/unenrol.php\" method=\"get\" />";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
+ echo "<input type=\"submit\" value=\"".get_string("unenrolme", "", $course->shortname)."\">";
echo "</form></p></td>";
}
if (isteacher($course->id) or ($course->showreports and $USER->id == $user->id)) {
- echo "<td nowrap><p><form action=\"../course/user.php\" method=get>";
- echo "<input type=hidden name=id value=\"$course->id\">";
- echo "<input type=hidden name=user value=\"$user->id\">";
- echo "<input type=submit value=\"".get_string("activityreport")."\">";
+ echo "<td nowrap=\"nowrap\"><p><form action=\"../course/user.php\" method=\"get\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
+ echo "<input type=\"submit\" value=\"".get_string("activityreport")."\" />";
echo "</form></p></td>";
}
if ((isadmin() and !isadmin($user->id)) or (isteacher($course->id) and ($USER->id != $user->id) and !iscreator($user->id))) {
- echo "<td nowrap><p><form action=\"../course/loginas.php\" method=get>";
- echo "<input type=hidden name=id value=\"$course->id\">";
- echo "<input type=hidden name=user value=\"$user->id\">";
- echo "<input type=submit value=\"".get_string("loginas")."\">";
+ echo "<td nowrap=\"nowrap\"><p><form action=\"../course/loginas.php\" method=\"get\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
+ echo "<input type=\"submit\" value=\"".get_string("loginas")."\" />";
echo "</form></p></td>";
}
echo "</tr></table></center>\n";
/// Functions ///////
function print_row($left, $right) {
- echo "<tr><td nowrap align=right valign=top><p>$left</td><td align=left valign=top><p>$right</p></td></tr>";
+ echo "<tr><td nowrap=\"nowrap\" align=\"right\" valign=\"top\"><p>$left</p></td><td align=\"left\" valign=\"top\"><p>$right</p></td></tr>";
}
?>