-<?PHP // $Id$
+<?php // $Id$
// Displays the top level category or all courses
// In editing mode, allows the admin to edit a category,
// and rearrange courses
}
if ($abletomovecourses) {
- echo "<tr><td colspan=3 align=right>";
+ echo "<tr><td colspan=\"3\" align=\"right\">";
echo "<br />";
unset($displaylist[$category->id]);
choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript:document.movecourses.submit()");
-<?PHP // $Id$
+<?php // $Id$
// Admin-only code to delete a course utterly
require_once("../config.php");
"<a href=\"category.php?id=$course->category\">$category->name</a> -> ".
"$strdeletecheck");
- notice_yesno("$strdeletecoursecheck<BR><BR>$course->fullname ($course->shortname)",
+ notice_yesno("$strdeletecoursecheck<br /><br />$course->fullname ($course->shortname)",
"delete.php?id=$course->id&delete=".md5($course->timemodified),
"category.php?id=$course->category");
exit;
-<?PHP
+<?php
// Make sure all variables are defined
if (!isset($form->showreports)) {
$form->showreports = 0;
$form->enrolperiod = 0;
}
?>
-<FORM METHOD="post" action="edit.php" NAME="form">
-<table cellpadding=9 cellspacing=0 >
-<tr valign=top>
- <td align="right"><P><?php print_string("category") ?>:</td>
+<form method="post" action="edit.php" name="form">
+<table cellpadding="9" cellspacing="0" >
+<tr valign="top">
+ <td align="right"><p><?php print_string("category") ?>:</td>
<td><?php
$displaylist = array();
$parentlist = array();
?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("fullname") ?>:</td>
- <td><input type="text" name="fullname" maxlength="254" size=50 value="<?php p($form->fullname) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("fullname") ?>:</td>
+ <td><input type="text" name="fullname" maxlength="254" size="50" value="<?php p($form->fullname) ?>" />
<?php helpbutton("coursefullname", get_string("fullname")) ?>
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("shortname") ?>:</td>
- <td><input type="text" name="shortname" maxlength="15" size="10" value="<?php p($form->shortname) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("shortname") ?>:</td>
+ <td><input type="text" name="shortname" maxlength="15" size="10" value="<?php p($form->shortname) ?>" />
<?php helpbutton("courseshortname", get_string("shortname")) ?>
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("idnumber") ?>:</td>
- <td><input type="text" name="idnumber" maxlength="100" size="10" value="<?php p($form->idnumber) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("idnumber") ?>:</td>
+ <td><input type="text" name="idnumber" maxlength="100" size="10" value="<?php p($form->idnumber) ?>" />
<?php helpbutton("courseidnumber", get_string("idnumber")) ?>
<?php if (isset($err["idnumber"])) formerr($err["idnumber"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("summary") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("summary") ?>:</td>
<td><?php
print_textarea($usehtmleditor, 10, 50, 660, 200, "summary", $form->summary);
helpbutton("text", get_string("helptext"));
?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("format") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("format") ?>:</td>
<td><?php
choose_from_menu ($form->courseformats, "format", "$form->format", "");
helpbutton("courseformats", get_string("courseformats"));
?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("startdate") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("startdate") ?>:</td>
<td><?php
print_date_selector("startday", "startmonth", "startyear", $form->startdate);
helpbutton("coursestartdate", get_string("startdate"));
?></td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("enrolperiod") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("enrolperiod") ?>:</td>
<td>
<?php
$periodmenu[0] = get_string('unlimited');
?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("numberweeks") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("numberweeks") ?>:</td>
<td><?php
for ($i=1; $i<=52; $i++) {
$sectionmenu[$i] = "$i";
helpbutton("coursenumsections", get_string("numberweeks"));
?></td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("groupmode") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("groupmode") ?>:</td>
<td><?php
unset($choices);
$choices[NOGROUPS] = get_string("groupsnone");
helpbutton("groupmodeforce", get_string("groupmodeforce")); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("availability") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("availability") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("courseavailablenot");
helpbutton("courseavailability", get_string("availability")); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("enrolmentkey") ?>:</td>
- <td><input type="text" name="password" size=25 value="<?php p($form->password) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("enrolmentkey") ?>:</td>
+ <td><input type="text" name="password" size="25" value="<?php p($form->password) ?>" />
<?php helpbutton("enrolmentkey", get_string("enrolmentkey")) ?>
<?php if (isset($err["password"])) formerr($err["password"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("opentoguests") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("opentoguests") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("guestsno");
<?php
if ($CFG->enrol != 'internal') {
?>
-<tr valign=top>
- <td align="right"><P><?php print_string("cost") ?>:</td>
- <td><input type="text" name="cost" maxlength="6" size=6 value="<?php p($form->cost) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("cost") ?>:</td>
+ <td><input type="text" name="cost" maxlength="6" size="6" value="<?php p($form->cost) ?>" />
</td>
</tr>
<?php
}
?>
-<tr valign=top>
- <td align="right"><P><?php print_string("hiddensections") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("hiddensections") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("hiddensectionscollapsed");
helpbutton("coursehiddensections", get_string("hiddensections")); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("newsitemsnumber") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("newsitemsnumber") ?>:</td>
<td><?php
$newsitem = get_string("newsitem");
$newsitems = get_string("newsitems");
?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("showgrades") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("showgrades") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("no");
helpbutton("coursegrades", get_string("grades")); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("showreports") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("showreports") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("no");
helpbutton("coursereports", get_string("activityreport")); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("maximumupload") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("maximumupload") ?>:</td>
<td><?php
$choices = get_max_upload_sizes($CFG->maxbytes);
choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
helpbutton("courseuploadsize", get_string("maximumupload")); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("wordforteacher") ?>:</td>
- <td><input type="text" name="teacher" maxlength="100" size=25 value="<?php p($form->teacher) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("wordforteacher") ?>:</td>
+ <td><input type="text" name="teacher" maxlength="100" size="25" value="<?php p($form->teacher) ?>" />
(<?php print_string("wordforteachereg") ?>)
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("wordforteachers") ?>:</td>
- <td><input type="text" name="teachers" maxlength="100" size=25 value="<?php p($form->teachers) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("wordforteachers") ?>:</td>
+ <td><input type="text" name="teachers" maxlength="100" size="25" value="<?php p($form->teachers) ?>" />
(<?php print_string("wordforteacherseg") ?>)
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("wordforstudent") ?>:</td>
- <td><input type="text" name="student" maxlength="100" size=25 value="<?php p($form->student) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("wordforstudent") ?>:</td>
+ <td><input type="text" name="student" maxlength="100" size="25" value="<?php p($form->student) ?>" />
(<?php print_string("wordforstudenteg") ?>)
<?php if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("wordforstudents") ?>:</td>
- <td><input type="text" name="students" maxlength="100" size=25 value="<?php p($form->students) ?>">
+<tr valign="top">
+ <td align="right"><p><?php print_string("wordforstudents") ?>:</td>
+ <td><input type="text" name="students" maxlength="100" size="25" value="<?php p($form->students) ?>" />
(<?php print_string("wordforstudentseg") ?>)
<?php if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("forcelanguage") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("forcelanguage") ?>:</td>
<td>
<?php
$languages[''] = get_string("forceno");
</tr>
<tr>
<td></td>
- <td><input type="submit" value="<?php print_string("savechanges") ?>"></td>
+ <td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</table>
-<input type="hidden" name="id" value="<?php echo $form->id ?>">
+<input type="hidden" name="id" value="<?php echo $form->id ?>" />
</form>
-<?PHP // $Id$
+<?php // $Id$
// Edit course settings
require_once("../config.php");
<center>
<form name="theform" method="post" action="editsection.php">
-<table cellpadding=5>
-<tr valign=top>
- <td align=right><p><b><?php print_string("summary") ?>:</b></p>
+<table cellpadding="5">
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("summary") ?>:</b></p>
<br />
<font size="1">
<?php helpbutton("summaries", get_string("helpsummaries"), "moodle", true, true);
</td>
</tr>
</table>
-<input type="hidden" name=id value="<?php echo $form->id ?>">
-<input type="submit" value="<?php print_string("savechanges") ?>">
+<input type="hidden" name="id" value="<?php echo $form->id ?>" />
+<input type="submit" value="<?php print_string("savechanges") ?>" />
</form>
</center>
-<?PHP // $Id$
+<?php // $Id$
// Edit the introduction of a section
require_once("../config.php");
$stredit = get_string("edit", "", " $sectionname $section->section");
print_header("$course->shortname: $stredit", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> $stredit");
print_heading(get_string("summaryof", "", "$sectionname $form->section"));
-<table cellpadding="20" align="center">\r
- <tr valign="top">\r
- <td>\r
- <p align="center">\r
- <?php\r
- if ($teacher) {\r
- $teachername = "<a href=\"../user/view.php?id=$teacher->id&course=$site->id\">".\r
- "$teacher->firstname $teacher->lastname</a>.";\r
- } else {\r
- $teachername = get_string("yourteacher", "", strtolower($course->teacher));\r
- }\r
- print_string("enrolmentkeyfrom", "", $teachername);\r
- ?>\r
- </p>\r
- </td>\r
-\r
- </tr>\r
- <tr valign=top>\r
- <td class="generalbox" bgcolor="<?php p($THEME->cellheading)?>"><center><?php if (isset ($errormsg)) {formerr($errormsg);} ?></center>\r
- <form name="form" method="post" action="enrol.php">\r
- <table>\r
- <tr>\r
- <td width="50%" align="right"><p><?php print_string("enrolmentkey") ?>:</p></td>\r
- <td width="50%">\r
- <input type="password" name="password" size="20" value="<?php p($password) ?>" >\r
- <input type="hidden" name="id" value="<?php p($id) ?>" >\r
- </td>\r
- <tr>\r
- <td width="50%"> </td>\r
- <td width="50%">\r
- <table cellpadding="1" cellspacing="0" align="center">\r
- <tr>\r
-\r
- <td><input type="submit" value="<?php print_string("login") ?>"> </form></td>\r
- <td><form action="<?php p($CFG->wwwroot)?>/index.php" method=post>\r
- <input type="submit" value="<?php print_string("cancel") ?>"></form></td>\r
- </tr>\r
- </table>\r
- </td>\r
- </table>\r
- </td>\r
-\r
- </tr>\r
-</table>\r
-\r
+<table cellpadding="20" align="center">
+
+ <tr valign="top">
+
+ <td>
+
+ <p align="center">
+
+ <?php
+
+ if ($teacher) {
+
+ $teachername = "<a href=\"../user/view.php?id=$teacher->id&course=$site->id\">".
+
+ "$teacher->firstname $teacher->lastname</a>.";
+
+ } else {
+
+ $teachername = get_string("yourteacher", "", strtolower($course->teacher));
+
+ }
+
+ print_string("enrolmentkeyfrom", "", $teachername);
+
+ ?>
+
+ </p>
+
+ </td>
+
+
+
+ </tr>
+
+ <tr valign="top">
+
+ <td class="generalbox" bgcolor="<?php p($THEME->cellheading)?>"><center><?php if (isset ($errormsg)) {formerr($errormsg);} ?></center>
+
+ <form name="form" method="post" action="enrol.php">
+
+ <table>
+
+ <tr>
+
+ <td width="50%" align="right"><p><?php print_string("enrolmentkey") ?>:</p></td>
+
+ <td width="50%">
+
+ <input type="password" name="password" size="20" value="<?php p($password) ?>" />
+
+ <input type="hidden" name="id" value="<?php p($id) ?>" />
+
+ </td>
+
+ <tr>
+
+ <td width="50%"> </td>
+
+ <td width="50%">
+
+ <table cellpadding="1" cellspacing="0" align="center">
+
+ <tr>
+
+
+
+ <td><input type="submit" value="<?php print_string("login") ?>" /> </form></td>
+
+ <td><form action="<?php p($CFG->wwwroot)?>/index.php" method="post">
+
+ <input type="submit" value="<?php print_string("cancel") ?>" /></form></td>
+
+ </tr>
+
+ </table>
+
+ </td>
+
+ </table>
+
+ </td>
+
+
+
+ </tr>
+
+</table>
+
+
+
-<?PHP // $Id$
+<?php // $Id$
// Depending on the current enrolment method, this page
// presents the user with whatever they need to know when
// they try to enrol in a course.
-<?PHP // $Id$
+<?php // $Id$
// Display the whole course as "weeks" made of of modules
// Included from "view.php"
/// Layout the whole page as three big columns.
- echo "<table border=0 cellpadding=3 cellspacing=0 width=100%>";
+ echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width="100%">";
- echo "<tr valign=top>\n";
+ echo "<tr valign=\"top\">\n";
/// The left column ...
$stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname)));
$strcancel= get_string("cancel");
echo "<tr>";
- echo "<td colspan=3 valign=top bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlineclip\" width=\"100%\">";
- echo "<p><font size=2>";
+ echo "<td colspan=\"3\" valign=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlineclip\" width=\"100%\">";
+ echo "<p><font size=\"2\">";
echo "$stractivityclipboard (<a href=\"mod.php?cancelcopy=true\">$strcancel</a>)";
echo "</font></p>";
echo "</td>";
echo "</tr>";
- echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
+ echo "<tr><td colspan=\"3\"><img src=\"../pix/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";
}
/// Print Section 0 with general activities
if ($thissection->summary or $thissection->sequence or isediting($course->id)) {
echo "<tr>";
- echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=top width=20> </td>";
- echo "<td valign=top bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\" width=\"100%\">";
+ echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=\"top\" width=\"20\"> </td>";
+ echo "<td valign=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\" width=\"100%\">";
$summaryformatoptions->noclean = true;
echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
if (isediting($course->id)) {
echo " <a title=\"$streditsummary\" ".
- " href=\"editsection.php?id=$thissection->id\"><img height=11 width=11 src=\"$CFG->pixpath/t/edit.gif\" ".
- " border=0 alt=\"$streditsummary\"></a><br />";
+ " href=\"editsection.php?id=$thissection->id\"><img height=\"11\" width=\"11\" src=\"$CFG->pixpath/t/edit.gif\" ".
+ " border=\"0\" alt=\"$streditsummary\"></a><br />";
}
echo '<br clear="all">';
}
echo "</td>";
- echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=top align=center width=10>";
+ echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=\"top\" align=\"center\" width=\"10\">";
echo " </td></tr>";
- echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
+ echo "<tr><td colspan=\"3\"><img src=\"../pix/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";
}
}
echo "<tr>";
- echo "<td nowrap $colorsides valign=top width=20>";
- echo "<p align=center><font size=3><a name=\"$section\">$section</a></font></p>";
+ echo "<td nowrap $colorsides valign=\"top\" width=\"20\">";
+ echo "<p align=\"center\"><font size=\"3\"><a name=\"$section\">$section</a></font></p>";
echo "</td>";
- echo "<td valign=top $colormain width=\"100%\">";
+ echo "<td valign=\"top\" $colormain width=\"100%\">";
if (!isteacher($course->id) and !$thissection->visible) { // Hidden for students
echo "<p class=\"weeklydatetext\">$weekday - $endweekday ";
if (isediting($course->id)) {
echo " <a title=\"$streditsummary\" href=\"editsection.php?id=$thissection->id\">".
- "<img src=\"$CFG->pixpath/t/edit.gif\" height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\"></a><br />";
}
echo '<br clear="all">';
echo "</td>";
}
- echo "<td nowrap $colorsides valign=top align=center width=10>";
- echo "<font size=1>";
+ echo "<td nowrap $colorsides valign=\"top\" align=\"center\" width=\"10\">";
+ echo "<font size=\"1\">";
if ($displaysection == $section) {
echo "<a href=\"view.php?id=$course->id&week=all\" title=\"$strshowallweeks\">".
- "<img src=\"$CFG->pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/all.gif\" height=\"25\" width=\"16\" border=\"0\"></a><br />";
} else {
$strshowonlyweek = get_string("showonlyweek", "", $section);
echo "<a href=\"view.php?id=$course->id&week=$section\" title=\"$strshowonlyweek\">".
- "<img src=\"$CFG->pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/one.gif\" height=\"16\" width=\"16\" border=\"0\"></a><br />";
}
if (isediting($course->id)) {
if ($thissection->visible) { // Show the hide/show eye
echo "<a href=\"view.php?id=$course->id&hide=$section\" title=\"$strweekhide\">".
- "<img src=\"$CFG->pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/hide.gif\" vspace=\"3\" height=\"16\" width=\"16\" border=\"0\"></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&show=$section\" title=\"$strweekshow\">".
- "<img src=\"$CFG->pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/i/show.gif\" vspace=\"3\" height=\"16\" width=\"16\" border=\"0\"></a><br />";
}
if ($section > 1) { // Add a arrow to move section up
echo "<a href=\"view.php?id=$course->id§ion=$section&move=-1\" title=\"$strmoveup\">".
- "<img src=\"$CFG->pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/up.gif\" vspace=\"3\" height=\"11\" width=\"11\" border=\"0\"></a><br />";
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo "<a href=\"view.php?id=$course->id§ion=$section&move=1\" title=\"$strmovedown\">".
- "<img src=\"$CFG->pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
+ "<img src=\"$CFG->pixpath/t/down.gif\" vspace=\"3\" height=\"11\" width=\"11\" border=\"0\"></a><br />";
}
}
echo "</td>";
echo "</tr>";
- echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
+ echo "<tr><td colspan=\"3\"><img src=\"../pix/spacer.gif\" width=\"1\" height=\"1\"></td></tr>";
}
$section++;
-<?PHP // $Id$
+<?php // $Id$
// Displays all grades for a student in a course
require_once("../config.php");
if (function_exists($gradefunction)) { // Skip modules without grade function
if ($modgrades = $gradefunction($mod->instance)) {
- $image = "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\"".
- " TITLE=\"$mod->modfullname\">".
- "<IMG BORDER=0 VALIGN=absmiddle SRC=\"../mod/$mod->modname/icon.gif\" ".
- "HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\"></A>";
+ $image = "<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\"".
+ " title=\"$mod->modfullname\">".
+ "<img border=\"0\" valign=\"absmiddle\" src=\"../mod/$mod->modname/icon.gif\" ".
+ "height=\"16\" width=\"16\" alt=\"$mod->modfullname\"></a>";
$columnhtml[] = "$image ".
- "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
+ "<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name".
- "</A>";
+ "</a>";
if (empty($modgrades->grades[$USER->id])) {
$grades[] = "";
/// OK, we have all the data, now present it to the user
print_header("$course->shortname: $strgrades", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> $strgrades");
print_heading($strgrades);
-<?PHP // $Id$
+<?php // $Id$
// Displays all grades for a course
require_once("../config.php");
/// Get a list of all students
if (!$students) {
print_header("$course->shortname: $strgrades", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> $strgrades");
print_heading(get_string("nostudentsyet"));
print_footer($course);
if (!empty($modgrades->maxgrade)) {
if ($mod->visible) {
$maxgrade = "$strmax: $modgrades->maxgrade";
- $maxgradehtml = "<BR>$strmax: $modgrades->maxgrade";
+ $maxgradehtml = "<br />$strmax: $modgrades->maxgrade";
} else {
$maxgrade = "$strmax: $modgrades->maxgrade";
- $maxgradehtml = "<BR><FONT class=\"dimmed_text\">$strmax: $modgrades->maxgrade</FONT>";
+ $maxgradehtml = "<br /><font class=\"dimmed_text\">$strmax: $modgrades->maxgrade</font>";
}
} else {
$maxgrade = "";
$maxgradehtml = "";
}
- $image = "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\"".
- " TITLE=\"$mod->modfullname\">".
- "<IMG BORDER=0 VALIGN=absmiddle SRC=\"../mod/$mod->modname/icon.gif\" ".
- "HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\"></A>";
+ $image = "<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\"".
+ " title=\"$mod->modfullname\">".
+ "<img border=\"0\" valign=\"absmiddle\" src=\"../mod/$mod->modname/icon.gif\" ".
+ "height=\"16\" width=\"16\" alt=\"$mod->modfullname\"></a>";
if ($mod->visible) {
$columnhtml[] = "$image ".
- "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
+ "<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name".
- "</A>$maxgradehtml";
+ "</a>$maxgradehtml";
} else {
$columnhtml[] = "$image ".
- "<A CLASS=\"dimmed\" HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
+ "<a class=\"dimmed\" href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name".
- "</A>$maxgradehtml";
+ "</a>$maxgradehtml";
}
$columns[] = "$mod->modfullname: $instance->name - $maxgrade";
if ($mod->visible) {
$gradeshtml[$student->id][] = $modgrades->grades[$student->id];
} else {
- $gradeshtml[$student->id][] = "<FONT class=\"dimmed_text\">".
+ $gradeshtml[$student->id][] = "<font class=\"dimmed_text\">".
$modgrades->grades[$student->id].
- "</FONT>";
+ "</font>";
}
} else {
$grades[$student->id][] = $currentstudentgrade = "";
} else { // Just print the web page
print_header("$course->shortname: $strgrades", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> $strgrades");
print_heading($strgrades);
setup_and_print_groups($course, $groupmode, "grades.php?id=$course->id");
- echo "<TABLE BORDER=0 ALIGN=CENTER><TR>";
- echo "<TD>";
+ echo "<table border=\"0\" align=\"center\"><tr>";
+ echo "<td>";
$options["id"] = "$course->id";
$options["download"] = "xls";
print_single_button("grades.php", $options, get_string("downloadexcel"));
- echo "<TD>";
+ echo "<td>";
$options["download"] = "txt";
print_single_button("grades.php", $options, get_string("downloadtext"));
- echo "</TABLE>";
+ echo "</table>";
$table->head = array_merge(array ("", get_string("firstname"), get_string("lastname")), $columnhtml, array(get_string("total")));
<form method="post" enctype="multipart/form-data" action="group.php">
-<table cellpadding=9 cellspacing="0" align="center">
+<table cellpadding="9" cellspacing="0" align="center">
<tr valign="top">
<td align="right"><p><?php print_string("name") ?>:</td>
- <td><input type="text" name="name" size=30 value="<?php p($group->name) ?>">
+ <td><input type="text" name="name" size="30" value="<?php p($group->name) ?>" />
<?php if (isset($err["name"])) formerr($err["name"]); ?>
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("description") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("description") ?>:</td>
<td><?php
print_textarea($usehtmleditor, 10, 50, 660, 200, "description", $group->description);
helpbutton("text", get_string("helptext"));
</td>
</tr>
-<tr valign=top>
- <td align="right"><P><?php print_string("hidepicture") ?>:</td>
+<tr valign="top">
+ <td align="right"><p><?php print_string("hidepicture") ?>:</td>
<td><?php
$options = NULL;
$options[0] = get_string("no");
$maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes);
if (!empty($CFG->gdversion) and $maxbytes) {
?>
-<tr valign=top>
+<tr valign="top">
<td align="right"><p><?php print_string("newpicture") ?>:</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"]);
<?php } ?>
<tr>
<td></td>
- <td><input type="submit" value="<?php print_string("savechanges") ?>"></td>
+ <td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</table>
-<input type="hidden" name="group" value="<?php p($group->id) ?>">
-<input type="hidden" name="id" value="<?php p($course->id) ?>">
+<input type="hidden" name="group" value="<?php p($group->id) ?>" />
+<input type="hidden" name="id" value="<?php p($course->id) ?>" />
</form>
-<?PHP // $Id$
+<?php // $Id$
// For most people, just lists the course categories
// Allows the admin to create, delete and rename course categories
echo "<center>";
echo "<form name=\"addform\" action=\"index.php\" method=\"post\">";
- echo "<input type=\"text\" size=30 name=\"addcategory\">";
- echo "<input type=\"submit\" value=\"$straddnewcategory\">";
+ echo "<input type=\"text\" size=\"30\" name=\"addcategory\" />";
+ echo "<input type=\"submit\" value=\"$straddnewcategory\" />";
echo "</form>";
echo "</center>";
$displaylist[0] = get_string("top");
make_categories_list($displaylist, $parentlist, "");
- echo "<table align=\"center\" border=0 cellspacing=2 cellpadding=5 class=\"generalbox\"><tr>";
+ echo "<table align=\"center\" border=\"0\" cellspacing=\"2\" cellpadding=\"5\" class=\"generalbox\"><tr>";
echo "<th>$strcategories</th>";
echo "<th>$strcourses</th>";
echo "<th>$stredit</th>";
echo "<td nowrap=\"nowrap\">"; /// Print little icons
echo "<a title=\"$str->delete\" href=\"index.php?delete=$category->id\"><img".
- " src=\"$pixpath/t/delete.gif\" height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
if (!empty($category->visible)) {
echo "<a title=\"$str->hide\" href=\"index.php?hide=$category->id\"><img".
- " src=\"$pixpath/t/hide.gif\" height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/hide.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
} else {
echo "<a title=\"$str->show\" href=\"index.php?show=$category->id\"><img".
- " src=\"$pixpath/t/show.gif\" height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/show.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
if ($up) {
echo "<a title=\"$str->moveup\" href=\"index.php?moveup=$category->id\"><img".
- " src=\"$pixpath/t/up.gif\" height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/up.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
if ($down) {
echo "<a title=\"$str->movedown\" href=\"index.php?movedown=$category->id\"><img".
- " src=\"$pixpath/t/down.gif\" height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/down.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
echo "</td>";
-<?PHP // $Id$
+<?php // $Id$
/// Displays external information about a course
echo "<center>";
if ($course->guest) {
$strallowguests = get_string("allowguests");
- echo "<p><font size=1><img align=\"absmiddle\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/guest.gif\"></a> $strallowguests</font></p>";
+ echo "<p><font size=\"1\"><img align=\"absmiddle\" alt=\"\" height=\"16\" width=\"16\" border=\"0\" src=\"$pixpath/i/guest.gif\"></a> $strallowguests</font></p>";
}
if ($course->password) {
$strrequireskey = get_string("requireskey");
- echo "<p><font size=1><img align=\"absmiddle\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a> $strrequireskey</font></p>";
+ echo "<p><font size=\"1\"><img align=\"absmiddle\" alt=\"\" height=\"16\" width=\"16\" border=\"0\" src=\"$pixpath/i/key.gif\"></a> $strrequireskey</font></p>";
}
if ($teachers = get_course_teachers($course->id)) {
- echo "<table align=center><tr><td nowrap>";
+ echo "<table align=\"center\"><tr><td nowrap=\"nowrap\">";
echo "<p><font size=\"1\">\n";
foreach ($teachers as $teacher) {
if ($teacher->authority > 0) {
if (! $course->category) {
echo '<td nowrap="nowrap"><font size="2"><a href="view.php?id='.$log->course.'">'.$courses[$log->course].'</a></td>';
}
- echo '<td nowrap align=right><font size="2">'.userdate($log->time, '%a').'</td>';
+ echo '<td nowrap="nowrap" align="right"><font size="2">'.userdate($log->time, '%a').'</td>';
echo '<td nowrap="nowrap"><font size="2">'.userdate($log->time, $strftimedatetime).'</td>';
echo '<td nowrap="nowrap"><font size="2">';
link_to_popup_window("/lib/ipatlas/plot.php?address=$log->ip&user=$log->userid", 'ipatlas',$log->ip, 400, 700);
switch ($log->action) {
case "add mod":
$stradded = get_string("added", "moodle", get_string("modulename", $info[0]));
- $changelist["$log->info"] = array ("operation" => "add", "text" => "$stradded:<BR><A HREF=\"$CFG->wwwroot/course/$log->url\">$modname</A>");
+ $changelist["$log->info"] = array ("operation" => "add", "text" => "$stradded:<br /><a href=\"$CFG->wwwroot/course/$log->url\">$modname</a>");
break;
case "update mod":
$strupdated = get_string("updated", "moodle", get_string("modulename", $info[0]));
if (empty($changelist["$log->info"])) {
- $changelist["$log->info"] = array ("operation" => "update", "text" => "$strupdated:<BR><A HREF=\"$CFG->wwwroot/course/$log->url\">$modname</A>");
+ $changelist["$log->info"] = array ("operation" => "update", "text" => "$strupdated:<br /><a href=\"$CFG->wwwroot/course/$log->url\">$modname</a>");
}
break;
case "delete mod":
echo "<tr><td valign=\"top\" width=\"30\"> ";
echo "</td>\n<td valign=\"top\" width=\"100%\" class=\"coursename\">";
echo "<a $linkcss href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
- echo "</td>\n<td align=\"right\" valign=\"top\" nowrap class=\"coursename\">";
+ echo "</td>\n<td align=\"right\" valign=\"top\" nowrap=\"nowrap\" class=\"coursename\">";
if ($course->guest ) {
echo "<a title=\"$strallowguests\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
- echo "<img hspace=1 alt=\"$strallowguests\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/guest.gif\"></a>";
+ echo "<img hspace=\"1\" alt=\"$strallowguests\" height=\"16\" width=\"16\" border=\"0\" src=\"$CFG->pixpath/i/guest.gif\"></a>";
} else {
- echo "<img alt=\"\" height=16 width=18 border=0 src=\"$CFG->pixpath/spacer.gif\">";
+ echo "<img alt=\"\" height=\"16\" width=\"18\" border=\"0\" src=\"$CFG->pixpath/spacer.gif\">";
}
if ($course->password) {
echo "<a title=\"$strrequireskey\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
- echo "<img hspace=1 alt=\"$strrequireskey\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/key.gif\"></a>";
+ echo "<img hspace=\"1\" alt=\"$strrequireskey\" height=\"16\" width=\"16\" border=\"0\" src=\"$CFG->pixpath/i/key.gif\"></a>";
} else {
- echo "<img alt=\"\" height=16 width=18 border=0 src=\"$CFG->pixpath/spacer.gif\">";
+ echo "<img alt=\"\" height=\"16\" width=\"18\" border=\"0\" src=\"$CFG->pixpath/spacer.gif\">";
}
if ($course->summary) {
link_to_popup_window ("/course/info.php?id=$course->id", "courseinfo",
- "<img hspace=1 alt=\"$strsummary\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/info.gif\">",
+ "<img hspace=\"1\" alt=\"$strsummary\" height=\"16\" width=\"16\" border=\"0\" src=\"$CFG->pixpath/i/info.gif\">",
400, 500, $strsummary);
} else {
- echo "<img alt=\"\" height=16 width=18 border=0 src=\"$CFG->pixpath/spacer.gif\">";
+ echo "<img alt=\"\" height=\"16\" width=\"18\" border=\"0\" src=\"$CFG->pixpath/spacer.gif\">";
}
echo "</td></tr>\n";
}
-<?PHP // $Id$
+<?php // $Id$
// Displays different views of the logs.
require_once("../config.php");
-<?PHP // $Id$
+<?php // $Id$
// Produces a graph of log accesses
require_once("../config.php");
-<?PHP // $Id$
+<?php // $Id$
// Allows a teacher/admin to login as another user (in stealth mode)
require_once("../config.php");
$strloggedinas = get_string("loggedinas", "", $student_name);
print_header("$course->fullname: $strloginas $student_name", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
$strloginas $student_name");
notice($strloggedinas, "$CFG->wwwroot/course/view.php?id=$course->id");
-<?PHP // $Id$
+<?php // $Id$
// Displays live view of recent logs
require_once("../config.php");
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
- "<META HTTP-EQUIV='Refresh' CONTENT='".COURSE_LIVELOG_REFRESH."; URL=loglive.php?id=$id'>");
+ "<meta HTTP-equiv='Refresh' content='".COURSE_LIVELOG_REFRESH."; url=loglive.php?id=$id'>");
$user=0;
$date=time() - 3600;
-<?PHP // $Id$
+<?php // $Id$
// Moves, adds, updates, duplicates or deletes modules in a course
if ($course->category) {
print_header("$course->shortname: $streditinga", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->
- <A HREF=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</A> ->
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
+ <a href=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</a> ->
$streditinga", $focuscursor, "", false);
} else {
print_header("$course->shortname: $streditinga", "$course->fullname",
$defaultformat = FORMAT_MOODLE;
}
- $icon = "<img align=absmiddle height=16 width=16 src=\"$CFG->modpixpath/$module->name/icon.gif\"> ";
+ $icon = "<img align=\"absmiddle\" height=\"16\" width=\"16\" src=\"$CFG->modpixpath/$module->name/icon.gif\"> ";
print_heading_with_help($pageheading, "mods", $module->name, $icon);
print_simple_box_start("center", "", "$THEME->cellheading");
<form name="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
-<input type="hidden" name=mode value="delete">
-<input type="hidden" name=section value="<?php p($form->section) ?>">
-<input type="hidden" name=course value="<?php p($form->course) ?>">
-<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>">
-<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="delete" />
+<input type="hidden" name="section" value="<?php p($form->section) ?>" />
+<input type="hidden" name="course" value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
-<input type="submit" value=" <?php print_string("yes")?> ">
-<input type=button value=" <?php print_string("no")?> " onclick="javascript:history.go(-1);">
+<input type="submit" value=" <?php print_string("yes")?> " />
+<input type="button" value=" <?php print_string("no")?> " onclick="javascript:history.go(-1);" />
</form>
-<?PHP // $Id$
+<?php // $Id$
// Display user activity reports for a course (totals)
if ($course->category) {
print_header("$course->shortname: $stractivityreport", "$course->fullname",
- "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> ->
+ "<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
$stractivityreport");
} else {
print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname",
- "<A HREF=\"../user/view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A> ->
+ "<a href=\"../user/view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</a> ->
$stractivityreport -> $strmode");
}
print_heading("$course->fullname");
- echo "<table cellpadding=10 align=center><tr>";
+ echo "<table cellpadding=\"10\" align=\"center\"><tr>";
echo "<td>$stractivityreport: </td>";
echo "</tr></table>";
$section = $sections[$i];
if ($section->sequence) {
- echo "<HR>";
- echo "<H2>";
+ echo "<hr />";
+ echo "<h2>";
switch ($course->format) {
case "weeks": print_string("week"); break;
case "topics": print_string("topic"); break;
default: print_string("section"); break;
}
- echo " $i</H2>";
+ echo " $i</h2>";
- echo "<UL>";
+ echo "<ul>";
- echo "<TABLE CELLPADDING=4 CELLSPACING=0>";
+ echo "<table cellpadding=\"4\" cellspacing=\"0\">";
$sectionmods = explode(",", $section->sequence);
foreach ($sectionmods as $sectionmod) {
print_outline_row($mod, $instance, $result);
}
- echo "</TABLE>";
+ echo "</table>";
print_simple_box_end();
- echo "</UL>";
+ echo "</ul>";
}
}
}
function print_outline_row($mod, $instance, $result) {
- $image = "<IMG SRC=\"../mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
-
- echo "<TR>";
- echo "<TD VALIGN=top>$image</TD>";
- echo "<TD VALIGN=top width=300>";
- echo " <A TITLE=\"$mod->modfullname\"";
- echo " HREF=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</A></TD>";
- echo "<TD> </TD>";
- echo "<TD VALIGN=top BGCOLOR=white>";
+ $image = "<img src=\"../mod/$mod->modname/icon.gif\" height=\"16\" width=\"16\" alt=\"$mod->modfullname\">";
+
+ echo "<tr>";
+ echo "<td valign=\"top\">$image</td>";
+ echo "<td valign=\"top\" width=\"300\">";
+ echo " <a title=\"$mod->modfullname\"";
+ echo " href=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</a></td>";
+ echo "<td> </td>";
+ echo "<td valign=\"top\" bgcolor=\"white\">";
if (isset($result->info)) {
echo "$result->info";
} else {
- echo "<P ALIGN=CENTER>-</P>";
+ echo "<p align=\"center\">-</p>";
}
- echo "</TD>";
- echo "<TD> </TD>";
+ echo "</td>";
+ echo "<td> </td>";
if (isset($result->time)) {
$timeago = format_time(time() - $result->time);
- echo "<TD VALIGN=top NOWRAP>".userdate($result->time)." ($timeago)</TD>";
+ echo "<td valign=\"top\" nowrap=\"nowrap\">".userdate($result->time)." ($timeago)</td>";
}
- echo "</TR>";
+ echo "</tr>";
}
?>
-<?PHP // $Id$
+<?php // $Id$
// Displays all activity for non-quiz modules for a course
///This version allows students to see their own activity, but not that of others.
///For teachers only, clicking on a student's name brings up the Moodle user activity summary.
foreach ($allposts as $rec){
$forumval = $modname_value["forum"];
$user_data[$forumval][$rec->forumid] = $user_data[$forumval][$rec->forumid] . ",$rec->userid,";
-// echo "<br>" . $rec->forumid . $rec->name . "<br>";
+// echo "<br />" . $rec->forumid . $rec->name . "<br />";
}
}
//printer header line with weeks
$options["id"] = $course->id;
$options["download"] = "xls";
- print ( "<tr valign=top><td colspan=3>");
+ print ( "<tr valign=\"top\"><td colspan=\"3\">");
print_single_button("quickreport.php", $options, get_string("downloadexcel"));
print ("</td>");
if ($course->format == "weeks") {$formatname = "Week";} else {$formatname = "Section";}
foreach($mods_week as $week=>$wkcount){
print "<td colspan=$wkcount>$formatname $week</td>";
}
- echo "<tr valign=top><td width='150'>Student</td><td>Picture</td><td>Profile</td>";
+ echo "<tr valign=\"top\"><td width='150'>Student</td><td>Picture</td><td>Profile</td>";
//get the names of each module instance and put in header
foreach($mod_info as $thiscat=>$thismod){
$modname = ucwords($modnames[$thismod[module]]);
- print ("<td> $modname <br><font size=-1>$thismod[name]</font></td>");
+ print ("<td> $modname <br /><font size=-1>$thismod[name]</font></td>");
}
echo "</tr>\n";
foreach ($user_contribs as $userid=>$thisuser){
$quick_bgcount++;
if ($quick_bgcount%3 == 0) {
- echo "<tr align=center bgcolor='#ffffff'>";
+ echo "<tr align=\"center\" bgcolor=\"#ffffff\">";
} else {
- echo "<tr align=center>";
+ echo "<tr align=\"center\">";
}
$fullname = ucwords($allusers[$userid]->lastname) . ", " . ucwords($allusers[$userid]->firstname);
if (!$isstudent){
- $fullname = "<a href=user.php?id=$course->id&user=$userid>$fullname</a>";
+ $fullname = "<a href=\"user.php?id=$course->id&user=$userid>$fullname\"</a>";
}
- echo "<td align=left><b>$fullname</b></td>";
+ echo "<td align=\"left\"><b>$fullname</b></td>";
$picture = print_user_picture($userid, $course->id, $allusers[$userid]->picture, false, true);
echo "<td>" . $picture . "</td>";
if (strlen($allusers[$userid]->description) > 10) {quick_show("X");} else {quick_show("-");}
function quick_moduleorder($courseid){
//using course_sections which gives the sections & sequence, build an array with each section + item pair
-// echo "<br>Course= " . $courseid . "<br>";
+// echo "<br />Course= " . $courseid . "<br />";
$allmods = get_records("course_sections","course",$courseid,"section","id,section,sequence");
// print_object($allmods);
// $modsequence
}
// print_object($weeklist);
} else {
-// print ("<br>No modules this week<br>");
+// print ("<br />No modules this week<br />");
}
}
return $all_list;
function quick_headers($course){
global $CFG;
print_header("$course->shortname: 'Quick Report'", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> 'Quick Report'");
}
function quick_show($x){
- echo "<td align=center>";
+ echo "<td align=\"center\">";
print ("$x");
echo "</td>";
}
-<?PHP // $Id$
+<?php // $Id$
// Display all recent activity in a flexible way
if (!empty($sections)) {
- echo "<hr>";
+ echo "<hr />";
$i = 0;
if (!empty($filter)) {
$linkformat = '';
}
$image = "<img src=\"$CFG->modpixpath/" . $activity->content->modname . "/icon.gif\"" .
- "height=16 width=16 alt=\"" . $activity->content->modfullname . "\">";
+ "height=\"16\" width=\"16\" alt=\"" . $activity->content->modfullname . "\">";
echo "<ul><h4>$image " . $activity->content->modfullname .
" <a href=\"$CFG->wwwroot/mod/" . $activity->content->modname . "/view.php?" .
"id=" . $activity->content->modid . "\" $linkformat>" .
-<?PHP // $Id$
+<?php // $Id$
// Allows a creator to edit custom scales, and also display help about scales
require_once("../config.php");
$scale->description = $form->description;
}
echo "<form method=\"post\" action=\"scales.php\" name=\"form$scale->id\">";
- echo "<table cellpadding=9 cellspacing=0 align=center class=generalbox>";
- echo "<tr valign=top>";
+ echo "<table cellpadding=\"9\" cellspacing=\"0\" align=\"center\" class=\"generalbox\">";
+ echo "<tr valign=\"top\">";
if (!empty($errors[$scale->id]->name)) {
$class = "class=\"highlight\"";
} else {
$class = "";
}
echo "<td align=\"right\"><p><b>$strname:</b></p></td>";
- echo "<td $class><input type=\"text\" name=\"name\" size=\"50\" value=\"".s($scale->name)."\">";
+ echo "<td $class><input type=\"text\" name=\"name\" size=\"50\" value=\"".s($scale->name)."\" />";
echo "</td>";
echo "</tr>";
- echo "<tr valign=top>";
+ echo "<tr valign=\"top\">";
if (!empty($errors[$scale->id]->scalescale)) {
$class = "class=\"highlight\"";
} else {
$class = "";
}
echo "<td align=\"right\"><p><b>$strscale:</b></p></td>";
- echo "<td $class><textarea name=\"scalescale\" cols=50 rows=2 wrap=virtual>".s($scale->scale)."</textarea>";
+ echo "<td $class><textarea name=\"scalescale\" cols=\"50\" rows=\"2\" wrap=\"virtual\">".s($scale->scale)."</textarea>";
echo "</td>";
echo "</tr>";
- echo "<tr valign=top>";
+ echo "<tr valign=\"top\">";
echo "<td align=\"right\"><p><b>$strdescription:</b></p>";
helpbutton("text", $strhelptext);
echo "</td>";
- echo "<td><textarea name=\"description\" cols=50 rows=8 wrap=virtual>".s($scale->description)."</textarea>";
+ echo "<td><textarea name=\"description\" cols=\"50\" rows=\"8\" wrap=\"virtual\">".s($scale->description)."</textarea>";
echo "</td>";
echo "</tr>";
echo "<tr>";
if ($scale->id) {
- echo "<tr valign=top>";
+ echo "<tr valign=\"top\">";
echo "<td align=\"right\">";
echo "</td>";
echo "<td>".get_string("usedinnplaces","",$scale_uses);
echo "</tr>";
}
echo "<tr>";
- echo "<td colspan=2 align=\"center\">";
- echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\">";
- echo "<input type=\"hidden\" name=\"courseid\" value=\"$scale->courseid\">";
- echo "<input type=\"hidden\" name=\"scaleid\" value=\"$scale->id\">";
- echo "<input type=\"hidden\" name=\"action\" value=\"sendform\">";
- echo "<input type=\"submit\" name=\"save\" value=\"$strsavechanges\">";
+ echo "<td colspan=\"2\" align=\"center\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<input type=\"hidden\" name=\"courseid\" value=\"$scale->courseid\" />";
+ echo "<input type=\"hidden\" name=\"scaleid\" value=\"$scale->id\" />";
+ echo "<input type=\"hidden\" name=\"action\" value=\"sendform\" />";
+ echo "<input type=\"submit\" name=\"save\" value=\"$strsavechanges\" />";
echo "</td></tr></table>";
echo "</form>";
echo "<br />";
/// Print out the main page
print_header("$course->shortname: $strscales", "$course->fullname",
- "<a href=\"view.php?id=$course->id\">$course->shortname</A>
+ "<a href=\"view.php?id=$course->id\">$course->shortname</a>
-> $strscales");
print_heading_with_help($strscales, "scales");
$data[] = $line;
}
$line = array();
- $line[] = "<a target=\"scale\" title=\"$scale->name\" href=\"$CFG->wwwroot/course/scales.php?id=$course->id&scaleid=$scale->id&action=details\" "."onClick=\"return openpopup('/course/scales.php?id=$course->id\&scaleid=$scale->id&action=details', 'scale', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">".$scale->name."</a><br><font size=\"-1\">".str_replace(",",", ",$scale->scale)."</font>";
+ $line[] = "<a target=\"scale\" title=\"$scale->name\" href=\"$CFG->wwwroot/course/scales.php?id=$course->id&scaleid=$scale->id&action=details\" "."onClick=\"return openpopup('/course/scales.php?id=$course->id\&scaleid=$scale->id&action=details', 'scale', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">".$scale->name."</a><br /><font size=\"-1\">".str_replace(",",", ",$scale->scale)."</font>";
if (!empty($scale->courseid)) {
$scales_uses = course_scale_used($course->id,$scale->id);
} else {
$buttons = "";
if (empty($scales_uses) && ($incustom || isadmin())) {
$buttons .= "<a title=\"$stredit\" href=\"$path/scales.php?id=$course->id&scaleid=$scale->id&action=edit\"><img".
- " src=\"$pixpath/t/edit.gif\" hspace=2 height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a> ";
if ($incustom && isadmin()) {
$buttons .= "<a title=\"$strdown\" href=\"$path/scales.php?id=$course->id&scaleid=$scale->id&action=down\"><img".
- " src=\"$pixpath/t/down.gif\" hspace=2 height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/down.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
if (!$incustom && isadmin()) {
$buttons .= "<a title=\"$strup\" href=\"$path/scales.php?id=$course->id&scaleid=$scale->id&action=up\"><img".
- " src=\"$pixpath/t/up.gif\" hspace=2 height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/up.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
$buttons .= "<a title=\"$strdelete\" href=\"$path/scales.php?id=$course->id&scaleid=$scale->id&action=delete\"><img".
- " src=\"$pixpath/t/delete.gif\" hspace=2 height=11 width=11 border=0></a> ";
+ " src=\"$pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
$line[] = $buttons;
-<?PHP // $Id$
+<?php // $Id$
/// Displays external information about a course
<form name="studentform" id="studentform" method="post" action="student.php">
-<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>">
-<input type="hidden" name="id" value="<?php echo $id?>">
+<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>" />
+<input type="hidden" name="id" value="<?php echo $id?>" />
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.studentform.add.disabled=true;
document.studentform.remove.disabled=false;
- document.studentform.addselect.selectedIndex=-1;">
+ document.studentform.addselect.selectedIndex=-1;" />
<?php
foreach ($students as $student) {
$fullname = fullname($student, true);
-<?PHP // $Id$
+<?php // $Id$
// Script to assign students to courses
require_once("../config.php");
-<?PHP // $Id$
+<?php // $Id$
// Admin-only script to assign teachers to courses
- require_once("../config.php");
+ require_once("../config.php");
define("MAX_USERS_PER_PAGE", 50);
/// Print headers
- print_header("$course->shortname: $strassignteachers",
+ print_header("$course->shortname: $strassignteachers",
"$course->fullname",
"<a href=\"index.php\">$strcourses</a> -> ".
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> ".
error("Could not update teacher entry id = $teacher->id");
}
}
- redirect("teacher.php?id=$course->id", get_string("changessaved"));
- }
+ redirect("teacher.php?id=$course->id", get_string("changessaved"));
+ }
/// Add a teacher if one is specified
print_heading_with_help("$strexistingteachers $parateachers", "teachers");
if (empty($teachers)) {
- echo "<p align=center>$strnoexistingteachers</a>";
+ echo "<p align=\"center\">$strnoexistingteachers</a>";
$teacherlist = "";
} else {
$teacherarray = array();
- echo "<form action=teacher.php method=post>";
+ echo "<form action=\"teacher.php\" method=\"post\">";
foreach ($teachers as $teacher) {
$teacherarray[] = $teacher->id;
$authority = choose_from_menu ($ordermenu, "a$teacher->id", $teacher->authority, "", "", "", true);
if ($USER->id == $teacher->id) {
- $editall = "<input name=\"e$teacher->id\" type=\"hidden\" value=\"1\">$stryes";
+ $editall = "<input name=\"e$teacher->id\" type=\"hidden\" value=\"1\" />$stryes";
} else {
$editall = choose_from_menu ($editmenu, "e$teacher->id", $teacher->editall, "", "", "", true);
}
}
$table->data[] = array ($picture, fullname($teacher, true), $authority,
- "<input type=text name=\"r$teacher->id\" value=\"$teacher->role\" size=30>",
+ "<input type=\"text\" name=\"r$teacher->id\" value=\"$teacher->role\" size=\"30\" />",
$editall, $removelink);
}
$teacherlist = implode(",",$teacherarray);
unset($teacherarray);
print_table($table);
- echo "<input type=hidden name=id value=\"$course->id\">";
- echo "<center><input type=submit value=\"".get_string("savechanges")."\"> ";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<center><input type=\"submit\" value=\"".get_string("savechanges")."\" /> ";
echo "</center>";
echo "</form>";
echo "<br />";
$usercount = get_users(false, $search, true, $teacherlist);
if ($usercount == 0) {
- echo "<p align=center>$strnopotentialteachers</p>";
+ echo "<p align=\"center\">$strnopotentialteachers</p>";
} else if ($usercount > MAX_USERS_PER_PAGE) {
- echo "<p align=center>$strtoomanytoshow ($usercount) </p>";
+ echo "<p align=\"center\">$strtoomanytoshow ($usercount) </p>";
} else {
if ($search) {
- echo "<p align=center>($strsearchresults : $search)</p>";
+ echo "<p align=\"center\">($strsearchresults : $search)</p>";
}
if (!$users = get_users(true, $search, true, $teacherlist)) {
if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<center>";
- echo "<form action=teacher.php method=get>";
- echo "<input type=hidden name=id value=\"$course->id\">";
- echo "<input type=text name=search size=20>";
- echo "<input type=submit value=\"$searchstring\">";
+ echo "<form action=\"teacher.php\" method=\"get\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
+ echo "<input type=\"text\" name=\"search\" size=\"20\" />";
+ echo "<input type=\"submit\" value=\"$searchstring\" />";
echo "</form>";
echo "</center>";
}
-<?PHP // $Id$
+<?php // $Id$
// Removes a student from a class
// This will not delete any of their data from the course,
$strunenrol = get_string("unenrol");
print_header("$course->shortname: $strunenrol", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> -> $strunenrol");
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $strunenrol");
if ($user->id == $USER->id) {
$strunenrolsure = get_string("unenrolsure", "", get_string("yourself"));
-<?PHP // $Id$
+<?php // $Id$
// Display user activity reports for a course
if ($course->category) {
print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname",
- "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> ->
- <A HREF=\"../user/index.php?id=$course->id\">$strparticipants</A> ->
- <A HREF=\"../user/view.php?id=$user->id&course=$course->id\">$fullname</A> ->
+ "<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
+ <a href=\"../user/index.php?id=$course->id\">$strparticipants</a> ->
+ <a href=\"../user/view.php?id=$user->id&course=$course->id\">$fullname</a> ->
$stractivityreport -> $strmode");
} else {
print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname",
- "<A HREF=\"../user/view.php?id=$user->id&course=$course->id\">$fullname</A> ->
+ "<a href=\"../user/view.php?id=$user->id&course=$course->id\">$fullname</a> ->
$stractivityreport -> $strmode");
}
print_heading($fullname);
- echo "<table cellpadding=10 align=center><tr>";
+ echo "<table cellpadding=\"10\" align=\"center\"><tr>";
echo "<td>$stractivityreport: </td>";
foreach ($modes as $listmode) {
if ($mode == $listmode) {
echo "<td><u>$strmode</u></td>";
} else {
- echo "<td><a href=user.php?id=$course->id&user=$user->id&mode=$listmode>$strmode</a></td>";
+ echo "<td><a href=\"user.php?id=$course->id&user=$user->id&mode=$listmode>$strmode\"</a></td>";
}
}
echo "</tr></table>";
switch ($mode) {
case "todaylogs" :
- echo "<HR><CENTER>";
+ echo "<hr /><center>";
print_log_graph($course, $user->id, "userday.png");
- echo "</CENTER>";
+ echo "</center>";
print_log($course, $user->id, usergetmidnight(time()), "l.time DESC", $page, $perpage,
"user.php?id=$course->id&user=$user->id&mode=$mode");
break;
case "alllogs" :
- echo "<HR><CENTER>";
+ echo "<hr /><center>";
print_log_graph($course, $user->id, "usercourse.png");
- echo "</CENTER>";
+ echo "</center>";
print_log($course, $user->id, 0, "l.time DESC", $page, $perpage,
"user.php?id=$course->id&user=$user->id&mode=$mode");
break;
$section = $sections[$i];
if ($section->sequence) {
- echo "<HR>";
- echo "<H2>";
+ echo "<hr />";
+ echo "<h2>";
switch ($course->format) {
case "weeks": print_string("week"); break;
case "topics": print_string("topic"); break;
default: print_string("section"); break;
}
- echo " $i</H2>";
+ echo " $i</h2>";
- echo "<UL>";
+ echo "<ul>";
if ($mode == "outline") {
- echo "<TABLE CELLPADDING=4 CELLSPACING=0>";
+ echo "<table cellpadding=\"4\" cellspacing=\"0\">";
}
$sectionmods = explode(",", $section->sequence);
case "complete":
$user_complete = $mod->modname."_user_complete";
if (function_exists($user_complete)) {
- $image = "<IMG SRC=\"../mod/$mod->modname/icon.gif\" ".
- "HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
- echo "<H4>$image $mod->modfullname: ".
- "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
- "$instance->name</A></H4>";
- echo "<UL>";
+ $image = "<img src=\"../mod/$mod->modname/icon.gif\" ".
+ "height=\"16\" width=\"16\" alt=\"$mod->modfullname\">";
+ echo "<h4>$image $mod->modfullname: ".
+ "<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
+ "$instance->name</a></h4>";
+ echo "<ul>";
$user_complete($course, $user, $mod, $instance);
- echo "</UL>";
+ echo "</ul>";
}
break;
}
}
if ($mode == "outline") {
- echo "</TABLE>";
+ echo "</table>";
print_simple_box_end();
}
- echo "</UL>";
+ echo "</ul>";
}
function print_outline_row($mod, $instance, $result) {
- $image = "<IMG SRC=\"../mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
-
- echo "<TR>";
- echo "<TD VALIGN=top>$image</TD>";
- echo "<TD VALIGN=top width=300>";
- echo " <A TITLE=\"$mod->modfullname\"";
- echo " HREF=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</A></TD>";
- echo "<TD> </TD>";
- echo "<TD VALIGN=top BGCOLOR=white>";
+ $image = "<img src=\"../mod/$mod->modname/icon.gif\" height=\"16\" width=\"16\" alt=\"$mod->modfullname\">";
+
+ echo "<tr>";
+ echo "<td valign=\"top\">$image</td>";
+ echo "<td valign=\"top\" width=\"300\">";
+ echo " <a title=\"$mod->modfullname\"";
+ echo " href=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</a></td>";
+ echo "<td> </td>";
+ echo "<td valign=\"top\" bgcolor=\"white\">";
if (isset($result->info)) {
echo "$result->info";
} else {
- echo "<P ALIGN=CENTER>-</P>";
+ echo "<p align=\"center\">-</p>";
}
- echo "</TD>";
- echo "<TD> </TD>";
+ echo "</td>";
+ echo "<td> </td>";
if (isset($result->time)) {
$timeago = format_time(time() - $result->time);
- echo "<TD VALIGN=top NOWRAP>".userdate($result->time)." ($timeago)</TD>";
+ echo "<td valign=\"top\" nowrap=\"nowrap\">".userdate($result->time)." ($timeago)</td>";
}
- echo "</TR>";
+ echo "</tr>";
}
?>
-<?PHP // $Id$
+<?php // $Id$
// Display the course home page.