-<?PHP // $Id: lib.php,v 1.1 22 Aug 2003
+<?php // $Id: lib.php,v 1.1 22 Aug 2003
/*************************************************
ACTIONS handled are:
// ... print the header and...
print_header_simple("$exercise->name", "",
- "<A HREF=index.php?id=$course->id>$strexercises</A> ->
- <A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strassessments",
+ "<a href=\"index.php?id=$course->id\">$strexercises</a> ->
+ <a href=\"view.php?id=$cm->id\">$exercise->name</a> -> $strassessments",
"", "", true);
//...get the action
number_format($exercise->gradinggrade * $assessment->gradinggrade / 100, 0), "");
echo "</td></tr>\n";
echo "<tr><td colspan=\"2\" align=\"center\">";
- echo "<INPUT TYPE=submit VALUE=\"".get_string("amend", "exercise")."\" />\n";
+ echo "<input type=\"submit\" value=\"".get_string("amend", "exercise")."\" />\n";
echo "</td></tr>\n";
echo "</table>\n";
- echo "</CENTER>";
- echo "</FORM>\n";
+ echo "</center>";
+ echo "</form>\n";
}
print_heading_with_help(get_string("editingassessmentelements", "exercise"), "elements", "exercise");
?>
<form name="form" method="post" action="assessments.php">
- <input type="hidden" name="id" value="<?PHP echo $cm->id ?>">
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>">
<input type="hidden" name="action" value="insertelements">
- <CENTER><TABLE cellpadding=5 border=1>
- <?PHP
+ <center><table cellpadding="5" border="1">
+ <?php
// get existing elements, if none set up appropriate default ones
if ($elementsraw = get_records("exercise_elements", "exerciseid", $exercise->id, "elementno ASC" )) {
case 0: // no grading
for ($i=0; $i<$exercise->nelements; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD ALIGN=RIGHT><P><B>". get_string("element","exercise")." $iplus1:</B></TD>\n";
- echo "<TD><textarea name=\"description[]\" rows=3 cols=75 wrap=\"virtual\">".
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
+ echo "<td><textarea name=\"description[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
$elements[$i]->description."</textarea>\n";
- echo " </TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD colspan=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
for ($i=0; $i<$exercise->nelements; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD ALIGN=RIGHT><P><B>". get_string("element","exercise")." $iplus1:</B></TD>\n";
- echo "<TD><textarea name=\"description[]\" rows=3 cols=75 wrap=\"virtual\">".
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
+ echo "<td><textarea name=\"description[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
$elements[$i]->description."</textarea>\n";
- echo " </TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("typeofscale", "exercise"). ":</B></P></TD>\n";
- echo "<TD valign=\"top\">\n";
+ echo " </td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("typeofscale", "exercise"). ":</b></p></td>\n";
+ echo "<td valign=\"top\">\n";
choose_from_menu($SCALES, "scale[]", $elements[$i]->scale, "");
if ($elements[$i]->weight == '') { // not set
$elements[$i]->weight = 11; // unity
}
- echo "</TR>\n";
- echo "<TR valign=top><TD ALIGN=RIGHT><B>".get_string("elementweight", "exercise").
- ":</B></TD><TD>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\"><td align=\"right\"><b>".get_string("elementweight", "exercise").
+ ":</b></td><td>\n";
exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, "");
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD colspan=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
case 2: // error banded grading
for ($i=0; $i<$exercise->nelements; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD ALIGN=RIGHT><P><B>". get_string("element","exercise")." $iplus1:</B></TD>\n";
- echo "<TD><textarea name=\"description[$i]\" rows=3 cols=75 wrap=\"virtual\">".
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
+ echo "<td><textarea name=\"description[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
$elements[$i]->description."</textarea>\n";
- echo " </TD></TR>\n";
+ echo " </td></tr>\n";
if ($elements[$i]->weight == '') { // not set
$elements[$i]->weight = 11; // unity
}
- echo "</TR>\n";
- echo "<TR valign=top><TD ALIGN=RIGHT><B>".get_string("elementweight", "exercise").
- ":</B></TD><TD>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\"><td align=\"right\"><b>".get_string("elementweight", "exercise").
+ ":</b></td><td>\n";
exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, "");
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD colspan=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
- echo "</CENTER></TABLE><BR>\n";
- echo "<P><CENTER><B>".get_string("gradetable","exercise")."</B></CENTER>\n";
- echo "<CENTER><TABLE cellpadding=5 border=1><TR><TD ALIGN=\"CENTER\">".
+ echo "</center></table><br />\n";
+ echo "<p><center><b>".get_string("gradetable","exercise")."</b></center>\n";
+ echo "<center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
get_string("numberofnegativeresponses", "exercise");
- echo "</TD><TD>". get_string("suggestedgrade", "exercise")."</TD></TR>\n";
+ echo "</td><td>". get_string("suggestedgrade", "exercise")."</td></tr>\n";
for ($j = $exercise->grade; $j >= 0; $j--) {
$numbers[$j] = $j;
}
for ($i=0; $i<=$exercise->nelements; $i++) {
- echo "<TR><TD ALIGN=\"CENTER\">$i</TD><TD ALIGN=\"CENTER\">";
+ echo "<tr><td align=\"CENTER\">$i</td><td align=\"CENTER\">";
if (!isset($elements[$i])) { // the "last one" will be!
$elements[$i]->description = "";
$elements[$i]->maxscore = 0;
}
choose_from_menu($numbers, "maxscore[$i]", $elements[$i]->maxscore, "");
- echo "</TD></TR>\n";
+ echo "</td></tr>\n";
}
break;
}
for ($i=0; $i<$exercise->nelements; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
+ echo "<tr valign=\"top\">\n";
- echo " <TD ALIGN=RIGHT><P><B>". get_string("criterion","exercise")." $iplus1:</B></TD>\n";
- echo "<TD><textarea name=\"description[$i]\" rows=3 cols=75 wrap=\"virtual\">".
+ echo " <td align=\"right\"><p><b>". get_string("criterion","exercise")." $iplus1:</b></td>\n";
+ echo "<td><textarea name=\"description[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
$elements[$i]->description."</textarea>\n";
- echo " </TD></TR>\n";
- echo "<TR><TD><B>". get_string("suggestedgrade", "exercise").":</B></TD><TD>\n";
+ echo " </td></tr>\n";
+ echo "<tr><td><b>". get_string("suggestedgrade", "exercise").":</b></td><td>\n";
choose_from_menu($numbers, "maxscore[$i]", $elements[$i]->maxscore, "");
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
- echo " <TD colspan=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
}
for ($i=0; $i<$exercise->nelements; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD ALIGN=RIGHT><P><B>". get_string("element","exercise")." $iplus1:</B></TD>\n";
- echo "<TD><textarea name=\"description[$i]\" rows=3 cols=75 wrap=\"virtual\">".
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></td>\n";
+ echo "<td><textarea name=\"description[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
$elements[$i]->description."</textarea>\n";
- echo " </TD></TR>\n";
- echo "<TR valign=top><TD ALIGN=RIGHT><B>".get_string("elementweight", "exercise").
- ":</B></TD><TD>\n";
+ echo " </td></tr>\n";
+ echo "<tr valign=\"top\"><td align=\"right\"><b>".get_string("elementweight", "exercise").
+ ":</b></td><td>\n";
exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, "");
- echo " </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
for ($j=0; $j<5; $j++) {
$jplus1 = $j+1;
if (empty($rubrics[$i][$j])) {
$rubrics[$i][$j] = "";
}
- echo "<TR valign=top>\n";
- echo " <TD ALIGN=RIGHT><P><B>". get_string("grade")." $j:</B></TD>\n";
- echo "<TD><textarea name=\"rubric[$i][$j]\" rows=3 cols=75 wrap=\"virtual\">".
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("grade")." $j:</b></td>\n";
+ echo "<td><textarea name=\"rubric[$i][$j]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">".
$rubrics[$i][$j]."</textarea>\n";
- echo " </TD></TR>\n";
+ echo " </td></tr>\n";
}
- echo "<TR valign=top>\n";
- echo " <TD colspan=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
}
?>
</table><br />
<input type="submit" value="<?php print_string("savechanges") ?>">
- <input type="submit" name=cancel value="<?php print_string("cancel") ?>">
+ <input type="submit" name="cancel" value="<?php print_string("cancel") ?>">
</center>
</form>
- <?PHP
+ <?php
}
$totalweight += $weight;
}
$rawgrade += ($grade / $maxscore) * $weight;
- // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade<BR>";
+ // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade<br />";
}
$grade = 100.0 * ($rawgrade / $totalweight);
break;
}
$grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i])
* 100.0 / $exercise->grade;
- // echo "<P><B>".get_string("weightederrorcount", "exercise", intval($error + 0.5)).
- // " ".get_string("adjustment", "exercise").": ".$form->grade[$i]."</B>\n";
+ // echo "<p><b>".get_string("weightederrorcount", "exercise", intval($error + 0.5)).
+ // " ".get_string("adjustment", "exercise").": ".$form->grade[$i]."</b>\n";
// check the grade for sanity!
if ($grade > 100.0) {
$grade = 100.0;
$totalweight += $weight;
}
$rawgrade += ($grade / $maxscore) * $weight;
- // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade<BR>";
+ // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade<br />";
}
$grade = 100.0 * ($rawgrade / $totalweight);
break;
error("Could not insert exercise element!");
}
$grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i]) * 100 / $exercise->grade;
- echo "<P><B>".get_string("weightederrorcount", "exercise", intval($error + 0.5))."</B>\n";
+ echo "<p><b>".get_string("weightederrorcount", "exercise", intval($error + 0.5))."</b>\n";
break;
case 3: // criteria grading
set_field("exercise_assessments", "gradinggrade", $gradinggrade, "id", $stassessment->id);
set_field("exercise_assessments", "timegraded", $timenow, "id", $stassessment->id);
set_field("exercise_assessments", "mailed", 0, "id", $stassessment->id);
- echo "<CENTRE><B>".get_string("savedok", "exercise")."</B></CENTRE><BR>\n";
+ echo "<centre><b>".get_string("savedok", "exercise")."</b></centre><br />\n";
add_to_log($course->id, "exercise", "grade", "view.php?id=$cm->id", "$stassessment->id");
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//exercise mods
-<?PHP // $Id$
+<?php // $Id$
function exercise_upgrade($oldversion) {
// This function does anything necessary to upgrade
-<?PHP // $Id$
+<?php // $Id$
function exercise_upgrade($oldversion) {
// This function does anything necessary to upgrade
-<?PHP // $Id$
+<?php // $Id$
require("../../config.php");
require("lib.php");
} else {
$table->head = array ($strweek, $strname, $strtitle, $strgrade, $strsubmitted, $strdeadline);
}
- $table->align = array ("CENTER", "LEFT", "LEFT","center","LEFT", "LEFT");
+ $table->align = array ("center", "left", "left","center","left", "left");
} else if ($course->format == "topics") {
if (isteacher($course->id)) {
$table->head = array ($strtopic, $strname, $strtitle, $strphase, $strsubmitted, $strdeadline);
} else {
$table->head = array ($strtopic, $strname, $strtitle, $strgrade, $strsubmitted, $strdeadline);
}
- $table->align = array ("CENTER", "LEFT", "LEFT", "center", "LEFT", "LEFT");
+ $table->align = array ("center", "left", "left", "center", "left", "left");
} else {
$table->head = array ($strname, $strsubmitted, $strdeadline);
- $table->align = array ("LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left");
}
foreach ($exercises as $exercise) {
if ($exercise->deadline > $timenow) {
$due = userdate($exercise->deadline);
} else {
- $due = "<FONT COLOR=\"red\">".userdate($exercise->deadline)."</FONT>";
+ $due = "<font color=\"red\">".userdate($exercise->deadline)."</font>";
}
if ($submissions = exercise_get_user_submissions($exercise, $USER)) {
foreach ($submissions as $submission) {
if ($submission->late) {
- $submitted = "<FONT COLOR=\"red\">".userdate($submission->timecreated)."</FONT>";
+ $submitted = "<font color=\"red\">".userdate($submission->timecreated)."</font>";
}
else {
$submitted = userdate($submission->timecreated);
}
- $link = "<A HREF=\"view.php?id=$exercise->coursemodule\">$exercise->name</A>";
+ $link = "<a href=\"view.php?id=$exercise->coursemodule\">$exercise->name</a>";
$title = $submission->title;
if ($course->format == "weeks" or $course->format == "topics") {
if (isteacher($course->id)) {
} else {
$submitted = get_string("no");
$title = '';
- $link = "<A HREF=\"view.php?id=$exercise->coursemodule\">$exercise->name</A>";
+ $link = "<a href=\"view.php?id=$exercise->coursemodule\">$exercise->name</a>";
if ($course->format == "weeks" or $course->format == "topics") {
if (isteacher($course->id)) {
$table->data[] = array ($exercise->section, $link, $title, $exercise->phase,
}
}
}
- echo "<BR>";
+ echo "<br />";
print_table($table);
-<?PHP // $Id: lib.php,v 1.1 23 Aug 2003
+<?php // $Id: lib.php,v 1.1 23 Aug 2003
// exercise constants and standard moodle functions plus those functions called directly
// see locallib.php for other non-standard exercise functions
$javascript = "";
}
- $output = "<SELECT NAME=$name $javascript>\n";
+ $output = "<select name=$name $javascript>\n";
if ($nothing) {
- $output .= " <OPTION VALUE=\"$nothingvalue\"\n";
+ $output .= " <option value=\"$nothingvalue\"\n";
if ($nothingvalue == $selected) {
$output .= " SELECTED";
}
- $output .= ">$nothing</OPTION>\n";
+ $output .= ">$nothing</option>\n";
}
if (!empty($options)) {
foreach ($options as $value => $label) {
- $output .= " <OPTION VALUE=\"$value\"";
+ $output .= " <option value=\"$value\"";
if ($value == $selected) {
$output .= " SELECTED";
}
// stop zero label being replaced by array index value
// if ($label) {
- // $output .= ">$label</OPTION>\n";
+ // $output .= ">$label</option>\n";
// } else {
- // $output .= ">$value</OPTION>\n";
+ // $output .= ">$value</option>\n";
// }
- $output .= ">$label</OPTION>\n";
+ $output .= ">$label</option>\n";
}
}
- $output .= "</SELECT>\n";
+ $output .= "</select>\n";
if ($return) {
return $output;
$posttext .= " $CFG->wwwroot/mod/exercise/view.php?id=$cm->id\n";
$posttext .= "---------------------------------------------------------------------\n";
if ($sendto->mailformat == 1) { // HTML
- $posthtml = "<P><FONT FACE=sans-serif>".
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->".
- "<A HREF=\"$CFG->wwwroot/mod/exercise/index.php?id=$course->id\">$strexercises</A> ->".
- "<A HREF=\"$CFG->wwwroot/mod/exercise/view.php?id=$cm->id\">$exercise->name</A></FONT></P>";
- $posthtml .= "<HR><FONT FACE=sans-serif>";
- $posthtml .= "<P>$msg</P>";
- $posthtml .= "<P>".get_string("mail3", "exercise").
- " <A HREF=\"$CFG->wwwroot/mod/exercise/view.php?id=$cm->id\">$exercise->name</A>.</P></FONT><HR>";
+ $posthtml = "<p><font face=\"sans-serif\">".
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->".
+ "<a href=\"$CFG->wwwroot/mod/exercise/index.php?id=$course->id\">$strexercises</a> ->".
+ "<a href=\"$CFG->wwwroot/mod/exercise/view.php?id=$cm->id\">$exercise->name</a></font></p>";
+ $posthtml .= "<hr /><font face=\"sans-serif\">";
+ $posthtml .= "<p>$msg</p>";
+ $posthtml .= "<p>".get_string("mail3", "exercise").
+ " <a href=\"$CFG->wwwroot/mod/exercise/view.php?id=$cm->id\">$exercise->name</a>.</p></font><hr />";
} else {
$posthtml = "";
}
} else {
$ffurl = "file.php?file=/$filearea/$file";
}
- return "<IMG SRC=\"$CFG->pixpath/f/$icon\" HEIGHT=16 WIDTH=16 BORDER=0 ALT=\"File\">".
- " <A TARGET=\"uploadedfile\" HREF=\"$CFG->wwwroot/$ffurl\">$submission->title</A>";
+ return "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" border=\"0\" alt=\"File\">".
+ " <a target=\"uploadedfile\" href=\"$CFG->wwwroot/$ffurl\">$submission->title</a>";
}
}
}
-<?PHP // $Id$
+<?php // $Id$
/// Library of extra functions for the exercise module
global $CFG;
$table->head = array (get_string("title", "exercise"), get_string("timeassessed", "exercise"), get_string("action", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left");
$table->size = array ("*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
foreach ($assessments as $assessment) {
if (!isteacher($exercise->course, $assessment->userid)) {
if (($timenow - $assessment->timegraded) < $CFG->maxeditingtime) {
- $action = "<A HREF=\"assessments.php?action=gradeassessment&a=$exercise->id&aid=$assessment->id\">".
- get_string("edit", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=gradeassessment&a=$exercise->id&aid=$assessment->id\">".
+ get_string("edit", "exercise")."</a>";
}
else {
- $action = "<A HREF=\"assessments.php?action=gradeassessment&a=$exercise->id&aid=$assessment->id\">".
- get_string("gradeassessment", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=gradeassessment&a=$exercise->id&aid=$assessment->id\">".
+ get_string("gradeassessment", "exercise")."</a>";
}
$submission = get_record("exercise_submissions", "id", $assessment->submissionid);
$table->data[] = array(exercise_print_submission_title($exercise, $submission),
error("Course is misconfigured");
}
$table->head = array (get_string("title", "exercise"), get_string("action", "exercise"), get_string("comment", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left");
$table->size = array ("*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
if ($assessments = exercise_get_assessments($submission)) {
foreach ($assessments as $assessment) {
if (isteacher($exercise->course, $assessment->userid)) { // assessments by teachers only
- $action = "<A HREF=\"assessments.php?action=viewassessment&a=$exercise->id&aid=$assessment->id\">".
- get_string("view", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=viewassessment&a=$exercise->id&aid=$assessment->id\">".
+ get_string("view", "exercise")."</a>";
// has teacher commented on teacher's assessment? shouldn't happen but leave test in
if ($assessment->timegraded and ($timenow - $assessment->timegraded > $CFG->maxeditingtime)) {
$comment = get_string("gradedbyteacher", "exercise", $course->teacher);
print_table($table);
}
else {
- echo "<CENTER>".get_string("noassessmentsdone", "exercise")."</CENTER>\n";
+ echo "<center>".get_string("noassessmentsdone", "exercise")."</center>\n";
}
}
$table->head = array (get_string("action", "exercise"), get_string("assessed", "exercise"),
get_string("comment", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left");
$table->size = array ("*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
if ($submission->isexercise) {
$comment = '';
if ($reassess) { // just show re-assess
- $action = "<A HREF=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
- get_string("reassess", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("reassess", "exercise")."</a>";
}
else { // reassess is false - assessment is a "normal state"
// user assessment has three states: record created but not assessed (date created
// in the future); just assessed but still editable; and "static" (may or may not
// have been graded by teacher, that is shown in the comment)
if ($assessment->timecreated > $timenow) { // user needs to assess this submission
- $action = "<A HREF=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
- get_string("assess", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("assess", "exercise")."</a>";
}
elseif ($assessment->timecreated > ($timenow - $CFG->maxeditingtime)) {
// there's still time left to edit...
- $action = "<A HREF=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
- get_string("edit", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assesssubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("edit", "exercise")."</a>";
}
else {
- $action = "<A HREF=\"assessments.php?action=viewassessment&id=$cm->id&aid=$assessment->id\">"
- .get_string("view", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=viewassessment&id=$cm->id&aid=$assessment->id\">"
+ .get_string("view", "exercise")."</a>";
}
}
// show the date if in the past (otherwise the user hasn't done the assessment yet
$table->head = array (get_string("title", "exercise"), get_string("submittedby", "exercise"),
get_string("submitted", "exercise"), get_string("action", "exercise"),
get_string("comment", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left", "left", "left");
$table->size = array ("*", "*", "*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
}
if ($warm) {
// last chance salon
- $action = "<A HREF=\"assessments.php?action=teacherassessment&id=$cm->id&aid=$studentassessment->id&sid=$submission->id\">".
- get_string("edit", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=teacherassessment&id=$cm->id&aid=$studentassessment->id&sid=$submission->id\">".
+ get_string("edit", "exercise")."</a>";
$table->data[] = array(exercise_print_submission_title($exercise, $submission),
fullname($submissionowner),
$timegap, $action, $comment);
} else {
- $action = "<A HREF=\"assessments.php?action=teacherassessment&id=$cm->id&aid=$studentassessment->id&sid=$submission->id\">".
- get_string("assess", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=teacherassessment&id=$cm->id&aid=$studentassessment->id&sid=$submission->id\">".
+ get_string("assess", "exercise")."</a>";
$table->data[] = array(exercise_print_submission_title($exercise, $submission),
fullname($submissionowner),
$timegap, $action, $comment);
}
if ($teacherassessed and $warm) {
// last chance salon
- $action = "<A HREF=\"assessments.php?action=assessresubmission&id=$cm->id&sid=$submission->id\">".
- get_string("edit", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assessresubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("edit", "exercise")."</a>";
$timegap = get_string("ago", "exercise", format_time($submission->timecreated -
$timenow));
if ($submission->late) {
}
}
}
- $action = "<A HREF=\"assessments.php?action=assessresubmission&id=$cm->id&sid=$submission->id\">".
- get_string("assess", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assessresubmission&id=$cm->id&sid=$submission->id\">".
+ get_string("assess", "exercise")."</a>";
$timegap = get_string("ago", "exercise", format_time($submission->timecreated -
$timenow));
if ($submission->late) {
global $CFG;
$table->head = array (get_string("title", "exercise"), get_string("action", "exercise"), get_string("comment", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left");
$table->size = array ("*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
$timenow = time();
if (($timenow - $assessment->timecreated < $CFG->maxeditingtime)) {
// last chance salon
- $action = "<A HREF=\"assessments.php?action=assesssubmission&a=$exercise->id&sid=$submission->id\">".
- get_string("edit", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assesssubmission&a=$exercise->id&sid=$submission->id\">".
+ get_string("edit", "exercise")."</a>";
$table->data[] = array(exercise_print_submission_title($exercise, $submission), $action, $comment);
}
}
else { // no assessment
- $action = "<A HREF=\"assessments.php?action=assesssubmission&a=$exercise->id&sid=$submission->id\">".
- get_string("assess", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=assesssubmission&a=$exercise->id&sid=$submission->id\">".
+ get_string("assess", "exercise")."</a>";
$table->data[] = array(exercise_print_submission_title($exercise, $submission), $action, $comment);
}
}
// lists all the assessments of student submissions for grading by teacher
$table->head = array (get_string("title", "exercise"), get_string("submittedby", "exercise"),
get_string("assessor", "exercise"), get_string("timeassessed", "exercise"), get_string("action", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left", "left");
$table->size = array ("*", "*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
foreach ($assessments as $assessment) {
if (!isteacher($exercise->course, $assessment->userid)) { // don't let teacher grade their own assessments
if (($timenow - $assessment->timegraded) < $CFG->maxeditingtime) {
- $action = "<A HREF=\"assessments.php?action=gradeassessment&id=$cm->id&stype=$stype&aid=$assessment->id\">".
- get_string("edit", "exercise")."</A>";
+ $action = "<a href=\"assessments.php?action=gradeassessment&id=$cm->id&stype=$stype&aid=$assessment->id\">".
+ get_string("edit", "exercise")."</a>";
}
else {
- $action = "<A HREF=\"assessments.php?action=gradeassessment&id=$cm->id&stype=$stype&aid=$assessment->id\">".
- get_string("grade")."</A>";
+ $action = "<a href=\"assessments.php?action=gradeassessment&id=$cm->id&stype=$stype&aid=$assessment->id\">".
+ get_string("grade")."</a>";
}
$submission = get_record("exercise_submissions", "id", $assessment->submissionid);
$submissionowner = get_record("user", "id", $submission->userid);
$timenow = time();
$table->head = array (get_string("title", "exercise"), get_string("action", "exercise"),
get_string("submitted", "exercise"), get_string("assessment", "exercise"));
- $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT");
+ $table->align = array ("left", "left", "left", "left");
$table->size = array ("*", "*", "*", "*");
$table->cellpadding = 2;
$table->cellspacing = 0;
if ($exercisefound) {
print_heading(get_string("theexerciseandthesubmissionby", "exercise",
fullname($submissionowner)));
- echo "<CENTER><TABLE BORDER=\"1\" WIDTH=\"30%\"><TR>
- <TD ALIGN=CENTER BGCOLOR=\"$THEME->cellcontent\">\n";
+ echo "<center><table border=\"1\" width=\"30%\"><tr>
+ <td align=\"center\" bgcolor=\"$THEME->cellcontent\">\n";
echo exercise_print_submission_title($exercise, $teachersubmission);
- echo "</TD></TR></TABLE><BR CLEAR=ALL>\n";
+ echo "</td></tr></table><br clear=\"all\">\n";
}
}
else {
}
}
- echo "<CENTER><TABLE BORDER=\"1\" WIDTH=\"30%\"><TR>
- <TD ALIGN=CENTER BGCOLOR=\"$THEME->cellcontent\">\n";
+ echo "<center><table border=\"1\" width=\"30%\"><tr>
+ <td align=\"center\" bgcolor=\"$THEME->cellcontent\">\n";
echo exercise_print_submission_title($exercise, $submission);
- echo "</TD></TR></TABLE><BR CLEAR=ALL>\n";
+ echo "</td></tr></table><br clear=\"all\">\n";
// only show the grade if grading strategy > 0 and the grade is positive
if ($exercise->gradingstrategy and $assessment->grade >= 0) {
- echo "<CENTER><B>".get_string("thegradeis", "exercise").": ".
+ echo "<center><b>".get_string("thegradeis", "exercise").": ".
number_format($assessment->grade * $exercise->grade / 100.0, 2)." (".
- get_string("maximumgrade")." ".number_format($exercise->grade, 0).")</B></CENTER><BR CLEAR=ALL>\n";
+ get_string("maximumgrade")." ".number_format($exercise->grade, 0).")</b></center><br clear=\"all\">\n";
}
}
// FORM is needed for Mozilla browsers, else radio bttons are not checked
?>
<form name="assessmentform" method="post" action="assessments.php">
- <INPUT TYPE="hidden" NAME="id" VALUE="<?PHP echo $cm->id ?>" />
- <input type="hidden" name="aid" value="<?PHP echo $assessment->id ?>" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
+ <input type="hidden" name="aid" value="<?php echo $assessment->id ?>" />
<input type="hidden" name="action" value="updateassessment" />
<input type="hidden" name="resubmit" value="0" />
- <input type="hidden" name="returnto" value="<?PHP echo $returnto ?>" />
- <?PHP
+ <input type="hidden" name="returnto" value="<?php echo $returnto ?>" />
+ <?php
if ($assessment) {
if (!$assessmentowner = get_record("user", "id", $assessment->userid)) {
error("Exercise_print_assessment_form: could not find user record");
$formtitle = get_string("assessmentform", "exercise");
}
echo "<center><table cellpadding=\"2\" border=\"1\">\n";
- echo "<tr valign=top>\n";
+ echo "<tr valign=\"top\">\n";
echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"><center><b>$formtitle</b></center></td>\n";
// now print the form
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("element","exercise")." $iplus1:</B></P></TD>\n";
- echo " <TD>".text_to_html($elements[$i]->description);
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
+ echo " <td>".text_to_html($elements[$i]->description);
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
else {
echo text_to_html($grades[$i]->feedback);
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
// now print the form
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("element","exercise")." $iplus1:</B></P></TD>\n";
-
- echo " <TD>".text_to_html($elements[$i]->description);
- echo "<P align=right><FONT size=1>Weight: "
- .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</FONT>\n";
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("grade"). ":</B></P></TD>\n";
- echo " <TD valign=\"top\">\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
+
+ echo " <td>".text_to_html($elements[$i]->description);
+ echo "<p align=\"right\"><font size=\"1\">Weight: "
+ .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font>\n";
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("grade"). ":</b></p></td>\n";
+ echo " <td valign=\"top\">\n";
// get the appropriate scale
$scalenumber=$elements[$i]->scale;
switch ($SCALE->type) {
case 'radio' :
// show selections highest first
- echo "<CENTER><B>$SCALE->start</B> ";
+ echo "<center><b>$SCALE->start</b> ";
for ($j = $SCALE->size - 1; $j >= 0 ; $j--) {
$checked = false;
if (isset($grades[$i]->grade)) {
}
}
if ($checked) {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED=\"checked\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" checked=\"checked\" /> \n";
}
else {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" /> \n";
}
}
- echo " <B>$SCALE->end</B></CENTER>\n";
+ echo " <b>$SCALE->end</b></center>\n";
break;
case 'selection' :
unset($numbers);
}
break;
- echo " </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
}
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
else {
echo text_to_html($grades[$i]->feedback);
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
$error = 0;
for ($i=0; $i < count($elements) - 1; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
+ echo "<tr valign=\"top\">\n";
- echo " <TD align=right><P><B>". get_string("element","exercise")." $iplus1:</B></P></TD>\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
- echo " <TD>".text_to_html($elements[$i]->description);
- echo "<P align=right><FONT size=1>Weight: "
- .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</FONT>\n";
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("grade"). ":</B></P></TD>\n";
- echo " <TD valign=\"top\">\n";
+ echo " <td>".text_to_html($elements[$i]->description);
+ echo "<p align=\"right\"><font size=\"1\">Weight: "
+ .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font>\n";
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("grade"). ":</b></p></td>\n";
+ echo " <td valign=\"top\">\n";
// get the appropriate scale - yes/no scale (0)
$SCALE = (object) $EXERCISE_SCALES[0];
switch ($SCALE->type) {
case 'radio' :
// show selections highest first
- echo "<CENTER><B>$SCALE->start</B> ";
+ echo "<center><b>$SCALE->start</b> ";
for ($j = $SCALE->size - 1; $j >= 0 ; $j--) {
$checked = false;
if (isset($grades[$i]->grade)) {
}
}
if ($checked) {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED=\"checked\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" checked=\"checked\" /> \n";
}
else {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" /> \n";
}
}
- echo " <B>$SCALE->end</B></CENTER>\n";
+ echo " <b>$SCALE->end</b></center>\n";
break;
case 'selection' :
unset($numbers);
break;
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[$i]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
echo text_to_html($grades[$i]->feedback);
}
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
if (empty($grades[$i]->grade)) {
$error += $EXERCISE_EWEIGHTS[$elements[$i]->weight];
}
}
// print the number of negative elements
- // echo "<TR><TD>".get_string("numberofnegativeitems", "exercise")."</TD><TD>$negativecount</TD></TR>\n";
- // echo "<TR valign=top>\n";
- // echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TABLE></CENTER>\n";
+ // echo "<tr><td>".get_string("numberofnegativeitems", "exercise")."</td><td>$negativecount</td></tr>\n";
+ // echo "<tr valign=\"top\">\n";
+ // echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</table></center>\n";
// now print the grade table
- echo "<P><CENTER><B>".get_string("gradetable","exercise")."</B></CENTER>\n";
- echo "<CENTER><TABLE cellpadding=5 border=1><TR><TD ALIGN=\"CENTER\">".
+ echo "<p><center><b>".get_string("gradetable","exercise")."</b></center>\n";
+ echo "<center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
get_string("numberofnegativeresponses", "exercise");
- echo "</TD><TD>". get_string("suggestedgrade", "exercise")."</TD></TR>\n";
+ echo "</td><td>". get_string("suggestedgrade", "exercise")."</td></tr>\n";
for ($i=0; $i<=$exercise->nelements; $i++) {
if ($i == intval($error + 0.5)) {
- echo "<TR><TD ALIGN=\"CENTER\"><IMG SRC=\"$CFG->pixpath/t/right.gif\"> $i</TD><TD ALIGN=\"CENTER\">{$elements[$i]->maxscore}</TD></TR>\n";
+ echo "<tr><td align=\"CENTER\"><img src=\"$CFG->pixpath/t/right.gif\"> $i</td><td align=\"CENTER\">{$elements[$i]->maxscore}</td></tr>\n";
}
else {
- echo "<TR><TD ALIGN=\"CENTER\">$i</TD><TD ALIGN=\"CENTER\">{$elements[$i]->maxscore}</TD></TR>\n";
+ echo "<tr><td align=\"CENTER\">$i</td><td align=\"CENTER\">{$elements[$i]->maxscore}</td></tr>\n";
}
}
- echo "</TABLE></CENTER>\n";
- echo "<P><CENTER><TABLE cellpadding=5 border=1><TR><TD align=\"right\"><b>".
- get_string("optionaladjustment", "exercise").":</b></TD><TD>\n";
+ echo "</table></center>\n";
+ echo "<p><center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"right\"><b>".
+ get_string("optionaladjustment", "exercise").":</b></td><td>\n";
unset($numbers);
for ($j = 20; $j >= -20; $j--) {
$numbers[$j] = $j;
else {
choose_from_menu($numbers, "grade[$exercise->nelements]", 0, "");
}
- echo "</TD></TR>\n";
+ echo "</td></tr>\n";
break;
case 3: // criteria grading
- echo "<TR valign=top>\n";
+ echo "<tr valign=\"top\">\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"> </td>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>". get_string("criterion","exercise")."</B></TD>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>". get_string("criterion","exercise")."</b></td>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("select")."</B></TD>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("suggestedgrade", "exercise")."</B></TD>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>".get_string("select")."</b></td>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>".get_string("suggestedgrade", "exercise")."</b></td>\n";
// find which criteria has been selected (saved in the zero element), if any
if (isset($grades[0]->grade)) {
$selection = $grades[0]->grade;
// now run through the elements
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
+ echo "<tr valign=\"top\">\n";
- echo " <TD>$iplus1</TD><TD>".text_to_html($elements[$i]->description)."</TD>\n";
+ echo " <td>$iplus1</td><td>".text_to_html($elements[$i]->description)."</td>\n";
if ($selection == $i) {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[0]\" VALUE=\"$i\" CHECKED=\"checked\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[0]\" value=\"$i\" checked=\"checked\" /></td>\n";
}
else {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[0]\" VALUE=\"$i\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[0]\" value=\"$i\" /></td>\n";
}
- echo "<TD align=center>{$elements[$i]->maxscore}</TD></TR>\n";
+ echo "<td align=\"center\">{$elements[$i]->maxscore}</td></tr>\n";
}
- echo "</TABLE></CENTER>\n";
- echo "<P><CENTER><TABLE cellpadding=5 border=1><TR><TD align=\"right\"><b>".
- get_string("optionaladjustment", "exercise")."</b></TD><TD>\n";
+ echo "</table></center>\n";
+ echo "<p><center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"right\"><b>".
+ get_string("optionaladjustment", "exercise")."</b></td><td>\n";
unset($numbers);
for ($j = 20; $j >= -20; $j--) {
$numbers[$j] = $j;
else {
choose_from_menu($numbers, "grade[1]", 0, "");
}
- echo "</TD></TR>\n";
+ echo "</td></tr>\n";
break;
case 4: // rubric grading
// now run through the elements...
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=\"top\">\n";
+ echo "<tr valign=\"top\">\n";
- echo "<TD align=\"right\"><b>".get_string("element", "exercise")." $iplus1:</b></TD>\n";
- echo "<TD>".text_to_html($elements[$i]->description).
- "<P align=\"right\"><font size=\"1\">Weight: "
- .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font></TD></tr>\n";
- echo "<TR valign=\"top\">\n";
+ echo "<td align=\"right\"><b>".get_string("element", "exercise")." $iplus1:</b></td>\n";
+ echo "<td>".text_to_html($elements[$i]->description).
+ "<p align=\"right\"><font size=\"1\">Weight: "
+ .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font></td></tr>\n";
+ echo "<tr valign=\"top\">\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\" align=\"center\"><B>".get_string("select")."</B></TD>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>". get_string("criterion","exercise")."</B></TD></tr>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("select")."</b></td>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>". get_string("criterion","exercise")."</b></td></tr>\n";
if (isset($grades[$i])) {
$selection = $grades[$i]->grade;
if (empty($rubrics[$j]->description)) {
break; // out of inner for loop
}
- echo "<TR valign=top>\n";
+ echo "<tr valign=\"top\">\n";
if ($selection == $j) {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED=\"checked\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" checked=\"checked\" /></td>\n";
}else {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" /></td>\n";
}
- echo "<TD>".text_to_html($rubrics[$j]->description)."</TD>\n";
+ echo "<td>".text_to_html($rubrics[$j]->description)."</td>\n";
}
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
echo " </td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
- echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </TD>\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
echo "</tr>\n";
}
}
case 0:
case 1:
case 4 : // no grading, accumulative and rubic
- echo " <td align=\"right\"><P><B>". get_string("generalcomment", "exercise").":</B></P></TD>\n";
+ echo " <td align=\"right\"><p><b>". get_string("generalcomment", "exercise").":</b></p></td>\n";
break;
default :
- echo " <td align=\"right\"><P><B>". get_string("reasonforadjustment", "exercise").":</B></P></TD>\n";
+ echo " <td align=\"right\"><p><b>". get_string("reasonforadjustment", "exercise").":</b></p></td>\n";
}
echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"generalcomment\" rows=5 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"generalcomment\" rows=\"5\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($assessment->generalcomment)) {
echo $assessment->generalcomment;
}
echo "<tr valign=\"top\">\n";
- echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </TD>\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
echo "</tr>\n";
function exercise_print_difference($time) {
if ($time < 0) {
$timetext = get_string("late", "assignment", format_time($time));
- return " (<FONT COLOR=RED>$timetext</FONT>)";
+ return " (<font color=\"red\">$timetext</font>)";
} else {
$timetext = get_string("early", "assignment", format_time($time));
return " ($timetext)";
error("Weird exercise error");
}
- echo "\n<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 ALIGN=CENTER><TR><TD BGCOLOR=#888888>";
- echo "\n<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 VALIGN=TOP>";
+ echo "\n<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\"><tr><td bgcolor=#888888>";
+ echo "\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" valign=\"top\">";
- echo "\n<TR>";
- echo "\n<TD ROWSPAN=3 BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
+ echo "\n<tr>";
+ echo "\n<td rowspan=\"3\" bgcolor=\"$THEME->body\" width=\"35\" valign=\"top\">";
print_user_picture($teacher->id, $course->id, $teacher->picture);
- echo "</TD>";
- echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">".fullname($teacher);
- echo " <FONT SIZE=2><I>".userdate($submission->timemarked)."</I>";
- echo "</TR>";
+ echo "</td>";
+ echo "<td nowrap=\"nowrap\" width=\"100%\" bgcolor=\"$THEME->cellheading\">".fullname($teacher);
+ echo " <font size=\"2\"><i>".userdate($submission->timemarked)."</i>";
+ echo "</tr>";
- echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+ echo "\n<tr><td width=\"100%\" bgcolor=\"$THEME->cellcontent\">";
- echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
+ echo "<p align=\"right\"><font size=-1><i>";
if ($submission->grade) {
echo get_string("grade").": $submission->grade";
} else {
echo get_string("nograde");
}
- echo "</I></FONT></P>";
+ echo "</i></font></p>";
echo text_to_html($submission->assessorcomment);
- echo "</TD></TR></TABLE>";
- echo "</TD></TR></TABLE>";
+ echo "</td></tr></table>";
+ echo "</td></tr></table>";
}
$wrapping = "";
}
if ($key == $tabs->highlight) {
- echo "<td valign=top class=\"generaltabselected\" $alignment $width $wrapping bgcolor=\"$THEME->cellheading2\">$tab</td>\n";
+ echo "<td valign=\"top\" class=\"generaltabselected\" $alignment $width $wrapping bgcolor=\"$THEME->cellheading2\">$tab</td>\n";
} else {
- echo "<td valign=top class=\"generaltab\" $alignment $width $wrapping bgcolor=\"$THEME->cellheading\">$tab</td>\n";
+ echo "<td valign=\"top\" class=\"generaltab\" $alignment $width $wrapping bgcolor=\"$THEME->cellheading\">$tab</td>\n";
}
echo "<td class=\"generaltablecell\">".
"<img width=\"10\" src=\"$CFG->wwwroot/pix/spacer.gif\" alt=\"\"></td>\n";
error("Print teacher assessment form: User record not found");
}
- echo "<CENTER><TABLE BORDER=\"1\" WIDTH=\"30%\"><TR>
- <TD ALIGN=CENTER BGCOLOR=\"$THEME->cellcontent\">\n";
+ echo "<center><table border=\"1\" width=\"30%\"><tr>
+ <td align=\"center\" bgcolor=\"$THEME->cellcontent\">\n";
if (!$teachersubmission = get_record("exercise_submissions", "id", $assessment->submissionid)) {
error ("Print teacher assessment form: Submission record not found");
}
echo exercise_print_submission_title($exercise, $teachersubmission);
- echo "</TD></TR></TABLE><BR CLEAR=ALL>\n";
+ echo "</td></tr></table><br clear=\"all\">\n";
- echo "<CENTER><TABLE BORDER=\"1\" WIDTH=\"30%\"><TR>
- <TD ALIGN=CENTER BGCOLOR=\"$THEME->cellcontent\">\n";
+ echo "<center><table border=\"1\" width=\"30%\"><tr>
+ <td align=\"center\" bgcolor=\"$THEME->cellcontent\">\n";
echo exercise_print_submission_title($exercise, $submission);
- echo "</TD></TR></TABLE></center><BR CLEAR=ALL>\n";
+ echo "</td></tr></table></center><br clear=\"all\">\n";
?>
<form name="assessmentform" method="post" action="assessments.php">
- <INPUT TYPE="hidden" NAME="id" VALUE="<?PHP echo $cm->id ?>" />
- <input type="hidden" name="said" value="<?PHP echo $assessment->id ?>" />
- <input type="hidden" name="sid" value="<?PHP echo $submission->id ?>" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
+ <input type="hidden" name="said" value="<?php echo $assessment->id ?>" />
+ <input type="hidden" name="sid" value="<?php echo $submission->id ?>" />
<input type="hidden" name="action" value="updateteacherassessment" />
<input type="hidden" name="resubmit" value="0" />
- <input type="hidden" name="returnto" value="<?PHP echo $returnto ?>" />
- <?PHP
+ <input type="hidden" name="returnto" value="<?php echo $returnto ?>" />
+ <?php
// now print a normal assessment form based on the student's assessment for this submission
// and allow the teacher to grade and add additional comments
// only show the grade if grading strategy > 0 and the grade is positive
if ($exercise->gradingstrategy and $assessment->grade >= 0) {
- echo "<CENTER><B>".get_string("thegradeis", "exercise").": ".
+ echo "<center><b>".get_string("thegradeis", "exercise").": ".
number_format($assessment->grade * $exercise->grade / 100.0, 2)." (".
- get_string("maximumgrade")." ".number_format($exercise->grade, 0).")</B></CENTER><BR CLEAR=ALL>\n";
+ get_string("maximumgrade")." ".number_format($exercise->grade, 0).")</b></center><br clear=\"all\">\n";
}
echo "<center><table cellpadding=\"2\" border=\"1\">\n";
- echo "<tr valign=top>\n";
+ echo "<tr valign=\"top\">\n";
echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"><center><b>".get_string("yourassessment", "exercise").
"</b></center></td>\n";
echo "</tr>\n";
// now print the form
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("element","exercise")." $iplus1:</B></P></TD>\n";
- echo " <TD>".text_to_html($elements[$i]->description);
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
+ echo " <td>".text_to_html($elements[$i]->description);
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
else {
echo text_to_html($grades[$i]->feedback);
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
// now print the form
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("element","exercise")." $iplus1:</B></P></TD>\n";
- echo " <TD>".text_to_html($elements[$i]->description);
- echo "<P align=right><FONT size=1>Weight: "
- .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</FONT>\n";
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("grade"). ":</B></P></TD>\n";
- echo " <TD valign=\"top\">\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
+ echo " <td>".text_to_html($elements[$i]->description);
+ echo "<p align=\"right\"><font size=\"1\">Weight: "
+ .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font>\n";
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("grade"). ":</b></p></td>\n";
+ echo " <td valign=\"top\">\n";
// get the appropriate scale
$scalenumber=$elements[$i]->scale;
switch ($SCALE->type) {
case 'radio' :
// show selections highest first
- echo "<CENTER><B>$SCALE->start</B> ";
+ echo "<center><b>$SCALE->start</b> ";
for ($j = $SCALE->size - 1; $j >= 0 ; $j--) {
$checked = false;
if (isset($grades[$i]->grade)) {
}
}
if ($checked) {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED=\"checked\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" checked=\"checked\" /> \n";
}
else {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" /> \n";
}
}
- echo " <B>$SCALE->end</B></CENTER>\n";
+ echo " <b>$SCALE->end</b></center>\n";
break;
case 'selection' :
unset($numbers);
}
break;
- echo " </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
}
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
else {
echo text_to_html($grades[$i]->feedback);
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
}
break;
$error = 0;
for ($i=0; $i < count($elements) - 1; $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("element","exercise")." $iplus1:</B></P></TD>\n";
- echo " <TD>".text_to_html($elements[$i]->description);
- echo "<P align=right><FONT size=1>Weight: "
- .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</FONT>\n";
- echo "</TD></TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("grade"). ":</B></P></TD>\n";
- echo " <TD valign=\"top\">\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("element","exercise")." $iplus1:</b></p></td>\n";
+ echo " <td>".text_to_html($elements[$i]->description);
+ echo "<p align=\"right\"><font size=\"1\">Weight: "
+ .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font>\n";
+ echo "</td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("grade"). ":</b></p></td>\n";
+ echo " <td valign=\"top\">\n";
// get the appropriate scale - yes/no scale (0)
$SCALE = (object) $EXERCISE_SCALES[0];
switch ($SCALE->type) {
case 'radio' :
// show selections highest first
- echo "<CENTER><B>$SCALE->start</B> ";
+ echo "<center><b>$SCALE->start</b> ";
for ($j = $SCALE->size - 1; $j >= 0 ; $j--) {
$checked = false;
if (isset($grades[$i]->grade)) {
}
}
if ($checked) {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED=\"checked\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" checked=\"checked\" /> \n";
}
else {
- echo " <INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" /> \n";
+ echo " <input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" /> \n";
}
}
- echo " <B>$SCALE->end</B></CENTER>\n";
+ echo " <b>$SCALE->end</b></center>\n";
break;
case 'selection' :
unset($numbers);
break;
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[$i]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[$i]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
echo text_to_html($grades[$i]->feedback);
}
}
- echo " </TD>\n";
- echo "</TR>\n";
- echo "<TR valign=top>\n";
- echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TR>\n";
+ echo " </td>\n";
+ echo "</tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</tr>\n";
if (empty($grades[$i]->grade)) {
$error += $EXERCISE_EWEIGHTS[$elements[$i]->weight];
}
}
// print the number of negative elements
- // echo "<TR><TD>".get_string("numberofnegativeitems", "exercise")."</TD><TD>$negativecount</TD></TR>\n";
- // echo "<TR valign=top>\n";
- // echo " <TD COLSPAN=2 BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo "</TABLE></CENTER>\n";
+ // echo "<tr><td>".get_string("numberofnegativeitems", "exercise")."</td><td>$negativecount</td></tr>\n";
+ // echo "<tr valign=\"top\">\n";
+ // echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo "</table></center>\n";
// now print the grade table
- echo "<P><CENTER><B>".get_string("gradetable","exercise")."</B></CENTER>\n";
- echo "<CENTER><TABLE cellpadding=5 border=1><TR><TD ALIGN=\"CENTER\">".
+ echo "<p><center><b>".get_string("gradetable","exercise")."</b></center>\n";
+ echo "<center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"CENTER\">".
get_string("numberofnegativeresponses", "exercise");
- echo "</TD><TD>". get_string("suggestedgrade", "exercise")."</TD></TR>\n";
+ echo "</td><td>". get_string("suggestedgrade", "exercise")."</td></tr>\n";
for ($i=0; $i<=$exercise->nelements; $i++) {
if ($i == intval($error + 0.5)) {
- echo "<TR><TD ALIGN=\"CENTER\"><IMG SRC=\"$CFG->pixpath/t/right.gif\"> $i</TD><TD ALIGN=\"CENTER\">{$elements[$i]->maxscore}</TD></TR>\n";
+ echo "<tr><td align=\"CENTER\"><img src=\"$CFG->pixpath/t/right.gif\"> $i</td><td align=\"CENTER\">{$elements[$i]->maxscore}</td></tr>\n";
}
else {
- echo "<TR><TD ALIGN=\"CENTER\">$i</TD><TD ALIGN=\"CENTER\">{$elements[$i]->maxscore}</TD></TR>\n";
+ echo "<tr><td align=\"CENTER\">$i</td><td align=\"CENTER\">{$elements[$i]->maxscore}</td></tr>\n";
}
}
- echo "</TABLE></CENTER>\n";
- echo "<P><CENTER><TABLE cellpadding=5 border=1><TR><TD align=\"right\"><b>".
- get_string("optionaladjustment", "exercise")."</b></TD><TD>\n";
+ echo "</table></center>\n";
+ echo "<p><center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"right\"><b>".
+ get_string("optionaladjustment", "exercise")."</b></td><td>\n";
unset($numbers);
for ($j = 20; $j >= -20; $j--) {
$numbers[$j] = $j;
else {
choose_from_menu($numbers, "grade[$exercise->nelements]", 0, "");
}
- echo "</TD></TR>\n";
+ echo "</td></tr>\n";
break;
case 3: // criteria grading
- echo "<TR valign=top>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"> </TD>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>". get_string("criterion","exercise")."</B></TD>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("select")."</B></TD>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("suggestedgrade", "exercise")."</B></TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"> </td>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>". get_string("criterion","exercise")."</b></td>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>".get_string("select")."</b></td>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>".get_string("suggestedgrade", "exercise")."</b></td>\n";
// find which criteria has been selected (saved in the zero element), if any
if (isset($grades[0]->grade)) {
$selection = $grades[0]->grade;
// now run through the elements
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=top>\n";
- echo " <TD>$iplus1</TD><TD>".text_to_html($elements[$i]->description)."</TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td>$iplus1</td><td>".text_to_html($elements[$i]->description)."</td>\n";
if ($selection == $i) {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[0]\" VALUE=\"$i\" CHECKED=\"checked\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[0]\" value=\"$i\" checked=\"checked\" /></td>\n";
}
else {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[0]\" VALUE=\"$i\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[0]\" value=\"$i\" /></td>\n";
}
- echo "<TD align=center>{$elements[$i]->maxscore}</TD></TR>\n";
+ echo "<td align=\"center\">{$elements[$i]->maxscore}</td></tr>\n";
}
- echo "</TABLE></CENTER>\n";
- echo "<P><CENTER><TABLE cellpadding=5 border=1><TR><TD align=\"right\"><b>".
- get_string("optionaladjustment", "exercise")."</b></TD><TD>\n";
+ echo "</table></center>\n";
+ echo "<p><center><table cellpadding=\"5\" border=\"1\"><tr><td align=\"right\"><b>".
+ get_string("optionaladjustment", "exercise")."</b></td><td>\n";
unset($numbers);
for ($j = 20; $j >= -20; $j--) {
$numbers[$j] = $j;
else {
choose_from_menu($numbers, "grade[1]", 0, "");
}
- echo "</TD></TR>\n";
+ echo "</td></tr>\n";
break;
case 4: // rubric grading
// now run through the elements...
for ($i=0; $i < count($elements); $i++) {
$iplus1 = $i+1;
- echo "<TR valign=\"top\">\n";
- echo "<TD align=\"right\"><b>".get_string("element", "exercise")." $iplus1:</b></TD>\n";
- echo "<TD>".text_to_html($elements[$i]->description).
- "<P align=\"right\"><font size=\"1\">Weight: "
- .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font></TD></tr>\n";
- echo "<TR valign=\"top\">\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\" align=\"center\"><B>".get_string("select")."</B></TD>\n";
- echo " <TD BGCOLOR=\"$THEME->cellheading2\"><B>". get_string("criterion","exercise")."</B></TD></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo "<td align=\"right\"><b>".get_string("element", "exercise")." $iplus1:</b></td>\n";
+ echo "<td>".text_to_html($elements[$i]->description).
+ "<p align=\"right\"><font size=\"1\">Weight: "
+ .number_format($EXERCISE_EWEIGHTS[$elements[$i]->weight], 2)."</font></td></tr>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("select")."</b></td>\n";
+ echo " <td bgcolor=\"$THEME->cellheading2\"><b>". get_string("criterion","exercise")."</b></td></tr>\n";
if (isset($grades[$i])) {
$selection = $grades[$i]->grade;
} else {
if (empty($rubrics[$j]->description)) {
break; // out of inner for loop
}
- echo "<TR valign=top>\n";
+ echo "<tr valign=\"top\">\n";
if ($selection == $j) {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED=\"checked\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" checked=\"checked\" /></td>\n";
} else {
- echo " <TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" /></TD>\n";
+ echo " <td align=\"center\"><input type=\"RADIO\" name=\"grade[$i]\" value=\"$j\" /></td>\n";
}
- echo "<TD>".text_to_html($rubrics[$j]->description)."</TD>\n";
+ echo "<td>".text_to_html($rubrics[$j]->description)."</td>\n";
}
- echo "<TR valign=top>\n";
- echo " <TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
- echo " <TD>\n";
+ echo "<tr valign=\"top\">\n";
+ echo " <td align=\"right\"><p><b>". get_string("feedback").":</b></p></td>\n";
+ echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"feedback[]\" rows=\"3\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($grades[$i]->feedback)) {
echo $grades[$i]->feedback;
}
echo " </td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
- echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </TD>\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
echo "</tr>\n";
}
}
case 0:
case 1:
case 4 : // no grading, accumulative and rubic
- echo " <td align=\"right\"><P><B>". get_string("generalcomment", "exercise").":</B></P></TD>\n";
+ echo " <td align=\"right\"><p><b>". get_string("generalcomment", "exercise").":</b></p></td>\n";
break;
default :
- echo " <td align=\"right\"><P><B>". get_string("reasonforadjustment", "exercise").":</B></P></TD>\n";
+ echo " <td align=\"right\"><p><b>". get_string("reasonforadjustment", "exercise").":</b></p></td>\n";
}
echo " <td>\n";
if ($allowchanges) {
- echo " <textarea name=\"generalcomment\" rows=5 cols=75 wrap=\"virtual\">\n";
+ echo " <textarea name=\"generalcomment\" rows=\"5\" cols=\"75\" wrap=\"virtual\">\n";
if (isset($assessment->generalcomment)) {
echo $assessment->generalcomment;
}
echo " </td>\n";
echo "</tr>\n";
echo "<tr valign=\"top\">\n";
- echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </TD>\n";
+ echo " <td colspan=\"2\" bgcolor=\"$THEME->cellheading2\"> </td>\n";
echo "</tr>\n";
// ...and close the table and show two buttons...to resubmit or not to resubmit
function exercise_print_time_to_deadline($time) {
if ($time < 0) {
$timetext = get_string("afterdeadline", "exercise", format_time($time));
- return " (<FONT COLOR=RED>$timetext</FONT>)";
+ return " (<font color=\"red\">$timetext</font>)";
} else {
$timetext = get_string("beforedeadline", "exercise", format_time($time));
return " ($timetext)";
error("Course Module ID was incorrect");
}
- echo "<DIV ALIGN=CENTER>";
- echo "<FORM ENCTYPE=\"multipart/form-data\" METHOD=\"POST\" ACTION=upload.php>";
- echo " <INPUT TYPE=hidden NAME=MAX_FILE_SIZE value=\"$exercise->maxbytes\" />";
- echo " <INPUT TYPE=hidden NAME=id VALUE=\"$cm->id\" />";
- echo "<b>".get_string("title", "exercise")."</b>: <INPUT NAME=\"title\" TYPE=\"text\" SIZE=\"60\" MAXSIZE=\"100\" /><BR><BR>\n";
- echo " <INPUT NAME=\"newfile\" TYPE=\"file\" size=\"50\" />";
- echo " <INPUT TYPE=submit NAME=save VALUE=\"".get_string("uploadthisfile")."\" />";
+ echo "<div align=\"center\">";
+ echo "<form enctype=\"multipart/form-data\" method=\"POST\" action=\"upload.php\">";
+ echo " <input type=\"hidden\" name=\"maxbytes\" value=\"$exercise->maxbytes\" />";
+ echo " <input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
+ echo "<b>".get_string("title", "exercise")."</b>: <input name=\"title\" type=\"text\" size=\"60\" maxsize=\"100\" /><br /><br />\n";
+ echo " <input name=\"newfile\" type=\"file\" size=\"50\" />";
+ echo " <input type=\"submit\" name=\"save\" value=\"".get_string("uploadthisfile")."\" />";
echo " (".get_string("maximumupload").": ".display_size($exercise->maxbytes).")\n";
- echo "</FORM>";
- echo "</DIV>";
+ echo "</form>";
+ echo "</div>";
}
foreach ($assessments as $assessment) {
if ($assessment->timegraded) {
$gradingscaled = round($assessment->gradinggrade * $exercise->gradinggrade / 100.0);
- $str .= "<A HREF=\"assessments.php?action=viewassessment&a=$exercise->id&aid=$assessment->id\">";
- $str .= "$gradingscaled</A> ";
+ $str .= "<a href=\"assessments.php?action=viewassessment&a=$exercise->id&aid=$assessment->id\">";
+ $str .= "$gradingscaled</a> ";
}
else {
- $str .= "<A HREF=\"assessments.php?action=viewassessment&a=$exercise->id&aid=$assessment->id\">";
- $str .= "-</A> ";
+ $str .= "<a href=\"assessments.php?action=viewassessment&a=$exercise->id&aid=$assessment->id\">";
+ $str .= "-</a> ";
}
}
$str .= ")";
?>
<form name="form" method="post" action="mod.php">
-<table cellpadding=5>
-<tr valign=top>
- <td align=right width=\"50%\"><P><B><?php print_string("title", "exercise") ?>:</B></P></TD>
+<table cellpadding="5">
+<tr valign="top">
+ <td align="right" width=\"50%\"><p><b><?php print_string("title", "exercise") ?>:</b></p></td>
<td width=\"50%\">
- <input type="text" name="name" size=60 value="<?php p($form->name) ?>">
+ <input type="text" name="name" size="60" value="<?php p($form->name) ?>">
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("description", "exercise") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("description", "exercise") ?>:</b></p></td>
<td>
<?php
echo get_string("descriptionofexercise", "exercise", $course->students);
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("gradeforstudentsassessment", "exercise", $course->student) ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("gradeforstudentsassessment", "exercise", $course->student) ?>:</b></p></td>
<td>
<?php
for ($i=100; $i>=0; $i--) {
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("gradeforsubmission", "exercise") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("gradeforsubmission", "exercise") ?>:</b></p></td>
<td>
<?php
choose_from_menu($grades, "grade", "$form->grade", "");
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("gradingstrategy", "exercise") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("gradingstrategy", "exercise") ?>:</b></p></td>
<td>
<?php
choose_from_menu($EXERCISE_TYPE, "gradingstrategy", $form->gradingstrategy, "");
</tr>
<tr>
- <td align=right><P><B><?php print_string("handlingofmultiplesubmissions", "exercise") ?>:</B></P></TD>
+ <td align="right"><p><b><?php print_string("handlingofmultiplesubmissions", "exercise") ?>:</b></p></td>
<td>
<?php
$options[0] = get_string("usemean", "exercise"); $options[1] = get_string("usemaximum", "exercise");
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("numberofassessmentelements", "exercise") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("numberofassessmentelements", "exercise") ?>:</b></p></td>
<td valign="middle">
<?php
for ($i=20; $i>=0; $i--) {
</tr>
<tr>
- <td align=right><P><B><?php print_string("comparisonofassessments", "exercise") ?>:</B></P></TD>
+ <td align="right"><p><b><?php print_string("comparisonofassessments", "exercise") ?>:</b></p></td>
<td>
<?php
// set up comparison names
</tr>
<tr>
- <td align=right><p><b><?php print_string("usepassword", "exercise"); ?>:</b></p></td>
+ <td align="right"><p><b><?php print_string("usepassword", "exercise"); ?>:</b></p></td>
<td>
- <?PHP
+ <?php
$options[0] = get_string("no"); $options[1] = get_string("yes");
choose_from_menu($options, "usepassword", $form->usepassword, "");
helpbutton("usepassword", get_string("usepassword", "exercise"), "exercise");
</tr>
<tr>
- <td align=right><p><b><?php print_string("password"); ?>:</b></p></td>
+ <td align="right"><p><b><?php print_string("password"); ?>:</b></p></td>
<td>
- <input type="text" name="password" size=10 value=""> <?php echo " (".get_string("leavetokeep").")"; ?>
+ <input type="text" name="password" size="10" value=""> <?php echo " (".get_string("leavetokeep").")"; ?>
<?php helpbutton("password", get_string("password"), "exercise"); ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("maximumsize", "exercise") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("maximumsize", "exercise") ?>:</b></p></td>
<td>
<?php
$sizelist = array("10Kb", "50Kb", "100Kb", "500Kb", "1Mb", "2Mb", "5Mb", "10Mb", "20Mb", "50Mb");
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("deadline", "exercise") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("deadline", "exercise") ?>:</b></p></td>
<td><?php
print_date_selector("deadlineday", "deadlinemonth", "deadlineyear", $form->deadline);
echo " - ";
?></td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("numberofentriesinleaguetable", "exercise") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("numberofentriesinleaguetable", "exercise") ?>:</b></p></td>
<td><?php
unset($numbers);
$numbers[22] = 'All';
</td>
</tr>
-<tr valign=top>>
- <td align=right><p><b><?php print_string("hidenamesfromstudents", "exercise", $course->students) ?>:</b></p></td>
+<tr valign="top">>
+ <td align="right"><p><b><?php print_string("hidenamesfromstudents", "exercise", $course->students) ?>:</b></p></td>
<td><?php
$options[0] = get_string("no"); $options[1] = get_string("yes");
choose_from_menu($options, "anonymous", $form->anonymous, "");
</table>
<br />
<center>
-<input type="hidden" name=course value="<?php p($form->course) ?>">
-<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>">
-<input type="hidden" name=section value="<?php p($form->section) ?>">
-<input type="hidden" name=module value="<?php p($form->module) ?>">
-<input type="hidden" name=modulename value="<?php p($form->modulename) ?>">
-<input type="hidden" name=instance value="<?php p($form->instance) ?>">
-<input type="hidden" name=mode value="<?php p($form->mode) ?>">
+<input type="hidden" name="course" value="<?php p($form->course) ?>">
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>">
+<input type="hidden" name="section" value="<?php p($form->section) ?>">
+<input type="hidden" name="module" value="<?php p($form->module) ?>">
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>">
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>">
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>">
<input type="submit" value="<?php print_string("savechanges") ?>">
-<input type="submit" name=cancel value="<?php print_string("cancel") ?>">
+<input type="submit" name="cancel" value="<?php print_string("cancel") ?>">
<p>
-<p><?PHP notify(get_string("noteonassessmentelements", "exercise")); ?>
+<p><?php notify(get_string("noteonassessmentelements", "exercise")); ?>
-</CENTER>
+</center>
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//exercise mods
-<?PHP // $Id: submissions.php,v 1.0 22 Aug 2003
+<?php // $Id: submissions.php,v 1.0 22 Aug 2003
/*************************************************
ACTIONS handled are:
// ... print the header and...
print_header_simple("$exercise->name", "",
- "<A HREF=index.php?id=$course->id>$strexercises</A> ->
- <A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strsubmissions",
+ "<a href=\"index.php?id=$course->id\">$strexercises</a> ->
+ <a href=\"view.php?id=$cm->id\">$exercise->name</a> -> $strsubmissions",
"", "", true);
//...get the action!
?>
<form name="amendtitleform" action="submissions.php" method="post">
<input type="hidden" name="action" value="adminupdatetitle">
- <input type="hidden" name="id" value="<?PHP echo $cm->id ?>">
- <input type="hidden" name="sid" value="<?PHP echo $_REQUEST['sid'] ?>">
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>">
+ <input type="hidden" name="sid" value="<?php echo $_REQUEST['sid'] ?>">
<center>
<table celpadding="5" border="1">
- <?PHP
+ <?php
// now get the comment
echo "<tr valign=\"top\">\n";
- echo " <td align=\"right\"><P><B>". get_string("title", "exercise").":</b></p></td>\n";
+ echo " <td align=\"right\"><p><b>". get_string("title", "exercise").":</b></p></td>\n";
echo " <td>\n";
echo " <input type=\"text\" name=\"title\" size=\"60\" maxlength=\"100\" value=\"$submission->title\">\n";
echo " </td></tr></table>\n";
- echo "<input type=submit VALUE=\"".get_string("amendtitle", "exercise")."\">\n";
+ echo "<input type=\"submit\" value=\"".get_string("amendtitle", "exercise")."\">\n";
echo "</center></form>\n";
}
echo "<td bgcolor=\"$THEME->cellheading2\"><b>".get_string("submission", "exercise")."</b></td>";
echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforassessment", "exercise")."</b></td>";
echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforsubmission", "exercise")."</b></td>";
- echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "exercise")."</b></td></TR>\n";
+ echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "exercise")."</b></td></tr>\n";
// now the weights
echo "<tr><td bgcolor=\"$THEME->cellheading2\"><b>".get_string("maximumgrade")."</b></td>";
echo "<td bgcolor=\"$THEME->cellheading2\"><b> </b></td>\n";
-<?PHP // $Id: upload.php, v1.0 30th April 2003
+<?php // $Id: upload.php, v1.0 30th April 2003
require("../../config.php");
require("lib.php");
$strupload = get_string("upload");
print_header_simple("$exercise->name : $strupload", "",
- "<A HREF=index.php?id=$course->id>$strexercises</A> ->
- <A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strupload",
+ "<a href=\"index.php?id=$course->id\">$strexercises</a> ->
+ <a href=\"view.php?id=$cm->id\">$exercise->name</a> -> $strupload",
"", "", true);
// check that this is not a "rapid" second submission, caused by using the back button
-<?PHP // $Id$
+<?php // $Id$
////////////////////////////////////////////////////////////////////////////////
// Code fragment to define the module version etc.
-<?PHP // $Id: view.php, v1.1 23 Aug 2003
+<?php // $Id: view.php, v1.1 23 Aug 2003
/*************************************************
ACTIONS handled are:
// ...display header...
print_header_simple("$exercise->name", "",
- "<A HREF=index.php?id=$course->id>$strexercises</A> -> $exercise->name",
+ "<a href=\"index.php?id=$course->id\">$strexercises</a> -> $exercise->name",
"", "", true, update_module_button($cm->id, $course->id, $strexercise), navmenu($course, $cm));
// ...and if necessary set default action
echo "<td bgcolor=\"$THEME->cellheading2\"><b>".get_string("submissions", "exercise")."</b></td>";
echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforassessment", "exercise")."</b></td>";
echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforsubmission", "exercise", $course->teacher)."</b></td>";
- echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "exercise")."</b></td></TR>\n";
+ echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "exercise")."</b></td></tr>\n";
// now the weights
- echo "<TR><td bgcolor=\"$THEME->cellheading2\"><b>".get_string("maximumgrade")."</b></td>";
+ echo "<tr><td bgcolor=\"$THEME->cellheading2\"><b>".get_string("maximumgrade")."</b></td>";
echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$exercise->gradinggrade</b></td>\n";
echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$exercise->grade</b></td>\n";
- echo "<td bgcolor=\"$THEME->cellheading2\"><b> </b></td></TR>\n";
+ echo "<td bgcolor=\"$THEME->cellheading2\"><b> </b></td></tr>\n";
// first get user's own assessment reord, it should contain their grading grade
if ($ownassessments = exercise_get_user_assessments($exercise, $USER)) {
foreach ($ownassessments as $ownassessment) {
$grade = "<font color=\"red\">(".$grade.")</font>";
$overallgrade = "<font color=\"red\">(".$overallgrade.")</font>";
}
- echo "<TR><td>".exercise_print_submission_title($exercise, $submission)."</td>\n";
+ echo "<tr><td>".exercise_print_submission_title($exercise, $submission)."</td>\n";
echo "<td align=\"center\">$gradinggrade</td>";
echo "<td align=\"center\">$grade</td>";
- echo "<td align=\"center\">$overallgrade</td></TR>\n";
+ echo "<td align=\"center\">$overallgrade</td></tr>\n";
}
}
}
}
- echo "</TABLE><BR CLEAR=ALL>\n";
+ echo "</table><br clear=\"all\">\n";
if ($exercise->showleaguetable) {
exercise_print_league_table($exercise);
}
// list previous submissions from this user
exercise_list_user_submissions($exercise, $USER);
- echo "<HR SIZE=1 NOSHADE>";
+ echo "<hr size=\"1\" NOSHADE>";
// print upload form
print_heading(get_string("submitexercisedescription", "exercise").":");
exercise_count_unassessed_student_submissions($exercise))."</a></b> \n";
helpbutton("grading", get_string("studentsubmissionsforassessment", "exercise"),
"exercise");
- print_heading("<A HREF=\"submissions.php?id=$cm->id&action=displayfinalgrades\">".
- get_string("displayoffinalgrades", "exercise")."</A>");
+ print_heading("<a href=\"submissions.php?id=$cm->id&action=displayfinalgrades\">".
+ get_string("displayoffinalgrades", "exercise")."</a>");
}
- print_heading("<A HREF=\"submissions.php?id=$cm->id&action=adminlist\">".
- get_string("administration")."</A>");
+ print_heading("<a href=\"submissions.php?id=$cm->id&action=adminlist\">".
+ get_string("administration")."</a>");
}
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//forum mods
<form method="post" action="module.php" name="form">
-<table cellpadding=9 cellspacing=0 >
-<tr valign=top>
- <td align=right><p>forum_displaymode:</td>
+<table cellpadding="9" cellspacing="0" >
+<tr valign="top">
+ <td align="right"><p>forum_displaymode:</td>
<td>
<?php choose_from_menu ($FORUM_LAYOUT_MODES, "forum_displaymode", $CFG->forum_displaymode, "", "", ""); ?>
</td>
<?php print_string("configdisplaymode", "forum") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p>forum_replytouser:</td>
+<tr valign="top">
+ <td align="right"><p>forum_replytouser:</td>
<td>
<?php
unset($options);
<?php print_string("configreplytouser", "forum") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p>forum_shortpost:</td>
+<tr valign="top">
+ <td align="right"><p>forum_shortpost:</td>
<td>
- <input name=forum_shortpost type=text size=5 value="<?php p($CFG->forum_shortpost) ?>">
+ <input name="forum_shortpost" type="text" size="5" value="<?php p($CFG->forum_shortpost) ?>">
</td>
<td>
<?php print_string("configshortpost", "forum") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p>forum_longpost:</td>
+<tr valign="top">
+ <td align="right"><p>forum_longpost:</td>
<td>
- <input name=forum_longpost type=text size=5 value="<?php p($CFG->forum_longpost) ?>">
+ <input name="forum_longpost" type="text" size="5" value="<?php p($CFG->forum_longpost) ?>">
</td>
<td>
<?php print_string("configlongpost", "forum") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p>forum_manydiscussions:</td>
+<tr valign="top">
+ <td align="right"><p>forum_manydiscussions:</td>
<td>
- <input name=forum_manydiscussions type=text size=5 value="<?php p($CFG->forum_manydiscussions) ?>">
+ <input name="forum_manydiscussions" type="text" size="5" value="<?php p($CFG->forum_manydiscussions) ?>">
</td>
<td>
<?php print_string("configmanydiscussions", "forum") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p>forum_maxbytes:</td>
+<tr valign="top">
+ <td align="right"><p>forum_maxbytes:</td>
<td><?php
$choices = get_max_upload_sizes($CFG->maxbytes);
choose_from_menu ($choices, "forum_maxbytes", $CFG->forum_maxbytes, "");
<?php print_string("configmaxbytes", "forum") ?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p>forum_enablerssfeeds:</td>
+<tr valign="top">
+ <td align="right"><p>forum_enablerssfeeds:</td>
<td>
<?php
if (!isset($CFG->enablerssfeeds) || $CFG->enablerssfeeds == 0) {
</tr>
<tr>
- <td colspan=3 align=center>
+ <td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>
-<?PHP // $Id$
+<?php // $Id$
function forum_upgrade($oldversion) {
// This function does anything necessary to upgrade
if ($oldversion < 2002091000) {
if (! execute_sql(" ALTER TABLE `forum_posts` ADD `attachment` VARCHAR(100) NOT NULL AFTER `message` ")) {
- echo "<P>Don't worry about this error - your server already had this upgrade applied";
+ echo "<p>Don't worry about this error - your server already had this upgrade applied";
}
}
-<?PHP
+<?php
function forum_upgrade($oldversion) {
// This function does anything necessary to upgrade
-<?PHP // $Id$
+<?php // $Id$
function forum_upgrade($oldversion) {
// This function does anything necessary to upgrade
-<?PHP // $Id$
+<?php // $Id$
// Deletes a forum entirely.
-<?PHP // $Id$
+<?php // $Id$
// Displays a post, and all the posts below it.
// If no post is given, displays all posts in a discussion
}
if (empty($navtail)) {
- $navtail = "<A HREF=\"discuss.php?d=$discussion->id\">$discussion->name</A> -> $post->subject";
+ $navtail = "<a href=\"discuss.php?d=$discussion->id\">$discussion->name</a> -> $post->subject";
}
- $navmiddle = "<A HREF=\"../forum/index.php?id=$course->id\">".get_string("forums", "forum")."</A> -> <A HREF=\"../forum/view.php?f=$forum->id\">$forum->name</A>";
+ $navmiddle = "<a href=\"../forum/index.php?id=$course->id\">".get_string("forums", "forum")."</a> -> <a href=\"../forum/view.php?f=$forum->id\">$forum->name</a>";
$searchform = forum_print_search_form($course, "", true, "plain");
if ($course->category) {
print_header("$course->shortname: $discussion->name", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
+ "<a href=../../course/view.php?id=$course->id>$course->shortname</a> ->
$navmiddle -> $navtail", "", "", true, $searchform, navmenu($course, $cm));
} else {
print_header("$course->shortname: $discussion->name", "$course->fullname",
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
if ($course->category) {
print_header("$course->shortname: $strforums", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> $strforums",
+ "<a href=../../course/view.php?id=$course->id>$course->shortname</a> -> $strforums",
"", "", true, $searchform, navmenu($course));
} else {
print_header("$course->shortname: $strforums", "$course->fullname", "$strforums",
-<?PHP // $Id$
+<?php // $Id$
require_once("$CFG->dirroot/files/mimetypes.php");
}
} else {
- echo "<P>".get_string("noposts", "forum")."</P>";
+ echo "<p>".get_string("noposts", "forum")."</p>";
}
}
}
$date = userdate($post->modified, $strftimerecent);
$fullname = fullname($post, $isteacher);
- echo "<p $teacheronly><font size=1>$date - $fullname<br />";
+ echo "<p $teacheronly><font size=\"1\">$date - $fullname<br />";
echo "\"<a href=\"$CFG->wwwroot/mod/forum/$log->url\">";
if (!empty($CFG->filterall)) {
$post->subject = filter_text("<nolink>$post->subject</nolink>", $course->id);
$output .= "</td>";
if ($post->parent) {
- $output .= "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
+ $output .= "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
} else {
- $output .= "<td nowrap bgcolor=\"$THEME->cellheading2\" class=\"forumpostheadertopic\">";
+ $output .= "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading2\" class=\"forumpostheadertopic\">";
}
$output .= "<p>";
- $output .= "<font size=3><b>$post->subject</b></font><br />";
- $output .= "<font size=2>";
+ $output .= "<font size=\"3\"><b>$post->subject</b></font><br />";
+ $output .= "<font size=\"2\">";
$fullname = fullname($user, isteacher($course->id));
$by->name = "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a>";
if ($post->attachment) {
$post->course = $course->id;
$post->forum = get_field("forum_discussions", "forum", "id", $post->discussion);
- $output .= "<div align=right>";
+ $output .= "<div align=\"right\">";
$output .= forum_print_attachments($post, "html");
$output .= "</div>";
}
$output .= $formattedtext;
- $output .= "<p align=right><font size=-1>";
+ $output .= "<p align=\"right\"><font size=-1>";
if ($post->parent) {
$output .= "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion&parent=$post->parent\">".get_string("parent", "forum")."</a> | ";
}
$output .= "</p>";
- $output .= "<div align=right><p align=right>";
+ $output .= "<div align=\"right\"><p align=\"right\">";
if ($link) {
if ($post->replies == 1) {
} else {
$replystring = get_string("repliesmany", "forum", $post->replies);
}
- $output .= "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion\"><B>".get_string("discussthistopic", "forum")."</b></a> ($replystring) ";
+ $output .= "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion\"><b>".get_string("discussthistopic", "forum")."</b></a> ($replystring) ";
}
$output .= "</p></div>";
if ($footer) {
$post->subject = filter_text("<nolink>$post->subject</nolink>", $courseid);
}
echo "<p>";
- echo "<font size=3><b>$post->subject</b></font><br />";
- echo "<font size=2>";
+ echo "<font size=\"3\"><b>$post->subject</b></font><br />";
+ echo "<font size=\"2\">";
$fullname = fullname($post, $isteacher);
$by->name = "<a href=\"$CFG->wwwroot/user/view.php?id=$post->userid&course=$courseid\">$fullname</a>";
if ($reply) {
$commands[] = "<a href=\"$CFG->wwwroot/mod/forum/post.php?reply=$post->id\">$strreply</a>";
}
- echo "<p align=right><font size=-1>";
+ echo "<p align=\"right\"><font size=-1>";
echo implode(' | ', $commands).' ';
echo "</font></p>";
- echo "<div align=right><p align=right>";
+ echo "<div align=\"right\"><p align=\"right\">";
$ratingsmenuused = false;
if (!empty($ratings) and !empty($USER->id)) {
echo "</td>\n";
// Picture
- echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderpicture\" width=35>";
+ echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderpicture\" width=\"35\">";
print_user_picture($post->userid, $forum->course, $post->picture);
echo "</td>\n";
// User name
$fullname = fullname($post, isteacher($forum->course));
- echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheadername\" align=left nowrap>";
+ echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheadername\" align=\"left\" nowrap=\"nowrap\">";
echo "<a href=\"$CFG->wwwroot/user/view.php?id=$post->userid&course=$forum->course\">$fullname</a>";
echo "</td>\n";
if ($forum->open or $forum->type == "teacher") { // Show the column with replies
- echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderreplies\" align=center nowrap>";
+ echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderreplies\" align=\"center\" nowrap=\"nowrap\">";
echo "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion\">$post->replies</a>";
echo "</td>\n";
}
- echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderdate\" align=right nowrap>";
+ echo "<td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostheaderdate\" align=\"right\" nowrap=\"nowrap\">";
$usedate = (empty($post->timemodified)) ? $post->modified : $post->timemodified; // Just in case
$parenturl = (empty($post->lastpostid)) ? '' : '&parent='.$post->lastpostid;
echo '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.$parenturl.'">'.
global $CFG;
if ($type == "plain") {
- $output = "<table border=0 cellpadding=0 cellspacing=0><tr><td nowrap>";
- $output .= "<form name=search action=\"$CFG->wwwroot/mod/forum/search.php\">";
+ $output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td nowrap=\"nowrap\">";
+ $output .= "<form name=\"search\" action=\"$CFG->wwwroot/mod/forum/search.php\">";
$output .= "<font size=\"-1\">";
- $output .= "<input name=search type=text size=15 value=\"$search\">";
- $output .= "<input value=\"".get_string("searchforums", "forum")."\" type=submit>";
+ $output .= "<input name=\"search\" type=\"text\" size=\"15\" value=\"$search\">";
+ $output .= "<input value=\"".get_string("searchforums", "forum")."\" type=\"submit\">";
$output .= "</font>";
- $output .= "<input name=id type=hidden value=\"$course->id\">";
+ $output .= "<input name=\"id\" type=\"hidden\" value=\"$course->id\">";
$output .= "</form>";
$output .= "</td></tr></table>";
} else {
- $output = "<table border=0 cellpadding=10 cellspacing=0><tr><td align=center>";
- $output .= "<form name=search action=\"$CFG->wwwroot/mod/forum/search.php\">";
+ $output = "<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\"><tr><td align=\"center\">";
+ $output .= "<form name=\"search\" action=\"$CFG->wwwroot/mod/forum/search.php\">";
$output .= "<font size=\"-1\">";
- $output .= "<input name=search type=text size=15 value=\"$search\"><br />";
- $output .= "<input value=\"".get_string("searchforums", "forum")."\" type=submit>";
+ $output .= "<input name=\"search\" type=\"text\" size=\"15\" value=\"$search\"><br />";
+ $output .= "<input value=\"".get_string("searchforums", "forum")."\" type=\"submit\">";
$output .= "</font>";
- $output .= "<input name=id type=hidden value=\"$course->id\">";
+ $output .= "<input name=\"id\" type=\"hidden\" value=\"$course->id\">";
$output .= "</form>";
$output .= "</td></tr></table>";
}
} else {
$discussion->replies = 0;
}
- $inforum = get_string("inforum", "forum", "<A HREF=\"$CFG->wwwroot/mod/forum/view.php?f=$discussion->forumid\">$discussion->forumname</A>");
+ $inforum = get_string("inforum", "forum", "<a href=\"$CFG->wwwroot/mod/forum/view.php?f=$discussion->forumid\">$discussion->forumname</a>");
$discussion->subject .= " ($inforum)";
if (!empty($USER->id)) {
$ownpost = ($discussion->userid == $USER->id);
$ownpost = false;
}
forum_print_post($discussion, $courseid, $ownpost, $reply=0, $link=1, $assessed=false);
- echo "<BR>\n";
+ echo "<br />\n";
}
}
}
if (forum_user_can_post_discussion($forum, $currentgroup)) {
- echo "<p align=center>";
+ echo "<p align=\"center\">";
echo "<a href=\"$CFG->wwwroot/mod/forum/post.php?forum=$forum->id\">";
if ($forum->type == "news") {
echo get_string("addanewtopic", "forum")."</a>...";
if (! $discussions = forum_get_discussions($forum->id, $forum_sort, 0, $fullpost, $visiblegroups) ) {
if ($forum->type == "news") {
- echo "<p align=center><b>(".get_string("nonews", "forum").")</b></p>";
+ echo "<p align=\"center\"><b>(".get_string("nonews", "forum").")</b></p>";
} else {
- echo "<p align=center><b>(".get_string("nodiscussions", "forum").")</b></p>";
+ echo "<p align=\"center\"><b>(".get_string("nodiscussions", "forum").")</b></p>";
}
return;
}
}
if ($forum_style == "header") {
- echo "<table width=\"100%\" border=0 cellpadding=3 cellspacing=1 class=\"forumheaderlist\">";
+ echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"forumheaderlist\">";
echo "<tr class=\"forumpostheader\">";
echo "<th>".get_string("discussion", "forum")."</th>";
- echo "<th colspan=2>".get_string("startedby", "forum")."</th>";
+ echo "<th colspan=\"2\">".get_string("startedby", "forum")."</th>";
if ($forum->open or $forum->type == "teacher") {
echo "<th>".get_string("replies", "forum")."</th>";
}
$ratings->assesstimefinish = $forum->assesstimefinish;
$ratings->allow = ($forum->assessed != 2 or isteacher($course->id));
- echo "<form name=form method=post action=rate.php>";
- echo "<input type=hidden name=id value=\"$course->id\">";
+ echo "<form name=\"form\" method=\"post\" action=\"rate.php\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\">";
}
}
if ($detail) {
echo "<img src=\"$CFG->modpixpath/$activity->type/icon.gif\" ".
- "height=16 width=16 alt=\"$activity->name\"> ";
+ "height=\"16\" width=\"16\" alt=\"$activity->name\"> ";
}
echo "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d=" . $activity->content->discussion
. "#" . $activity->content->id . "\">";
}
?>
<form name="form" method="post" action="mod.php">
-<table cellpadding=5>
+<table cellpadding="5">
<tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("forumname", "forum")?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("forumname", "forum")?>:</b></p></td>
<td>
- <input type="text" name="name" size=30 value="<?php p($form->name) ?>">
+ <input type="text" name="name" size="30" value="<?php p($form->name) ?>">
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("forumtype", "forum")?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("forumtype", "forum")?>:</b></p></td>
<td>
<?php
$student = strtolower($course->student);
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("forumintro", "forum")?>:</b></p>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("forumintro", "forum")?>:</b></p>
<font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("allowdiscussions", "forum", strtolower("$course->student")) ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("allowdiscussions", "forum", strtolower("$course->student")) ?>:</b></p></td>
<td>
<?php
choose_from_menu($FORUM_OPEN_MODES, "open", $form->open, "");
</td>
</tr>
<tr>
- <td align=right><p><b><?php print_string("forcesubscribeq", "forum") ?>:</b></p></td>
+ <td align="right"><p><b><?php print_string("forcesubscribeq", "forum") ?>:</b></p></td>
<td>
<?php
unset($options);
?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("maxattachmentsize", "forum") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("maxattachmentsize", "forum") ?>:</b></p></td>
<td>
<?php
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
<?php
//Only show rss parameters if rss is activated at site and forum levels
if ($CFG->enablerssfeeds && $CFG->forum_enablerssfeeds) {
- echo "<tr valign=top>";
- echo "<td align=right><p><b>".get_string("rsstype").":</b></p></td>";
+ echo "<tr valign=\"top\">";
+ echo "<td align=\"right\"><p><b>".get_string("rsstype").":</b></p></td>";
echo "<td>";
unset($choices);
$choices[0] = get_string("none");
echo "</td>";
echo "</tr>";
- echo "<tr valign=top>";
- echo "<td align=right><p><b>".get_string("rssarticles").":</b></p></td>";
+ echo "<tr valign=\"top\">";
+ echo "<td align=\"right\"><p><b>".get_string("rssarticles").":</b></p></td>";
echo "<td>";
unset($choices);
$choices[0] = "0";
}
?>
<tr>
- <td align=right valign=top><p><b><?php print_string("allowratings", "forum") ?>:</b></p></td>
+ <td align="right" valign="top"><p><b><?php print_string("allowratings", "forum") ?>:</b></p></td>
<td>
<?php
echo "<script>";
"'finishday','finishmonth','finishyear','finishhour','finishminute'];";
echo "</script>";
- echo "<input name=\"userating\" type=checkbox value=1 ";
+ echo "<input name=\"userating\" type=\"checkbox\" value=\"1\" ";
echo " onclick=\"return lockoptions('form','userating', subitemsall)\" ";
if ($form->assessed) {
echo " checked ";
print_grade_menu($course->id, "scale", $form->scale, false);
echo "<br />";
- echo "<input name=\"ratingtime\" type=checkbox value=1 ";
+ echo "<input name=\"ratingtime\" type=\"checkbox\" value=\"1\" ";
echo " onclick=\"return lockoptions('form','ratingtime', subitemstime)\" ";
if ($form->assesstimestart and $form->assesstimefinish and $form->assessed) {
$form->ratingtime = 1;
echo ">";
print_string("ratingtime", "forum");
- echo "<table align=left><tr><td align=right nowrap>";
+ echo "<table align=\"left\"><tr><td align=\"right\" nowrap=\"nowrap\">";
echo get_string("from").":";
print_date_selector("startday", "startmonth", "startyear", $form->assesstimestart);
print_time_selector("starthour", "startminute", $form->assesstimestart);
print_time_selector("finishhour", "finishminute", $form->assesstimefinish);
echo "<br />";
echo "</td></tr></table>";
- echo "<input type=\"hidden\" name=\"hratingtime\" value=0>";
- echo "<input type=\"hidden\" name=\"hassessed\" value=0>";
- echo "<input type=\"hidden\" name=\"hassesspublic\" value=0>";
- echo "<input type=\"hidden\" name=\"hscale\" value=0>";
- echo "<input type=\"hidden\" name=\"hstartday\" value=0>";
- echo "<input type=\"hidden\" name=\"hstartmonth\" value=0>";
- echo "<input type=\"hidden\" name=\"hstartyear\" value=0>";
- echo "<input type=\"hidden\" name=\"hstarthour\" value=0>";
- echo "<input type=\"hidden\" name=\"hstartminute\" value=0>";
- echo "<input type=\"hidden\" name=\"hfinishday\" value=0>";
- echo "<input type=\"hidden\" name=\"hfinishmonth\" value=0>";
- echo "<input type=\"hidden\" name=\"hfinishyear\" value=0>";
- echo "<input type=\"hidden\" name=\"hfinishhour\" value=0>";
- echo "<input type=\"hidden\" name=\"hfinishminute\" value=0>";
+ echo "<input type=\"hidden\" name=\"hratingtime\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hassessed\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hassesspublic\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hscale\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hstartday\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hstartmonth\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hstartyear\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hstarthour\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hstartminute\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hfinishday\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hfinishmonth\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hfinishyear\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hfinishhour\" value=\"0\">";
+ echo "<input type=\"hidden\" name=\"hfinishminute\" value=\"0\">";
echo "<script>";
echo "lockoptions('form','userating', subitemsall);";
</tr>
</table>
<center>
-<input type="hidden" name=course value="<?php p($form->course) ?>">
-<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>">
-<input type="hidden" name=section value="<?php p($form->section) ?>">
-<input type="hidden" name=module value="<?php p($form->module) ?>">
-<input type="hidden" name=modulename value="<?php p($form->modulename) ?>">
-<input type="hidden" name=instance value="<?php p($form->instance) ?>">
-<input type="hidden" name=mode value="<?php p($form->mode) ?>">
+<input type="hidden" name="course" value="<?php p($form->course) ?>">
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>">
+<input type="hidden" name="section" value="<?php p($form->section) ?>">
+<input type="hidden" name="module" value="<?php p($form->module) ?>">
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>">
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>">
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>">
<input type="submit" value="<?php print_string("savechanges") ?>">
-<input type="submit" name=cancel value="<?php print_string("cancel") ?>">
+<input type="submit" name="cancel" value="<?php print_string("cancel") ?>">
</center>
</form>
<form name="theform" method="post" action="post.php" enctype="multipart/form-data">
<table border="0" cellpadding="5">
<tr valign="top">
- <td align=right><p><b><?php print_string("subject", "forum"); ?>:</b></p></td>
+ <td align="right"><p><b><?php print_string("subject", "forum"); ?>:</b></p></td>
<td>
- <input type="text" name="subject" size=60 value="<?php p($post->subject) ?>">
+ <input type="text" name="subject" size="60" value="<?php p($post->subject) ?>">
</td>
</tr>
<tr valign="top">
- <td align=right><p><b>
+ <td align="right"><p><b>
<?php print_string("message", "forum"); ?>:
</b></p></td>
- <td align=left rowspan=2>
+ <td align="left" rowspan="2">
<?php print_textarea($usehtmleditor, 25, 65, 630, 400, "message", $post->message); ?>
</td>
</tr>
<tr valign="top">
- <td align="right" valign="center" nowrap>
+ <td align="right" valign="center" nowrap="nowrap">
- <font SIZE="1">
+ <font size="1">
<?php
helpbutton("reading", get_string("helpreading"), "moodle", true, true);
echo "<br />";
-<tr valign=top>
- <td align=right><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
<td>
<?php
if ($usehtmleditor) { /// Trying this out for a while
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("subscription", "forum") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("subscription", "forum") ?>:</b></p></td>
<td>
<?php
if (forum_is_forcesubscribed($forum->id)) {
<?php if ($forum->maxbytes != 1) { // 1 = No attachments at all ?>
-<tr valign=top>
- <td align=right><p><b><?php print_string("attachment", "forum") ?>:<br />(<?php print_string("optional") ?>) </b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("attachment", "forum") ?>:<br />(<?php print_string("optional") ?>) </b></p></td>
<td>
<?php $maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes, $forum->maxbytes); ?>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxbytes ?>">
- <input type="file" name="attachment" size=40>
+ <input type="file" name="attachment" size="40">
<?php
helpbutton("attachment", get_string("attachment", "forum"), "forum");
print_string("maxsize", "", display_size($maxbytes));
<tr>
- <td align=center colspan=2>
- <input type="hidden" name=course value="<?php p($post->course) ?>">
- <input type="hidden" name=forum value="<?php p($post->forum) ?>">
- <input type="hidden" name=discussion value="<?php p($post->discussion) ?>">
- <input type="hidden" name=parent value="<?php p($post->parent) ?>">
- <input type="hidden" name=userid value="<?php p($post->userid) ?>">
- <input type="hidden" name=groupid value="<?php p($post->groupid) ?>">
- <input type="hidden" name=edit value="<?php p($post->edit) ?>">
+ <td align="center" colspan="2">
+ <input type="hidden" name="course" value="<?php p($post->course) ?>">
+ <input type="hidden" name="forum" value="<?php p($post->forum) ?>">
+ <input type="hidden" name="discussion" value="<?php p($post->discussion) ?>">
+ <input type="hidden" name="parent" value="<?php p($post->parent) ?>">
+ <input type="hidden" name="userid" value="<?php p($post->userid) ?>">
+ <input type="hidden" name="groupid" value="<?php p($post->groupid) ?>">
+ <input type="hidden" name="edit" value="<?php p($post->edit) ?>">
<input type="submit" value="<?php p(($post->edit) ? get_string('savechanges') : get_string('posttoforum', 'forum')); ?>">
</td>
-<?PHP // $Id$
+<?php // $Id$
// Edit and save a new post to a discussion
"post.php?delete=$delete&confirm=$delete",
$_SERVER["HTTP_REFERER"]);
- echo "<CENTER><HR>";
+ echo "<center><hr />";
forum_print_post($post, $forum->course, $ownpost=false, $reply=false, $link=false);
}
}
if ($post->parent) {
- $navtail = "<A HREF=\"discuss.php?d=$discussion->id\">$toppost->subject</A> -> ".get_string("editing", "forum");
+ $navtail = "<a href=\"discuss.php?d=$discussion->id\">$toppost->subject</a> -> ".get_string("editing", "forum");
} else {
$navtail = "$toppost->subject";
}
$strforums = get_string("modulenameplural", "forum");
- $navmiddle = "<A HREF=\"../forum/index.php?id=$course->id\">$strforums</A> -> <A HREF=\"view.php?f=$forum->id\">$forum->name</A>";
+ $navmiddle = "<a href=\"../forum/index.php?id=$course->id\">$strforums</a> -> <a href=\"view.php?f=$forum->id\">$forum->name</a>";
$cm = get_coursemodule_from_instance("forum", $forum->id, $course->id);
if ($course->category) {
print_header("$course->shortname: $discussion->name: $toppost->subject", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
+ "<a href=../../course/view.php?id=$course->id>$course->shortname</a> ->
$navmiddle -> $navtail", $formstart, "", true, "", navmenu($course, $cm));
} else {
print_header("$course->shortname: $discussion->name: $toppost->subject", "$course->fullname",
forum_print_posts_threaded($parent->id, $course, 0, false, false);
}
echo "<center>";
- echo "<H2>".get_string("yourreply", "forum").":</H2>";
+ echo "<h2>".get_string("yourreply", "forum").":</h2>";
} else {
echo "<center>";
- echo "<H2>".get_string("yournewtopic", "forum")."</H2>";
+ echo "<h2>".get_string("yournewtopic", "forum")."</h2>";
}
if (!empty($post->error)) {
notify($post->error);
<form name="prune" method="get" action="post.php" enctype="multipart/form-data">
<table border="0" cellpadding="5">
<tr valign="top">
- <td align=right><p><b><?php print_string("discussionname", "forum"); ?>:</b></p></td>
+ <td align="right"><p><b><?php print_string("discussionname", "forum"); ?>:</b></p></td>
<td>
- <input type="text" name="name" size=60 value="<?php p($post->subject) ?>">
+ <input type="text" name="name" size="60" value="<?php p($post->subject) ?>">
</td>
</tr>
<tr>
- <td align=center colspan=2>
- <input type="hidden" name=prune value="<?php p($prune) ?>">
- <input type="hidden" name=confirm value="<?php p($prune) ?>">
+ <td align="center" colspan="2">
+ <input type="hidden" name="prune" value="<?php p($prune) ?>">
+ <input type="hidden" name="confirm" value="<?php p($prune) ?>">
<input type="submit" value="<?php print_string('prune', 'forum'); ?>">
</td>
-<?PHP // $Id$
+<?php // $Id$
// Collect ratings, store them, then return to where we came from
-<?PHP // $Id$
+<?php // $Id$
// For a given post, shows a report of all the ratings it has
error("No ratings for this post: \"$post->subject\"");
} else {
- echo "<table border=0 cellpadding=3 cellspacing=3 class=generalbox width=100%>";
+ echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"3\" class=\"generalbox\" width=\"100%\">";
echo "<tr>";
echo "<th> </th>";
- echo "<th><a href=report.php?id=$post->id&sort=u.firstname>$strname</a>";
- echo "<th width=100%><a href=report.php?id=$post->id&sort=r.rating>$strrating</a>";
- echo "<th><a href=report.php?id=$post->id&sort=r.time>$strtime</a>";
+ echo "<th><a href=\"report.php?id=$post->id&sort=u.firstname\">$strname</a>";
+ echo "<th width=\"100%\"><a \"href=report.php?id=$post->id&sort=r.rating\">$strrating</a>";
+ echo "<th><a href=\"report.php?id=$post->id&sort=r.time\">$strtime</a>";
foreach ($ratings as $rating) {
if (isteacher($discussion->course, $rating->id)) {
echo "<tr bgcolor=\"$THEME->cellcontent2\">";
}
echo "<td>";
print_user_picture($rating->id, $forum->course, $rating->picture);
- echo '<td nowrap><p><font size="-1">'.fullname($rating).'</p>';
- echo '<td nowrap align="center"><p><font size="-1">'.$scalemenu[$rating->rating]."</p>";
- echo '<td nowrap align="center"><p><font size="-1">'.userdate($rating->time)."</p>";
+ echo '<td nowrap="nowrap"><p><font size="-1">'.fullname($rating).'</p>';
+ echo '<td nowrap="nowrap" align="center"><p><font size="-1">'.$scalemenu[$rating->rating]."</p>";
+ echo '<td nowrap="nowrap" align="center"><p><font size="-1">'.userdate($rating->time)."</p>";
echo "</tr>\n";
}
echo "</table>";
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//forum mods
-<?PHP // $Id$
+<?php // $Id$
//This file adds support to rss feeds generation
//This function is the main entry point to forum
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
if (!$search) {
print_header_simple("$strsearch", "",
- "<A HREF=\"index.php?id=$course->id\">$strforums</A> -> $strsearch", "search.search",
+ "<a href=\"index.php?id=$course->id\">$strforums</a> -> $strsearch", "search.search",
"", "", " ", navmenu($course));
print_simple_box_start("center");
-<?PHP // $Id$
+<?php // $Id$
// Subscribe to or unsubscribe from a forum.
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
-<?PHP // $Id$
+<?php // $Id$
////////////////////////////////////////////////////////////////////////////////
// Code fragment to define the module version etc.
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
$streveryoneissubscribed = get_string("everyoneissubscribed", "forum");
$strallowchoice = get_string("allowchoice", "forum");
helpbutton("subscription", $streveryoneissubscribed, "forum");
- echo "<font size=1>";
+ echo "<font size=\"1\">";
if (isteacher($course->id)) {
echo "<a title=\"$strallowchoice\" href=\"subscribe.php?id=$forum->id&force=no\">$streveryoneissubscribed</a>";
} else {
$strshowsubscribers = get_string("showsubscribers", "forum");
helpbutton("subscription", $streveryonecanchoose, "forum");
- echo "<font size=1>";
+ echo "<font size=\"1\">";
if (isteacher($course->id)) {
echo "<a title=\"$strforcesubscribe\" href=\"subscribe.php?id=$forum->id&force=yes\">$streveryonecanchoose</a>";
- echo "</font><br /><font size=1>";
+ echo "</font><br /><font size=\"1\">";
echo "<a href=\"subscribers.php?id=$forum->id\">$strshowsubscribers</a>";
} else {
echo $streveryonecanchoose;
$subtext = get_string("subscribe", "forum");
}
echo "<br />";
- echo "<font size=1><a title=\"$subtexttitle\" href=\"subscribe.php?id=$forum->id\">$subtext</a></font>";
+ echo "<font size=\"1\"><a title=\"$subtexttitle\" href=\"subscribe.php?id=$forum->id\">$subtext</a></font>";
}
//If rss are activated at site and forum level and this forum has rss defined, show link
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//glossary mods
-<FORM name="form" method="post" action="comment.php">
+<form name="form" method="post" action="comment.php">
<table class=generalbox cellpadding=5 bgcolor="<?php p($THEME->cellheading)?>">
<tr valign=top>
<td align=right><p><b>
</td>
</tr>
<tr valign="top">
- <td align="right" valign="center" nowrap>
+ <td align="right" valign="center" nowrap="nowrap">
- <font SIZE="1">
+ <font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="reset" value="<?php print_string("revert") ?>" />
- </P>
+ </p>
</td>
</tr>
</table>
$strcomments = get_string("comments", "glossary");
print_header_simple(strip_tags("$glossary->name"), "",
- "<A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> <A HREF=comments.php?id=$cm->id&eid=$entry->id>$strcomments</a> -> " . $straction,
+ "<a href=index.php?id=$course->id>$strglossaries</a> -> <a href=view.php?id=$cm->id>$glossary->name</a> -> <a href=comments.php?id=$cm->id&eid=$entry->id>$strcomments</a> -> " . $straction,
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
$straddcomment = get_string("addcomment", "glossary");
print_header_simple(strip_tags("$strcomments: $entry->concept"), "",
- "<A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> $strcomments",
+ "<a href=index.php?id=$course->id>$strglossaries</a> -> <a href=view.php?id=$cm->id>$glossary->name</a> -> $strcomments",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
<tr valign=top>
<td align=right><p>glossary_studentspost:</td>
<td>
- <SELECT size=1 name=glossary_studentspost>
+ <select size=1 name=glossary_studentspost>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnfstudentcanpost", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_dupentries:</td>
<td>
- <SELECT size=1 name=glossary_dupentries>
+ <select size=1 name=glossary_dupentries>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnfallowdupentries", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_allowcomments:</td>
<td>
- <SELECT size=1 name=glossary_allowcomments>
+ <select size=1 name=glossary_allowcomments>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnfallowcomments", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_linkbydefault:</td>
<td>
- <SELECT size=1 name=glossary_linkbydefault>
+ <select size=1 name=glossary_linkbydefault>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnflinkglossaries", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_defaultapproval:</td>
<td>
- <SELECT size=1 name=glossary_defaultapproval>
+ <select size=1 name=glossary_defaultapproval>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnfapprovalstatus", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_linkentries:</td>
<td>
- <SELECT size=1 name=glossary_linkentries>
+ <select size=1 name=glossary_linkentries>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnflinkentry", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_casesensitive:</td>
<td>
- <SELECT size=1 name=glossary_casesensitive>
+ <select size=1 name=glossary_casesensitive>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnfcasesensitive", "glossary") ?>
<tr valign=top>
<td align=right><p>glossary_fullmatch:</td>
<td>
- <SELECT size=1 name=glossary_fullmatch>
+ <select size=1 name=glossary_fullmatch>
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value=1 <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value=0 <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td>
<?php print_string("cnffullmatch", "glossary") ?>
}
$vicon = "<a title=\"" . $vtitle . "\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible\"><img border=\"0\" src=\"../pix/t/" . $vicon . "\"></a>";
- echo '<td align="center" nowrap>' . $eicon . ' ' . $vicon . '</td>';
+ echo '<td align="center" nowrap="nowrap">' . $eicon . ' ' . $vicon . '</td>';
echo '</tr>';
}
echo '</table>';
-<?PHP // $Id$
+<?php // $Id$
-<?PHP // $Id$\r
-\r
-function glossary_upgrade($oldversion) {\r
-/// This function does anything necessary to upgrade \r
-/// older versions to match current functionality \r
-\r
- global $CFG;\r
-\r
-\r
- return true;\r
-}\r
-\r
-?>\r
-\r
+<?php // $Id$
+
+
+
+function glossary_upgrade($oldversion) {
+
+/// This function does anything necessary to upgrade
+
+/// older versions to match current functionality
+
+
+
+ global $CFG;
+
+
+
+
+
+ return true;
+
+}
+
+
+
+?>
+
+
+
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
$strareyousuredelete = get_string("areyousuredelete","glossary");
print_header_simple("$glossary->name", "",
- "<A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
+ "<a href=\"index.php?id=$course->id\">$strglossaries</a> -> $glossary->name",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
<?php
if (isset($errors)) {
?>
- <tr valign=top>
- <td colspan=2 align=center><strong><font color=red><?php p($errors) ?></font></strong>
+ <tr valign="top">
+ <td colspan="2" align="center"><strong><font color="red"><?php p($errors) ?></font></strong>
</td>
</tr>
<?php
}
?>
-<tr valign=top>
-<td colspan=2>
+<tr valign="top">
+<td colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
- <td width="150" align=right><p><b><?php echo get_string("concept","glossary") ?>:</b></p></td>
- <td><input type="text" name="concept" size=30 value="<?php p($newentry->concept) ?>" /></td>
+ <td width="150" align="right"><p><b><?php echo get_string("concept","glossary") ?>:</b></p></td>
+ <td><input type="text" name="concept" size="30" value="<?php p($newentry->concept) ?>" /></td>
</tr>
<tr>
<td align="right"><p><b><?php echo get_string("categories","glossary") ?>:</b></p></td>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
- <td valign="top" align=right><p><b>
+ <td valign="top" align="right"><p><b>
<?php
echo get_string("aliases","glossary");
echo ':<br />';
<td colspan="2">
<?php
if ( !$glossary->usedynalink ) {
- echo '<input type="hidden" name=usedynalink value="0" />';
- echo '<input type="hidden" name=casesensitive value="0" />';
- echo '<input type="hidden" name=fullmatch value="0" />';
+ echo '<input type="hidden" name="usedynalink" value="0" />';
+ echo '<input type="hidden" name="casesensitive" value="0" />';
+ echo '<input type="hidden" name="fullmatch" value="0" />';
} else {
echo '<script>var items = [\'casesensitive\',\'fullmatch\'];</script>';
} else {
$selected = "";
}
- echo '<input type="checkbox" name="usedynalink" value=1 ' . $selected . ' onclick="return lockoptions(\'form\',\'usedynalink\', items)" /> ';
+ echo '<input type="checkbox" name="usedynalink" value="1" ' . $selected . ' onclick="return lockoptions(\'form\',\'usedynalink\', items)" /> ';
echo '<font size="-1">';
print_string("entryusedynalink","glossary");
echo '</font>';
} else {
$selected = "";
}
- echo '<input type="checkbox" name="casesensitive" value=1 ' . $selected . ' /> ';
+ echo '<input type="checkbox" name="casesensitive" value="1" ' . $selected . ' /> ';
echo '<font size="-1">';
print_string("casesensitive","glossary");
echo '</font>';
} else {
$selected = "";
}
- echo '<input type="checkbox" name="fullmatch" value=1 ' . $selected . ' /> ';
+ echo '<input type="checkbox" name="fullmatch" value="1" ' . $selected . ' /> ';
echo '<font size="-1">';
print_string("fullmatch","glossary");
echo '</font>';
</td>
</tr>
<tr valign="top">
- <td align=right><p><b>
+ <td align="right"><p><b>
<?php print_string("definition", "glossary"); ?>:
</b></p></td>
<td align="left" rowspan="2">
</td>
</tr>
<tr valign="top">
- <td align="right" valign="center" nowrap>
+ <td align="right" valign="center" nowrap="nowrap">
- <font SIZE="1">
+ <font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
<td>
<?php
if ($usehtmleditor) { /// Trying this out for a while
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("attachment", "glossary") ?>:<br />(<?php print_string("optional") ?>) </b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("attachment", "glossary") ?>:<br />(<?php print_string("optional") ?>) </b></p></td>
<td>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_max_upload_file_size($CFG->maxbytes, $course->maxbytes) ?>" />
- <input type="file" name="attachment" size=40 />
+ <input type="file" name="attachment" size="40" />
<?php
helpbutton("attachment", get_string("attachment", "glossary"), "glossary");
print_string("maxsize", "", display_size(get_max_upload_file_size($CFG->maxbytes, $course->maxbytes)));
</td>
</tr>
<tr>
-<td colspan=2>
- <p align=center>
+<td colspan="2">
+ <p align="center">
<?php if (isset($newentry->id)) {
- echo "<input type=\"hidden\" name=e value=\"$newentry->id\" />";
+ echo "<input type=\"hidden\" name="e" value=\"$newentry->id\" />";
}
?>
- <input type="hidden" name=husedynalink value="1" />
- <input type="hidden" name=hcasesensitive value="0" />
- <input type="hidden" name=hfullmatch value="1" />
+ <input type="hidden" name="husedynalink" value="1" />
+ <input type="hidden" name="hcasesensitive" value="0" />
+ <input type="hidden" name="hfullmatch" value="1" />
- <input type="hidden" name=id value="<?php p($cm->id) ?>" />
- <input type="hidden" name=mode value="<?php p($mode) ?>" />
- <input type="hidden" name=hook value="<?php p($hook) ?>" />
- <input type="hidden" name=confirm value="1">
+ <input type="hidden" name="id" value="<?php p($cm->id) ?>" />
+ <input type="hidden" name="mode" value="<?php p($mode) ?>" />
+ <input type="hidden" name="hook" value="<?php p($hook) ?>" />
+ <input type="hidden" name="confirm" value="1">
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="reset" value="<?php print_string("revert") ?>" />
- </P>
+ </p>
</td>
</tr>
</table>
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
}
print_header_simple(strip_tags("$glossary->name"), "",
- "<A HREF=\"index.php?id=$course->id\">$strglossaries</A> ->
- <A HREF=\"view.php?id=$cm->id\">$glossary->name</A> -> $stredit", "form.text",
+ "<a href=\"index.php?id=$course->id\">$strglossaries</a> ->
+ <a href=\"view.php?id=$cm->id\">$glossary->name</a> -> $stredit", "form.text",
"", true, "", navmenu($course, $cm));
print_heading($glossary->name);
}
print_header_simple(strip_tags("$glossary->name"), "",
- "<A HREF=\"index.php?id=$course->id\">$strglossaries</A> ->
- <A HREF=\"view.php?id=$cm->id\">$glossary->name</A> -> $stredit", "",
+ "<a href=\"index.php?id=$course->id\">$strglossaries</a> ->
+ <a href=\"view.php?id=$cm->id\">$glossary->name</a> -> $stredit", "",
"", true, "", navmenu($course, $cm));
$ineditperiod = ((time() - $newentry->timecreated < $CFG->maxeditingtime) || $glossary->editalways);
-<?PHP // $Id$
+<?php // $Id$
global $CFG, $THEME;
require_once("../../config.php");
?>
<center>
-<FORM name="form" method="post" action="editcategories.php">
-<table class=generalbox cellpadding=5 bgcolor="<?php p($THEME->cellheading)?>">
-<tr valign=top>
- <td align=right><p><b><?php echo get_string("name") ?>:</b></p></td>
+<form name="form" method="post" action="editcategories.php">
+<table class="generalbox" cellpadding="5" bgcolor="<?php p($THEME->cellheading)?>">
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("name") ?>:</b></p></td>
<td>
- <INPUT type="text" name="name" size=30 value="<?php p($name) ?>" />
+ <input type="text" name="name" size="30" value="<?php p($name) ?>" />
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php echo get_string("linkcategory","glossary") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("linkcategory","glossary") ?>:</b></p></td>
<td>
<select size="1" name="usedynalink">
<option value="1" <?php
</select> <?php helpbutton("linkcategory", get_string("linkcategory", "glossary"), "glossary") ?>
</td>
</tr>
-<td colspan=2>
- <p align=center>
- <input type="hidden" name=id value="<?php p($cm->id) ?>" />
- <input type="hidden" name=action value="<?php p($action) ?>" />
- <input type="hidden" name=confirm value=1 />
- <input type="hidden" name=mode value='cat' />
- <input type="hidden" name=hook value="<?php p($hook) ?>" />
+<td colspan="2">
+ <p align="center">
+ <input type="hidden" name="id" value="<?php p($cm->id) ?>" />
+ <input type="hidden" name="action" value="<?php p($action) ?>" />
+ <input type="hidden" name="confirm" value="1" />
+ <input type="hidden" name="mode" value='cat' />
+ <input type="hidden" name="hook" value="<?php p($hook) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="reset" value="<?php print_string("back","glossary") ?>" onclick="javascript:history.go(-1);" />
- </P>
+ </p>
</td>
</tr>
</table>
-<?PHP // $Id$
+<?php // $Id$
/// This page allows to edit entries categories for a particular instance of glossary
$strglossary = get_string("modulename", "glossary");
print_header_simple(strip_tags("$glossary->name"), "",
- "<A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW>$glossary->name</a> -> " . get_string("categories","glossary"),
+ "<a href=\"index.php?id=$course->id\">$strglossaries</a> -> <a href=\"view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW\">$glossary->name</a> -> " . get_string("categories","glossary"),
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
?>
<form name="form" method="post" action="editcategories.php">
- <input type="hidden" name=id value="<?php p($cm->id) ?>" />
- <input type="hidden" name=action value="delete" />
- <input type="hidden" name=confirm value="1" />
- <input type="hidden" name=mode value="<?php echo $mode ?>" />
- <input type="hidden" name=hook value="<?php echo $hook ?>" />
- <table border=0 widTH=100><tr><td align=right width="50%" />
+ <input type="hidden" name="id" value="<?php p($cm->id) ?>" />
+ <input type="hidden" name="action" value="delete" />
+ <input type="hidden" name="confirm" value="1" />
+ <input type="hidden" name="mode" value="<?php echo $mode ?>" />
+ <input type="hidden" name="hook" value="<?php echo $hook ?>" />
+ <table border="0" width="100"><tr><td align="right" width="50%" />
<input type="submit" value=" <?php print_string("yes")?> " />
</form>
- </td><td align=left width=50%>
+ </td><td align="left" width="50%">
<?php
unset($options);
<div align="center">
-<FORM name="theform" method="post" action="editcategories.php">
-<table width="40%" class=generalbox cellpadding=5 bgcolor="<?php p($THEME->cellheading)?>">
+<form name="theform" method="post" action="editcategories.php">
+<table width="40%" class="generalbox" cellpadding="5" bgcolor="<?php p($THEME->cellheading)?>">
<tr>
<td width="90%" align="center"><b>
<?php p(get_string("categories","glossary")) ?></b></td>
<td width="10%" align="center"><b>
<?php p(get_string("action")) ?></b></td>
</tr>
- <tr><td width=100% colspan=2 bgcolor="<?php p($THEME->cellheading2)?>">
+ <tr><td width="100%" colspan="2" bgcolor="<?php p($THEME->cellheading2)?>">
- <table width=100%>
+ <table width="100%">
<?php
$categories = get_records("glossary_categories","glossaryid",$glossary->id,"name ASC");
</td>
<td width="10%" align="center"><b>
<?php
- echo "<a href=\"editcategories.php?id=$cm->id&action=delete&mode=cat&hook=$category->id\"><img alt=\"" . get_string("delete") . "\"src=\"../../pix/t/delete.gif\" height=11 width=11 border=0></a> ";
- echo "<a href=\"editcategories.php?id=$cm->id&action=edit&mode=cat&hook=$category->id\"><img alt=\"" . get_string("edit") . "\" src=\"../../pix/t/edit.gif\" height=11 width=11 border=0></a>";
+ echo "<a href=\"editcategories.php?id=$cm->id&action=delete&mode=cat&hook=$category->id\"><img alt=\"" . get_string("delete") . "\"src=\"../../pix/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
+ echo "<a href=\"editcategories.php?id=$cm->id&action=edit&mode=cat&hook=$category->id\"><img alt=\"" . get_string("edit") . "\" src=\"../../pix/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\"></a>";
?>
</b></td>
</tr>
</td>
<tr>
- <td width=100% colspan=2 align=center bgcolor="<?php p($THEME->cellheading2)?>">
+ <td width="100%" colspan="2" align="center" bgcolor="<?php p($THEME->cellheading2)?>">
<?php
$options['id'] = $cm->id;
$options['action'] = "add";
- echo "<table border=0><tr><td align=right>";
+ echo "<table border=\"0\"><tr><td align=\"right\">";
echo print_single_button("editcategories.php", $options, get_string("add") . " " . get_string("category","glossary"), "get");
- echo "</td><td align=left>";
+ echo "</td><td align=\"left\">";
unset($options['action']);
$options['mode'] = 'cat';
$options['hook'] = $hook;
}
print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",
- "$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
+ "$navigation <a href=\"index.php?id=$course->id\">$strglossaries</a> -> $glossary->name",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
} else {
$ffurl = "../../file.php?file=$ffurl";
}
- echo '<p><center><a href="' . $ffurl . '" target=_blank>' . get_string("exportedfile","glossary") . '</a></center><p>'
+ echo '<p><center><a href="' . $ffurl . '" target="_blank">' . get_string("exportedfile","glossary") . '</a></center><p>'
?>
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
$entryexported = get_string("entryexported","glossary");
print_header_simple("$glossary->name", "",
- "<A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
+ "<a href=\"index.php?id=$course->id\">$strglossaries</a> -> $glossary->name",
"", "", true, "",
navmenu($course, $cm));
if ( !$confirm ) {
echo "<center>";
$areyousure = get_string("areyousureexport","glossary");
- notice_yesno ("<center><h2>$entry->concept</h2><p align=center>$areyousure<br /><b>$mainglossary->name</b>?",
+ notice_yesno ("<center><h2>$entry->concept</h2><p align=\"center\">$areyousure<br /><b>$mainglossary->name</b>?",
"exportentry.php?id=$id&mode=$mode&hook=$hook&entry=$entry->id&confirm=1",
"view.php?id=$cm->id&mode=$mode&hook=$hook" );
error("Could not export the entry to the main glossary");
} else {
print_simple_box_start("center", "60%", "$THEME->cellheading");
- echo "<p align=center><font size=3>$entryexported</font></p></font>";
+ echo "<p align=\"center\"><font size=\"3\">$entryexported</font></p></font>";
print_continue("view.php?id=$cm->id&mode=entry&hook=".$entry->id);
print_simple_box_end();
}
} else {
print_simple_box_start("center", "60%", "#FFBBBB");
- echo "<p align=center><font size=3>$entryalreadyexist</font></p></font>";
- echo "<p align=center>";
+ echo "<p align=\"center\"><font size=\"3\">$entryalreadyexist</font></p></font>";
+ echo "<p align=\"center\">";
print_continue("view.php?id=$cm->id&mode=entry&hook=".$entry->id);
-<?PHP // $Id$
+<?php // $Id$
function glossary_filter($courseid, $text) {
global $CFG;
//Now avoid searching inside links
$links = array();
- preg_match_all('/<A[\s](.+?)>(.+?)<\/A>/is',$text,$list_of_links);
+ preg_match_all('/<a[\s](.+?)>(.+?)<\/A>/is',$text,$list_of_links);
foreach (array_unique($list_of_links[0]) as $key=>$value) {
$links['<@'.$key.'@>'] = $value;
}
-<?PHP // $Id$
+<?php // $Id$
/// This file allows to manage the default behave of the display formats
require_once("../../config.php");
print_heading($strmodulename . ': ' . get_string("displayformats","glossary"));
echo '<table width="90%" align="center" bgcolor="#FFFFFF" class="generaltab" style="border-color: #000000; border-style: solid; border-width: 1px;">';
- echo '<tr><td align=center>';
+ echo '<tr><td align="center">';
echo get_string("configwarning");
echo '</td></tr></table>';
echo '<table width="90%" align="center" bgcolor="' . $THEME->cellheading . '" class="generalbox">';
?>
<tr>
- <td colspan=3 align=center><strong>
+ <td colspan="3" align="center"><strong>
<?php echo get_string('displayformat'.$displayformat->name,"glossary"); ?>
</strong></td>
</tr>
- <tr valign=top>
- <td align="right" width="20%"><?PHP print_string('popupformat','glossary'); ?></td>
+ <tr valign="top">
+ <td align="right" width="20%"><?php print_string('popupformat','glossary'); ?></td>
<td>
- <?PHP
+ <?php
//get and update available formats
$recformats = glossary_get_available_formats();
<?php print_string("cnfrelatedview", "glossary") ?><br /><br />
</td>
</tr>
- <tr valign=top>
- <td align="right" width="20%"><?PHP print_string('defaultmode','glossary'); ?></td>
+ <tr valign="top">
+ <td align="right" width="20%"><?php print_string('defaultmode','glossary'); ?></td>
<td>
- <SELECT size=1 name=defaultmode>
+ <select size="1" name="defaultmode">
<?php
$sletter = '';
$scat = '';
break;
}
?>
- <OPTION value="letter" <?PHP p($sletter)?>>letter</OPTION>
- <OPTION value="cat" <?PHP p($scat)?>>cat</OPTION>
- <OPTION value="date" <?PHP p($sdate)?>>date</OPTION>
- <OPTION value="author" <?PHP p($sauthor)?>>author</OPTION>
- </SELECT>
+ <option value="letter" <?php p($sletter)?>>letter</option>
+ <option value="cat" <?php p($scat)?>>cat</option>
+ <option value="date" <?php p($sdate)?>>date</option>
+ <option value="author" <?php p($sauthor)?>>author</option>
+ </select>
</td>
<td width="60%">
<?php print_string("cnfdefaultmode", "glossary") ?><br /><br />
</td>
</tr>
- <tr valign=top>
- <td align="right" width="20%"><?PHP print_string('defaulthook','glossary'); ?></td>
+ <tr valign="top">
+ <td align="right" width="20%"><?php print_string('defaulthook','glossary'); ?></td>
<td>
- <SELECT size=1 name=defaulthook>
+ <select size="1" name="defaulthook">
<?php
$sall = '';
$sspecial = '';
break;
}
?>
- <OPTION value="ALL" <?PHP p($sall)?>><?PHP p(get_string("allentries","glossary"))?></OPTION>
- <OPTION value="SPECIAL" <?PHP p($sspecial)?>><?PHP p(get_string("special","glossary"))?></OPTION>
- <OPTION value="0" <?PHP p($sallcategories)?>><?PHP p(get_string("allcategories","glossary"))?></OPTION>
- <OPTION value="-1" <?PHP p($snocategorised)?>><?PHP p(get_string("notcategorised","glossary"))?></OPTION>
- </SELECT>
+ <option value="ALL" <?php p($sall)?>><?php p(get_string("allentries","glossary"))?></option>
+ <option value="SPECIAL" <?php p($sspecial)?>><?php p(get_string("special","glossary"))?></option>
+ <option value="0" <?php p($sallcategories)?>><?php p(get_string("allcategories","glossary"))?></option>
+ <option value="-1" <?php p($snocategorised)?>><?php p(get_string("notcategorised","glossary"))?></option>
+ </select>
</td>
<td width="60%">
<?php print_string("cnfdefaulthook", "glossary") ?><br /><br />
</td>
</tr>
- <tr valign=top>
- <td align="right" width="20%"><?PHP print_string('defaultsortkey','glossary'); ?></td>
+ <tr valign="top">
+ <td align="right" width="20%"><?php print_string('defaultsortkey','glossary'); ?></td>
<td>
- <SELECT size=1 name=sortkey>
+ <select size="1" name="sortkey">
<?php
$sfname = '';
$slname = '';
break;
}
?>
- <OPTION value="CREATION" <?PHP p($screation)?>><?PHP p(get_string("sortbycreation","glossary"))?></OPTION>
- <OPTION value="UPDATE" <?PHP p($supdate)?>><?PHP p(get_string("sortbylastupdate","glossary"))?></OPTION>
- <OPTION value="FIRSTNAME" <?PHP p($sfname)?>><?PHP p(get_string("firstname"))?></OPTION>
- <OPTION value="LASTNAME" <?PHP p($slname)?>><?PHP p(get_string("lastname"))?></OPTION>
- </SELECT>
+ <option value="CREATION" <?php p($screation)?>><?php p(get_string("sortbycreation","glossary"))?></option>
+ <option value="UPDATE" <?php p($supdate)?>><?php p(get_string("sortbylastupdate","glossary"))?></option>
+ <option value="FIRSTNAME" <?php p($sfname)?>><?php p(get_string("firstname"))?></option>
+ <option value="LASTNAME" <?php p($slname)?>><?php p(get_string("lastname"))?></option>
+ </select>
</td>
<td width="60%">
<?php print_string("cnfsortkey", "glossary") ?><br /><br />
</td>
</tr>
- <tr valign=top>
- <td align="right" width="20%"><?PHP print_string('defaultsortorder','glossary'); ?></td>
+ <tr valign="top">
+ <td align="right" width="20%"><?php print_string('defaultsortorder','glossary'); ?></td>
<td>
- <SELECT size=1 name=sortorder>
+ <select size="1" name="sortorder">
<?php
$sasc = '';
$sdesc = '';
break;
}
?>
- <OPTION value="asc" <?PHP p($sasc)?>><?PHP p(get_string("ascending","glossary"))?></OPTION>
- <OPTION value="desc" <?PHP p($sdesc)?>><?PHP p(get_string("descending","glossary"))?></OPTION>
- </SELECT>
+ <option value="asc" <?php p($sasc)?>><?php p(get_string("ascending","glossary"))?></option>
+ <option value="desc" <?php p($sdesc)?>><?php p(get_string("descending","glossary"))?></option>
+ </select>
</td>
<td width="60%">
<?php print_string("cnfsortorder", "glossary") ?><br /><br />
</td>
</tr>
- <tr valign=top>
+ <tr valign="top">
<td align="right" width="20%"><p>Include Group Breaks:</td>
<td>
- <SELECT size=1 name=showgroup>
+ <select size="1" name="showgroup">
<?php
$yselected = "";
$nselected = "";
$nselected = " SELECTED ";
}
?>
- <OPTION value=1 <?php p($yselected) ?>><?php p($yes)?></OPTION>
- <OPTION value=0 <?php p($nselected) ?>><?php p($no)?></OPTION>
- </SELECT>
+ <option value="1" <?php p($yselected) ?>><?php p($yes)?></option>
+ <option value="0" <?php p($nselected) ?>><?php p($no)?></option>
+ </select>
</td>
<td width="60%">
<?php print_string("cnfshowgroup", "glossary") ?><br /><br />
</td>
</tr>
<tr>
- <td colspan=3 align=center>
+ <td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
- <input type="hidden" name=id value="<?php p($id) ?>" />
- <input type="hidden" name=mode value="edit" />
- <?PHP
+ <input type="hidden" name="id" value="<?php p($id) ?>" />
+ <input type="hidden" name="mode" value="edit" />
+ <?php
print_simple_box_end();
echo '</form>';
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
$colour = $THEME->cellheading2;
- echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=0 align=center>\n";
+ echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"0\" align=\"center\">\n";
echo "<tr>\n";
echo "<td width=\"100%\" valign=\"top\"\n";
glossary_print_entry_approval($cm, $entry, $mode);
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
$colour = $THEME->cellheading2;
- echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>\n";
+ echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">\n";
echo "<tr>\n";
echo "<td width=\"100%\" valign=\"top\" bgcolor=\"#FFFFFF\">\n";
glossary_print_entry_approval($cm, $entry, $mode);
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
global $THEME, $CFG, $USER;
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
- echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
echo "\n<tr>";
- echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
+ echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostpicture\">";
$return = false;
if ($entry) {
print_user_picture($user->id, $course->id, $user->picture);
echo "</td>";
- echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
+ echo "<td valign=\"top\" width=\"100%\" bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
echo "<b>";
glossary_print_entry_concept($entry);
echo "</b><br />";
echo "<font size=\"2\">$strby " . fullname($user, isteacher($course->id)) . "</font>";
- echo " <font size=1>(".get_string("lastedited").": ".
+ echo " <font size=\"1\">(".get_string("lastedited").": ".
userdate($entry->timemodified).")</font>";
echo "</td>";
- echo "\n<td bgcolor=\"$THEME->cellheading\" width=35 valign=top class=\"forumpostheader\">";
+ echo "\n<td bgcolor=\"$THEME->cellheading\" width=\"35\" valign=\"top\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
echo "</td>";
echo "</tr>";
echo "\n<tr>";
- echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostside\"> </td>";
- echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+ echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostside\"> </td>";
+ echo "\n<td width=\"100%\" colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
if ($entry->attachment) {
$entry->course = $course->id;
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
global $THEME, $USER;
$colour = "#FFFFFF";
$return = false;
- echo "\n<table border=0 cellspacing=0 width=95% valign=top cellpadding=10>";
+ echo "\n<table border=\"0\" cellspacing=\"0\" width=\"95%\" valign=\"top\" cellpadding=\"10\">";
echo "\n<tr>";
- echo "<td width=100% bgcolor=\"$colour\">";
+ echo "<td width=\"100%\" bgcolor=\"$colour\">";
if ($entry) {
echo "<b><a href=\"showentry.php?courseid=$course->id\&eid=$entry->id\&displayformat=dictionary\" target=\"_blank\" onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$course->id\&eid=$entry->id\&displayformat=dictionary', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
global $THEME, $USER;
if ( $entry ) {
$colour = $THEME->cellheading2;
- echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
echo '<tr>';
- echo "<td valign=\"top\" width=100% bgcolor=\"$colour\">";
+ echo "<td valign=\"top\" width=\"100%\" bgcolor=\"$colour\">";
$entry->course = $course->id;
echo '<b>' . get_string("question","glossary") . ':</b> ';
glossary_print_entry_concept($entry);
echo '<br />';
- echo "<font size=1>(".get_string("lastedited").": ".
+ echo "<font size=\"1\">(".get_string("lastedited").": ".
userdate($entry->timemodified).")</font>";
echo "</td>";
- echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostheader\">";
+ echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
echo "</tr>";
echo "\n<tr>";
- echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+ echo "\n<td width=\"100%\" colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
echo '<b>' . get_string("answer","glossary") . ':</b> ';
glossary_print_entry_definition($entry);
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
global $THEME, $CFG, $USER;
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
- echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
echo "\n<tr>";
- echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
+ echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostpicture\">";
$return = false;
if ($entry) {
print_user_picture($user->id, $course->id, $user->picture);
echo "</td>";
- echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
+ echo "<td valign=\"top\" width=\"100%\" bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
echo "<b>";
glossary_print_entry_concept($entry);
echo "</b><br />";
echo "<font size=\"2\">$strby " . fullname($user, isteacher($course->id)) . "</font>";
- echo " <font size=1>(".get_string("lastedited").": ".
+ echo " <font size=\"1\">(".get_string("lastedited").": ".
userdate($entry->timemodified).")</font>";
echo "</td>";
- echo "\n<td bgcolor=\"$THEME->cellheading\" width=35 valign=top class=\"forumpostheader\">";
+ echo "\n<td bgcolor=\"$THEME->cellheading\" width=\"35\" valign=\"top\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
echo "</tr>";
echo "\n<tr>";
- echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostside\"> </td>";
- echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+ echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostside\"> </td>";
+ echo "\n<td width=\"100%\" colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
glossary_print_entry_definition($entry);
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings);
-<?PHP // $Id$
+<?php // $Id$
function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
global $THEME, $CFG, $USER;
$colour = $THEME->cellheading2;
- echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
echo "\n<tr>";
$return = false;
if ($entry) {
- echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
+ echo "<td valign=\"top\" width=\"100%\" bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
echo "<b>";
glossary_print_entry_concept($entry);
echo "</b><br />";
- echo "<font size=1>(".get_string("lastedited").": ".
+ echo "<font size=\"1\">(".get_string("lastedited").": ".
userdate($entry->timemodified).")</font>";
echo "</td>";
- echo "\n<td bgcolor=\"$THEME->cellheading\" width=35 valign=top class=\"forumpostheader\">";
+ echo "\n<td bgcolor=\"$THEME->cellheading\" width=\"35\" valign=\"top\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
echo "</tr>";
echo "\n<tr>";
- echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+ echo "\n<td width=\"100%\" colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
glossary_print_entry_definition($entry);
$return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings);
<form method="POST" action="import.php" name="form" enctype="multipart/form-data">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
- <td align=right valign=top width="30%"><p><b><?php print_string("filetoimport","glossary") ?>:</b></p></td>
+ <td align="right" valign="top" width="30%"><p><b><?php print_string("filetoimport","glossary") ?>:</b></p></td>
<td width="70%">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_max_upload_file_size() ?>" />
- <input type="file" name="file" size=40> <br />
+ <input type="file" name="file" size="40"> <br />
<?php
helpbutton("filetoimport", get_string("filetoimport", "glossary"), "glossary");
print_string("maxsize", "", display_size(get_max_upload_file_size()));
?>
</td>
</tr>
-<tr valign=top>
- <td align=right colspan="2">
+<tr valign="top">
+ <td align="right" colspan="2">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
<td width="25%">
- <p align="right"><?PHP p(get_string("destination","glossary")) ?>:</td>
+ <p align="right"><?php p(get_string("destination","glossary")) ?>:</td>
<td width="25%"><select size="1" name="dest">
- <option selected value="current"><?PHP p(get_string("currentglossary","glossary")) ?></option>
- <option value="new"><?PHP p(get_string("newglossary","glossary")) ?></option>
- </select> <?PHP helpbutton("destination", get_string("destination", "glossary"), "glossary") ?></td>
+ <option selected value="current"><?php p(get_string("currentglossary","glossary")) ?></option>
+ <option value="new"><?php p(get_string("newglossary","glossary")) ?></option>
+ </select> <?php helpbutton("destination", get_string("destination", "glossary"), "glossary") ?></td>
<td width="25%">
- <p align="right"><?PHP p(get_string("importcategories","glossary")) ?>:</td>
- <td width="25%"><input type="checkbox" name="catsincl" value="1" /> <?PHP helpbutton("importcategories", get_string("importcategories", "glossary"), "glossary") ?></td>
+ <p align="right"><?php p(get_string("importcategories","glossary")) ?>:</td>
+ <td width="25%"><input type="checkbox" name="catsincl" value="1" /> <?php helpbutton("importcategories", get_string("importcategories", "glossary"), "glossary") ?></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td align=right colspan="2">
+ <td align="right" colspan="2">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
<td width="50%">
</td>
</tr>
</table>
-<input type="hidden" name="id" value="<?PHP p($id) ?>" />
-<input type="hidden" name="l" value="<?PHP p($l) ?>" />
-<input type="hidden" name="lasttab" value="<?PHP p($lasttab) ?>" />
+<input type="hidden" name="id" value="<?php p($id) ?>" />
+<input type="hidden" name="l" value="<?php p($l) ?>" />
+<input type="hidden" name="lasttab" value="<?php p($lasttab) ?>" />
<input type="hidden" name="step" value="1" />
</form>
$strsearch = get_string("search");
print_header_simple(strip_tags("$glossary->name"), "",
- "<A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
+ "<a href=\"index.php?id=$course->id\">$strglossaries</a> -> $glossary->name",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
}
}
// processed entries
- echo '<table border=0 width=100%>';
+ echo '<table border="0" width="100%">';
echo '<tr>';
- echo '<td width=50% align=right>';
+ echo '<td width="50%" align="right">';
echo get_string("totalentries","glossary");
echo ':</td>';
- echo '<td width=50%>';
+ echo '<td width="50%">';
echo $importedentries + $entriesrejected;
echo '</td>';
echo '</tr>';
echo '<tr>';
- echo '<td width=50% align=right>';
+ echo '<td width="50%" align="right">';
echo get_string("importedentries","glossary");
echo ':</td>';
- echo '<td width=50%>';
+ echo '<td width="50%">';
echo $importedentries;
if ( $entriesrejected ) {
echo ' <small>(' . get_string("rejectedentries","glossary") . ": $entriesrejected)</small>";
echo '</tr>';
if ( $catsincl ) {
echo '<tr>';
- echo '<td width=50% align=right>';
+ echo '<td width="50%" align="right">';
echo get_string("importedcategories","glossary");
echo ':</td>';
- echo '<td width=50%>';
+ echo '<td width="50%">';
echo $importedcats;
echo '</td>';
echo '</tr>';
}
- echo '</table><hr width=75%>';
+ echo '</table><hr width="75%">';
// rejected entries
if ($rejections) {
- echo '<center><table border=0 width=70%>';
- echo '<tr><td align=center colspan=2 width=100%><strong>' . get_string("rejectionrpt","glossary") . '</strong></tr>';
+ echo '<center><table border="0" width="70%">';
+ echo '<tr><td align="center" colspan="2" width="100%"><strong>' . get_string("rejectionrpt","glossary") . '</strong></tr>';
echo $rejections;
- echo '</table></center><p><hr width=75%>';
+ echo '</table></center><p><hr width="75%">';
}
} else {
notify("Error while trying to read the file.");
-<?PHP // $Id$
+<?php // $Id$
/// This page lists all the instances of glossary in a particular course
/// Replace glossary with the name of your module
foreach ($glossarys as $glossary) {
if (!$glossary->visible) {
//Show dimmed if the mod is hidden
- $link = "<A class=\"dimmed\" HREF=\"view.php?id=$glossary->coursemodule\">$glossary->name</A>";
+ $link = "<a class=\"dimmed\" href=\"view.php?id=$glossary->coursemodule\">$glossary->name</a>";
} else {
//Show normal if the mod is visible
- $link = "<A HREF=\"view.php?id=$glossary->coursemodule\">$glossary->name</A>";
+ $link = "<a href=\"view.php?id=$glossary->coursemodule\">$glossary->name</a>";
}
$printsection = "";
if ($glossary->section !== $currentsection) {
-<?PHP // $Id$
+<?php // $Id$
/// Library of functions and constants for module glossary
/// (replace glossary with the name of your module and delete this line)
$user = get_record("user","id",$entry->userid);
$fullname = fullname($user, $isteacher);
- echo "<p><font size=1>$date - $fullname<br />";
+ echo "<p><font size=\"1\">$date - $fullname<br />";
echo "\"<a href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid&mode=entry&hook=$entry->id\">";
echo "$entry->concept";
echo "</a>\"</font></p>";
function glossary_debug($debug,$text,$br=1) {
if ( $debug ) {
- echo '<font color=red>' . $text . '</font>';
+ echo '<font color="red">' . $text . '</font>';
if ( $br ) {
echo '<br />';
}
}
if ($return != '') {
$return .= '</select>';
-// $return = "<table border=0 align=$align><tr><td>$return</td></tr></table>";
+// $return = "<table border=\"0\" align=$align><tr><td>$return</td></tr></table>";
}
}
if ($type == 'print') {
$isteacher = isteacher($course->id);
$ismainglossary = $glossary->mainglossary;
- $return = "<font size=1>";
+ $return = "<font size=\"1\">";
if (!$entry->approved) {
$return .= get_string("entryishidden","glossary");
}
if ( ($glossary->allowcomments && !isguest()) || isteacher($glossary->course)) {
- $return .= " <a title=\"" . get_string("addcomment","glossary") . "\" href=\"comment.php?id=$cm->id&eid=$entry->id\"><img src=\"comment.gif\" height=11 width=11 border=0></a> ";
+ $return .= " <a title=\"" . get_string("addcomment","glossary") . "\" href=\"comment.php?id=$cm->id&eid=$entry->id\"><img src=\"comment.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
if ($isteacher or ($glossary->studentcanpost and $entry->userid == $USER->id)) {
$mainglossary = get_record("glossary","mainglossary",1,"course",$course->id);
if ( $mainglossary ) { // if there is a main glossary defined, allow to export the current entry
- $return .= " <a title=\"" . get_string("exporttomainglossary","glossary") . "\" href=\"exportentry.php?id=$cm->id&entry=$entry->id&mode=$mode&hook=$hook\"><img src=\"export.gif\" height=11 width=11 border=0></a> ";
+ $return .= " <a title=\"" . get_string("exporttomainglossary","glossary") . "\" href=\"exportentry.php?id=$cm->id&entry=$entry->id&mode=$mode&hook=$hook\"><img src=\"export.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
}
if ( !$importedentry and ($isteacher or ($entry->userid == $USER->id and $ineditperiod))) {
$return .= " <a title=\"" . get_string("delete") . "\" href=\"deleteentry.php?id=$cm->id&mode=delete&entry=$entry->id&prevmode=$mode&hook=$hook\"><img src=\"";
$return .= $icon;
- $return .= "\" height=11 width=11 border=0></a> ";
+ $return .= "\" height=\"11\" width=\"11\" border=\"0\"></a> ";
- $return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?id=$cm->id&e=$entry->id&mode=$mode&hook=$hook\"><img src=\"$CFG->pixpath/t/edit.gif\" height=11 width=11 border=0></a>";
+ $return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?id=$cm->id&e=$entry->id&mode=$mode&hook=$hook\"><img src=\"$CFG->pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\"></a>";
} elseif ( $importedentry ) {
- $return .= " <font size=-1>" . get_string("exportedentry","glossary") . "</font>";
+ $return .= " <font size=\"-1\">" . get_string("exportedentry","glossary") . "</font>";
}
}
$return .= " "; // just to make up a little the output in Mozilla ;)
$count = count_records("glossary_comments","entryid",$entry->id);
if ($count) {
- $return = "<font size=1>";
+ $return = "<font size=\"1\">";
$return .= "<a href=\"comments.php?id=$cm->id&eid=$entry->id\">$count ";
if ($count == 1) {
$return .= get_string("comment", "glossary");
if ($aliases || $printicons || $ratings) {
echo '<table border="0" width="100%" align="center">';
if ( $aliases ) {
- echo '<tr><td align="center" valign="top"><font size=1>' .
+ echo '<tr><td align="center" valign="top"><font size="1">' .
get_string("aliases","glossary") . ': ' . $aliases . '</td></tr>';
}
if ($icons) {
- echo '<tr><td align=right valign=top>'. $icons . '</td></tr>';
+ echo '<tr><td align="right" valign="top">'. $icons . '</td></tr>';
}
if ($ratings) {
- echo '<tr><td align=right valign=top>';
+ echo '<tr><td align="right" valign="top">';
$return = glossary_print_entry_ratings($course, $entry, $ratings);
echo '</td></tr>';
}
$glossary = get_record("glossary","id",$entry->glossaryid);
$entry->course = $glossary->course; //used inside print_attachment
if ($insidetable) {
- echo "<table border=\"0\" width=\"100%\" align=\"$align\"><tr><td align=\"$align\" nowrap>\n";
+ echo "<table border=\"0\" width=\"100%\" align=\"$align\"><tr><td align=\"$align\" nowrap=\"nowrap\">\n";
}
echo glossary_print_attachments($entry,$format,$align);
if ($insidetable) {
if ($insidetable) {
echo "<table border=\"0\" width=\"100%\" align=\"$align\"><tr><td align=\"$align\">\n";
}
- echo "<a title=\"" . get_string("approve","glossary"). "\" href=\"approve.php?id=$cm->id&eid=$entry->id&mode=$mode\"><img align=\"$align\" src=\"check.gif\" border=0 width=\"34\" height=\"34\"></a>\n";
+ echo "<a title=\"" . get_string("approve","glossary"). "\" href=\"approve.php?id=$cm->id&eid=$entry->id&mode=$mode\"><img align=\"$align\" src=\"check.gif\" border=\"0\" width=\"34\" height=\"34\"></a>\n";
if ($insidetable) {
echo "</td></tr></table>\n";
}
} else {
$ffurl = "file.php?file=/$filearea/$file";
}
- $image = "<img border=0 src=\"$CFG->pixpath/f/$icon\" height=16 width=16 alt=\"$strpopupwindow\">";
+ $image = "<img border=\"0\" src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" alt=\"$strpopupwindow\">";
if ($return == "html") {
- $output .= "<a target=_image href=\"$CFG->wwwroot/$ffurl\">$image</a> ";
- $output .= "<a target=_image href=\"$CFG->wwwroot/$ffurl\">$file</a><br />";
+ $output .= "<a target=\"_image\" href=\"$CFG->wwwroot/$ffurl\">$image</a> ";
+ $output .= "<a target=\"_image\" href=\"$CFG->wwwroot/$ffurl\">$file</a><br />";
} else if ($return == "text") {
$output .= "$strattachment $file:\n$CFG->wwwroot/$ffurl\n";
$imagereturn .= "<img src=\"$CFG->wwwroot/$ffurl\" align=$align>";
} else {
link_to_popup_window("/$ffurl", "attachment", $image, 500, 500, $strattachment);
- echo "<a target=_image href=\"$CFG->wwwroot/$ffurl\">$file</a>";
+ echo "<a target=\"_image\" href=\"$CFG->wwwroot/$ffurl\">$file</a>";
echo "<br />";
}
}
function glossary_print_categories_menu($cm, $glossary, $hook, $category) {
global $CFG, $THEME;
- echo '<table border=0 width=100%>';
+ echo '<table border="0" width="100%">';
echo '<tr>';
- echo '<td align=center width=20%>';
+ echo '<td align="center" width="20%">';
if ( isteacher($glossary->course) ) {
$options['id'] = $cm->id;
$options['mode'] = 'cat';
}
echo '</td>';
- echo '<td align=center width=60%>';
+ echo '<td align="center" width="60%">';
echo '<b>';
$menu[GLOSSARY_SHOW_ALL_CATEGORIES] = get_string("allcategories","glossary");
}
}
echo '</b></td>';
- echo '<td align=center width=20%>';
+ echo '<td align="center" width="20%">';
echo popup_form("$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&mode=cat&hook=", $menu, "catmenu", $selected, "",
"", "", false);
$neworder = '&sortorder=asc';
$newordertitle = $asc;
}
- $icon = " <img src=\"$sortorder.gif\" border=0 width=16 height=16>";
+ $icon = " <img src=\"$sortorder.gif\" border=\"0\" width=\"16\" height=\"16\">";
} else {
if ( $sortkey != 'CREATION' and $sortkey != 'UPDATE' and
$sortkey != 'FIRSTNAME' and $sortkey != 'LASTNAME' ) {
} else {
$newordertitle = $desc;
$neworder = '&sortorder=desc';
- $icon = ' <img src="asc.gif" border=0 width=16 height=16>';
+ $icon = ' <img src="asc.gif" border="0" width="16" height="16">';
}
}
$ficon = '';
echo "</td>";
echo "<td bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\" width=\"100%\">";
echo "<p>";
- echo "<font size=2><a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a></font><br />";
- echo "<font size=1>".get_string("lastedited").": ".userdate($comment->timemodified)."</font>";
+ echo "<font size=\"2\"><a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a></font><br />";
+ echo "<font size=\"1\">".get_string("lastedited").": ".userdate($comment->timemodified)."</font>";
echo "</p></td></tr>";
echo "<tr><td bgcolor=\"$THEME->cellcontent2\" class=\"forumpostside\" width=\"10\">";
echo format_text($comment->comment, $comment->format);
- echo "<div align=right><p align=right>";
+ echo "<div align=\"right\"><p align=\"right\">";
$ineditperiod = ((time() - $comment->timemodified < $CFG->maxeditingtime) || $glossary->editalways);
if ( ($glossary->allowcomments && $ineditperiod && $USER->id == $comment->userid) || isteacher($course->id) ) {
echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id&cid=$comment->id&action=edit\"><img
- alt=\"" . get_string("edit") . "\" src=\"$CFG->pixpath/t/edit.gif\" height=11 width=11 border=0></a> ";
+ alt=\"" . get_string("edit") . "\" src=\"$CFG->pixpath/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\"></a> ";
}
if ( ($glossary->allowcomments && $USER->id == $comment->userid) || isteacher($course->id) ) {
echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id&cid=$comment->id&action=delete\"><img
- alt=\"" . get_string("delete") . "\" src=\"$CFG->pixpath/t/delete.gif\" height=11 width=11 border=0></a>";
+ alt=\"" . get_string("delete") . "\" src=\"$CFG->pixpath/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\"></a>";
}
echo "</p>";
$colour = $THEME->cellheading2;
- echo "\n<center><table width=95% border=0><tr>";
- echo "<td width=100%\">";
+ echo "\n<center><table width=\"95%\" border=\"0\"><tr>";
+ echo "<td width=\"100%\"\">";
if ( $entries ) {
foreach ( $entries as $entry ) {
if (! $glossary = get_record("glossary", "id", $entry->glossaryid)) {
$strratings = get_string("ratings", "glossary");
}
- echo "<font size=-1>$strratings: ";
+ echo "<font size=\"-1\">$strratings: ";
link_to_popup_window ("/mod/glossary/report.php?id=$entryid", "ratings", $mean, 400, 600);
echo "</font>";
}
-<?PHP // $Id$
+<?php // $Id$
include_once($CFG->dirroot.'/mod/glossary/lib.php');
$form->assesstimefinish = 0;
}
?>
-<FORM name="form" method="post" action="<?php p($ME) ?>">
-<CENTER>
-<TABLE cellpadding=5>
-<TR valign=top>
- <TD align=right><P><B><?php print_string("name") ?>:</B></P></TD>
- <TD>
- <INPUT type="text" name="name" size=30 value="<?php p($form->name) ?>" />
- </TD>
-</TR>
-<tr valign=top>
- <td align=right><p><b><?php print_string("description") ?>:</b></p>
+<form name="form" method="post" action="<?php p($ME) ?>">
+<center>
+<table cellpadding="5">
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("name") ?>:</b></p></td>
+ <td>
+ <input type="text" name="name" size="30" value="<?php p($form->name) ?>" />
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("description") ?>:</b></p>
<font size="1">
<?php
helpbutton("description", get_string("description"), "glossary", true, true);
<?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
</td>
</tr>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("entbypage", "glossary") ?>:</B></P></TD>
- <TD>
- <input name=entbypage type=text size=2 value="<?php p($form->entbypage) ?>" /> <?php helpbutton("entbypage", get_string("entbypage", "glossary"), "glossary") ?>
- </TD>
-</TR>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("entbypage", "glossary") ?>:</b></p></td>
+ <td>
+ <input name="entbypage" type="text" size="2" value="<?php p($form->entbypage) ?>" /> <?php helpbutton("entbypage", get_string("entbypage", "glossary"), "glossary") ?>
+ </td>
+</tr>
<!-- More rows go in here... -->
<?php
if (isadmin() ) {
?>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("isglobal", "glossary") ?>:</B></P></TD>
- <TD>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("isglobal", "glossary") ?>:</b></p></td>
+ <td>
<?php
$selected = "";
if ( isset($form->globalglossary) ) {
}
}
?>
- <input type="checkbox" name="globalglossary" value=1 selected="<?PHP p($selected)?>" /> <?php helpbutton("globalglossary", get_string("globalglossary", "glossary"), "glossary") ?>
- </TD>
-</TR>
+ <input type="checkbox" name="globalglossary" value="1" selected="<?php p($selected)?>" /> <?php helpbutton("globalglossary", get_string("globalglossary", "glossary"), "glossary") ?>
+ </td>
+</tr>
<?php
} else {
- echo '<INPUT type="hidden" name=globalglossary value="' . $form->globalglossary . '" />';
+ echo '<input type="hidden" name="globalglossary" value="' . $form->globalglossary . '" />';
}
?>
<?php
$mainglossary = get_record("glossary","mainglossary",1,"course",$form->course);
if (!$mainglossary or $mainglossary->id == $form->instance ) {
?>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("glossarytype", "glossary") ?>:</B></P></TD>
- <TD>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("glossarytype", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="mainglossary">
<option value="1" <?php
if ( $form->mainglossary ) {
?>><?php echo get_string("secondaryglossary", "glossary") ?>
</option>
</select> <?php helpbutton("mainglossary", get_string("mainglossary", "glossary"), "glossary") ?>
- </TD>
-</TR>
+ </td>
+</tr>
<?php
} else {
- echo "<INPUT type=\"hidden\" name=mainglossary value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"mainglossary\" value=\"0\" />";
}
?>
-<TR valign=top>
- <TD align=right><P><B><?php p(get_string("studentcanpost", "glossary")) ?>:</B><br />
- <font size=1><?php p(get_string("warningstudentcapost","glossary")) ?></font></P></TD>
- <TD>
+<tr valign="top">
+ <td align="right"><p><b><?php p(get_string("studentcanpost", "glossary")) ?>:</b><br />
+ <font size="1"><?php p(get_string("warningstudentcapost","glossary")) ?></font></p></td>
+ <td>
<select size="1" name="studentcanpost">
<option value="1" <?php
if ( $form->studentcanpost ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("studentcanpost", get_string("studentcanpost", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("allowduplicatedentries", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("allowduplicatedentries", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="allowduplicatedentries">
<option value="1" <?php
if ( $form->allowduplicatedentries ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("allowduplicatedentries", get_string("allowduplicatedentries", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("allowcomments", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("allowcomments", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="allowcomments">
<option value="1" <?php
if ( $form->allowcomments ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("allowcomments", get_string("allowcomments", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("usedynalink", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("usedynalink", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="usedynalink">
<option value="1" <?php
if ( $form->usedynalink ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("usedynalink", get_string("usedynalink", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("defaultapproval", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("defaultapproval", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="defaultapproval">
<option value="1" <?php
if ( $form->defaultapproval ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("defaultapproval", get_string("defaultapproval", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
-<td colspan=2><hr />
+ </td>
+</tr>
+<tr valign="top">
+<td colspan="2"><hr />
</tr>
</tr>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("displayformat", "glossary") ?>:</B></P></TD>
- <TD>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("displayformat", "glossary") ?>:</b></p></td>
+ <td>
<?php
//get and update available formats
$recformats = glossary_get_available_formats();
choose_from_menu($formats,'displayformat',$form->displayformat,'');
?>
<?php helpbutton("displayformat", get_string("displayformat", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("showspecial", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("showspecial", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="showspecial">
<option value="1" <?php
if ( $form->showspecial ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("shows", get_string("showspecial", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("showalphabet", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("showalphabet", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="showalphabet">
<option value="1" <?php
if ( $form->showalphabet ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("shows", get_string("showalphabet", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("showall", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("showall", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="showall">
<option value="1" <?php
if ( $form->showall ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("shows", get_string("showall", "glossary"), "glossary") ?>
- </TD>
-</TR>
-<TR valign=top>
- <TD align=right><P><B><?php echo get_string("editalways", "glossary") ?>:</B></P></TD>
- <TD>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><p><b><?php echo get_string("editalways", "glossary") ?>:</b></p></td>
+ <td>
<select size="1" name="editalways">
<option value="1" <?php
if ( $form->editalways ) {
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("editalways", get_string("editalways", "glossary"), "glossary") ?>
- </TD>
-</TR>
+ </td>
+</tr>
<?php
//Only show rss parameters if rss is activated at site and glossary levels
if (isset($CFG->enablerssfeeds) && isset($CFG->glossary_enablerssfeeds) &&
$CFG->enablerssfeeds && $CFG->glossary_enablerssfeeds) {
- echo "<tr valign=top>";
- echo "<td align=right><p><b>".get_string("rsstype").":</b></p></td>";
+ echo "<tr valign=\"top\">";
+ echo "<td align=\"right\"><p><b>".get_string("rsstype").":</b></p></td>";
echo "<td>";
unset($choices);
$choices[0] = get_string("none");
echo "</td>";
echo "</tr>";
- echo "<tr valign=top>";
- echo "<td align=right><p><b>".get_string("rssarticles").":</b></p></td>";
+ echo "<tr valign=\"top\">";
+ echo "<td align=\"right\"><p><b>".get_string("rssarticles").":</b></p></td>";
echo "<td>";
unset($choices);
$choices[0] = "0";
}
?>
<tr>
- <td align=right valign=top><p><b><?php print_string("allowratings", "glossary") ?>:</b></p></td>
+ <td align="right" valign="top"><p><b><?php print_string("allowratings", "glossary") ?>:</b></p></td>
<td>
<?php
echo "<script>";
"'finishday','finishmonth','finishyear','finishhour','finishminute'];";
echo "</script>";
- echo "<input name=\"userating\" type=checkbox value=1 ";
+ echo "<input name=\"userating\" type=\"checkbox\" value=\"1\" ";
echo " onclick=\"return lockoptions('form','userating', subitemsall)\" ";
if ($form->assessed) {
echo " checked=\"checked\" ";
print_grade_menu($course->id, "scale", $form->scale, false);
echo "<br />";
- echo "<input name=\"ratingtime\" type=checkbox value=1 ";
+ echo "<input name=\"ratingtime\" type=\"checkbox\" value=\"1\" ";
echo " onclick=\"return lockoptions('form','ratingtime', subitemstime)\" ";
if ($form->assesstimestart and $form->assesstimefinish and $form->assessed) {
$form->ratingtime = 1;
echo " />";
print_string("ratingtime", "glossary");
- echo "<table align=left><tr><td align=right nowrap>";
+ echo "<table align=\"left\"><tr><td align=\"right\" nowrap=\"nowrap\">";
echo get_string("from").":";
print_date_selector("startday", "startmonth", "startyear", $form->assesstimestart);
print_time_selector("starthour", "startminute", $form->assesstimestart);
print_time_selector("finishhour", "finishminute", $form->assesstimefinish);
echo "<br />";
echo "</td></tr></table>";
- echo "<input type=\"hidden\" name=\"hratingtime\" value=0 />";
- echo "<input type=\"hidden\" name=\"hassessed\" value=0 />";
- echo "<input type=\"hidden\" name=\"hscale\" value=0 />";
- echo "<input type=\"hidden\" name=\"hstartday\" value=0 />";
- echo "<input type=\"hidden\" name=\"hstartmonth\" value=0 />";
- echo "<input type=\"hidden\" name=\"hstartyear\" value=0 />";
- echo "<input type=\"hidden\" name=\"hstarthour\" value=0 />";
- echo "<input type=\"hidden\" name=\"hstartminute\" value=0 />";
- echo "<input type=\"hidden\" name=\"hfinishday\" value=0 />";
- echo "<input type=\"hidden\" name=\"hfinishmonth\" value=0 />";
- echo "<input type=\"hidden\" name=\"hfinishyear\" value=0 />";
- echo "<input type=\"hidden\" name=\"hfinishhour\" value=0 />";
- echo "<input type=\"hidden\" name=\"hfinishminute\" value=0 />";
+ echo "<input type=\"hidden\" name=\"hratingtime\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hassessed\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hscale\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hstartday\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hstartmonth\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hstartyear\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hstarthour\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hstartminute\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hfinishday\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hfinishmonth\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hfinishyear\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hfinishhour\" value=\"0\" />";
+ echo "<input type=\"hidden\" name=\"hfinishminute\" value=\"0\" />";
echo "<script>";
echo "lockoptions('form','userating', subitemsall);";
?>
</td>
</tr>
-</TABLE>
+</table>
<!-- These hidden variables are always the same -->
-<INPUT type="hidden" name=course value="<?php p($form->course) ?>" />
-<INPUT type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
-<INPUT type="hidden" name=section value="<?php p($form->section) ?>" />
-<INPUT type="hidden" name=module value="<?php p($form->module) ?>" />
-<INPUT type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
-<INPUT type="hidden" name=instance value="<?php p($form->instance) ?>" />
-<INPUT type="hidden" name=mode value="<?php p($form->mode) ?>" />
-<INPUT type="submit" value="<?php print_string("savechanges") ?>" />
-</CENTER>
-</FORM>
+<input type="hidden" name="course" value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="section" value="<?php p($form->section) ?>" />
+<input type="hidden" name="module" value="<?php p($form->module) ?>" />
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
+<input type="submit" value="<?php print_string("savechanges") ?>" />
+</center>
+</form>
}
$site = get_record("course","id",1);
- echo '<p align="right"><font size=-1>' . userdate(time()) . '</font></p>';
+ echo '<p align="right"><font size="-1">' . userdate(time()) . '</font></p>';
echo '<strong>' . $site->fullname . '</strong><br />';
echo get_string("course") . ': <strong>' . $course->fullname . ' ('. $course->shortname . ')</strong><br />';
echo get_string("modulename","glossary") . ': <strong>' . $glossary->name . '</strong><p>';
-<?PHP // $Id$
+<?php // $Id$
// Collect ratings, store them, then return to where we came from
-<?PHP // $Id$
+<?php // $Id$
// For a given entry, shows a report of all the ratings it has
require_once("../../config.php");
error("No ratings for this entry: \"$entry->concept\"");
} else {
- echo "<table border=0 cellpadding=3 cellspacing=3 class=generalbox width=100%>";
+ echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"3\" class=\"generalbox\" width=\"100%\">";
echo "<tr>";
echo "<th> </th>";
- echo "<th><a href=report.php?id=$entry->id&sort=u.firstname>$strname</a>";
- echo "<th width=100%><a href=report.php?id=$entry->id&sort=r.rating>$strrating</a>";
- echo "<th><a href=report.php?id=$entry->id&sort=r.time>$strtime</a>";
+ echo "<th><a href=\"report.php?id=$entry->id&sort=u.firstname\">$strname</a>";
+ echo "<th width=\"100%\"><a href=\"report.php?id=$entry->id&sort=r.rating\">$strrating</a>";
+ echo "<th><a href=\"report.php?id=$entry->id&sort=r.time\">$strtime</a>";
foreach ($ratings as $rating) {
if (isteacher($glossary->course, $rating->id)) {
echo "<tr bgcolor=\"$THEME->cellcontent2\">";
}
echo "<td>";
print_user_picture($rating->id, $glossary->course, $rating->picture);
- echo '<td nowrap><p><font size="-1">'.fullname($rating).'</p>';
- echo '<td nowrap align="center"><p><font size="-1">'.$scalemenu[$rating->rating]."</p>";
- echo '<td nowrap align="center"><p><font size="-1">'.userdate($rating->time)."</p>";
+ echo '<td nowrap="nowrap"><p><font size="-1">'.fullname($rating).'</p>';
+ echo '<td nowrap="nowrap" align="center"><p><font size="-1">'.$scalemenu[$rating->rating]."</p>";
+ echo '<td nowrap="nowrap" align="center"><p><font size="-1">'.userdate($rating->time)."</p>";
echo "</tr>\n";
}
echo "</table>";
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//glossary mods
-<?PHP // $Id$
+<?php // $Id$
//This file adds support to rss feeds generation
//This function is the main entry point to glossary
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
$hiddenentries = get_records_select("glossary_entries","glossaryid = $glossary->id and approved = 0");
if ($hiddenentries) {
- $data[GLOSSARY_APPROVAL_VIEW]->caption .= "<br /><font size=1>(" . count($hiddenentries) . " " . get_string("entries","glossary") . ")</font>";
+ $data[GLOSSARY_APPROVAL_VIEW]->caption .= "<br /><font size=\"1\">(" . count($hiddenentries) . " " . get_string("entries","glossary") . ")</font>";
$data[GLOSSARY_APPROVAL_VIEW]->link = "view.php?id=$id&tab=".GLOSSARY_APPROVAL_VIEW;
$data[GLOSSARY_APPROVAL_VIEW]->link = "view.php?id=$id&mode=approval";
-<?PHP // $Id$
+<?php // $Id$
/////////////////////////////////////////////////////////////////////////////////
/// Code fragment to define the version of glossary
$strsearch = get_string("search");
print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",
- "$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
+ "$navigation <a href=\"index.php?id=$course->id\">$strglossaries</a> -> $glossary->name",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));
if ( $isuserframe and $mode != 'search') {
/// the "Print" icon
echo " <a title =\"". get_string("printerfriendly","glossary") . "\" target=\"printview\" href=\"print.php?id=$cm->id&mode=$mode&hook=$hook&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">";
- echo '<img border=0 src="print.gif"/></a>';
+ echo '<img border="0" src="print.gif"/></a>';
}
echo '</b></font></p>';
/// Search box
// echo '<p>';
- echo '<table align="center" width="70%" bgcolor="' . $THEME->cellheading .'" class="generalbox"><tr><td align=center>';
+ echo '<table align="center" width="70%" bgcolor="' . $THEME->cellheading .'" class="generalbox"><tr><td align="center">';
echo '<p align="center">';
echo '<form method="POST" action="view.php">';
$paging .= "<a href=\"view.php?id=$id&mode=$mode&hook=$hook&offset=" . ($i*$entriesbypage) . "&sortkey=$sortkey&sortorder=$sortorder&fullsearch=$fullsearch\">" . $pagenumber . '</a>';
}
}
- $paging = "<font size=1><center>" . get_string ("jumpto") . " $paging</center></font>";
+ $paging = "<font size=\"1\"><center>" . get_string ("jumpto") . " $paging</center></font>";
} else {
$paging = '';
}
$ratings->allow = true;
}
- echo "<form name=form method=post action=rate.php>";
- echo "<input type=hidden name=id value=\"$course->id\" />";
+ echo "<form name=\"form\" method=\"post\" action=\"rate.php\">";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
}
foreach ($allentries as $entry) {
echo '<p>';
print_simple_box("$sqlselect<br /> $sqlfrom<br /> $sqlwhere<br /> $sqlorderby<br /> $sqllimit","center","85%");
- echo "<p align=right><font size=-3>";
+ echo "<p align=\"right\"><font size=\"-3\">";
echo microtime_diff($CFG->startpagetime, microtime());
echo "</font></p>";
}
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//journal mods
-<?PHP // $Id$
+<?php // $Id$
function journal_upgrade($oldversion) {
// This function does anything necessary to upgrade
-<?PHP\r
-\r
-function journal_upgrade($oldversion) {\r
-/// This function does anything necessary to upgrade \r
-/// older versions to match current functionality \r
-\r
- global $CFG;\r
- return true;\r
-}\r
-\r
-?>\r
-\r
+<?php
+
+
+
+function journal_upgrade($oldversion) {
+
+/// This function does anything necessary to upgrade
+
+/// older versions to match current functionality
+
+
+
+ global $CFG;
+
+ return true;
+
+}
+
+
+
+?>
+
+
+
-<?PHP // $Id$
+<?php // $Id$
function journal_upgrade($oldversion) {
// This function does anything necessary to upgrade
<form name="theform" method="post" action="edit.php">
-<table cellpadding=10 cellspacing=0 class=generalbox>
- <tr><td align=right bgcolor="<?php echo $THEME->cellheading2 ?>">
+<table cellpadding="10" cellspacing="0" class="generalbox">
+ <tr><td align="right" bgcolor="<?php echo $THEME->cellheading2 ?>">
<font size="1">
- <?PHP
+ <?php
helpbutton("reading", get_string("helpreading"), "moodle", true, true);
echo "<br />";
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
<br />
</font>
</td></tr>
-<tr><td align=center bgcolor="<?php echo $THEME->cellheading2 ?>">
+<tr><td align="center" bgcolor="<?php echo $THEME->cellheading2 ?>">
<?php print_textarea($usehtmleditor, 20, 60, 630, 400, "text", $entry->text); ?>
</td></tr>
-<tr><td align=center bgcolor="<?php echo $THEME->cellheading2 ?>">
+<tr><td align="center" bgcolor="<?php echo $THEME->cellheading2 ?>">
<?php
print_string("formattexttype");
echo ": ";
echo "</font>";
?>
</td></tr>
-<tr><td align=center bgcolor="<?php echo $THEME->cellheading2 ?>" class=generalboxcontent>
-<input type="hidden" name=id value="<?php echo $cm->id ?>" />
+<tr><td align="center" bgcolor="<?php echo $THEME->cellheading2 ?>" class="generalboxcontent">
+<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="reset" value="<?php print_string("revert") ?>" />
</td></tr></table>
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
}
print_header_simple("$journal->name", "",
- "<A HREF=\"index.php?id=$course->id\">$strjournals</A> ->
- <A HREF=\"view.php?id=$cm->id\">$journal->name</A> -> $stredit", "",
+ "<a href=\"index.php?id=$course->id\">$strjournals</a> ->
+ <a href=\"view.php?id=$cm->id\">$journal->name</a> -> $stredit", "",
"", true, "", navmenu($course, $cm));
echo "<center>\n";
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
-<?PHP // $Id$
+<?php // $Id$
if (!isset($CFG->journal_showrecentactivity)) {
print_simple_box_start();
if ($entry->modified) {
- echo "<P><FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT></P>";
+ echo "<p><font size=\"1\">".get_string("lastedited").": ".userdate($entry->modified)."</font></p>";
}
if ($entry->text) {
echo format_text($entry->text, $entry->format);
print_simple_box_start("left", "90%");
echo format_text($journal->intro, $journal->introformat);
print_simple_box_end();
- echo "<br clear=all />";
+ echo "<br clear=\"all\" />";
echo "<br />";
if (isstudent($course->id) or isteacher($course->id)) {
print_simple_box_start("right", "90%");
if ($journalopen) {
- echo "<p align=right><a href=\"edit.php?id=$journal->coursemodule\">";
+ echo "<p align=\"right\"><a href=\"edit.php?id=$journal->coursemodule\">";
echo get_string("edit")."</a></p>";
} else {
- echo "<p align=right><a href=\"view.php?id=$journal->coursemodule\">";
+ echo "<p align=\"right\"><a href=\"view.php?id=$journal->coursemodule\">";
echo get_string("view")."</a></p>";
}
if ($entry = get_record("journal_entries", "userid", $user->id, "journal", $journal->id)) {
if ($entry->modified) {
- echo "<p align=\"center\"><font size=1>".get_string("lastedited").": ".userdate($entry->modified)."</font></p>";
+ echo "<p align=\"center\"><font size=\"1\">".get_string("lastedited").": ".userdate($entry->modified)."</font></p>";
}
if ($entry->text) {
echo format_text($entry->text, $entry->format);
}
print_simple_box_end();
- echo "<br clear=all />";
+ echo "<br clear=\"all\" />";
echo "<br />";
}
print_headline(get_string("newjournalentries", "journal").":");
foreach ($journals as $journal) {
$date = userdate($journal->time, $strftimerecent);
- echo "<p><font size=1>$date - ".fullname($journal)."<br />";
+ echo "<p><font size=\"1\">$date - ".fullname($journal)."<br />";
echo "\"<a href=\"$CFG->wwwroot/mod/journal/$journal->url\">";
echo "$journal->name";
echo "</a>\"</font></p>";
$colour = $THEME->cellheading;
}
- echo "\n<TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=10>";
+ echo "\n<table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"10\">";
- echo "\n<TR>";
- echo "\n<TD ROWSPAN=2 BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
+ echo "\n<tr>";
+ echo "\n<td rowspan=\"2\" bgcolor=\"$THEME->body\" width=\"35\" valign=\"top\">";
print_user_picture($user->id, $course->id, $user->picture);
- echo "</TD>";
- echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$colour\">".fullname($user);
+ echo "</td>";
+ echo "<td nowrap=\"nowrap\" width=\"100%\" bgcolor=\"$colour\">".fullname($user);
if ($entry) {
- echo " <FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT>";
+ echo " <font size=\"1\">".get_string("lastedited").": ".userdate($entry->modified)."</font>";
}
- echo "</TR>";
+ echo "</tr>";
- echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+ echo "\n<tr><td width=\"100%\" bgcolor=\"$THEME->cellcontent\">";
if ($entry) {
echo format_text($entry->text, $entry->format);
} else {
print_string("noentry", "journal");
}
- echo "</TD></TR>";
+ echo "</td></tr>";
if ($entry) {
- echo "\n<TR>";
- echo "<TD WIDTH=35 VALIGN=TOP>";
+ echo "\n<tr>";
+ echo "<td width=\"35\" valign=\"top\">";
if (!$entry->teacher) {
$entry->teacher = $USER->id;
}
print_user_picture($entry->teacher, $course->id, $teachers[$entry->teacher]->picture);
- echo "<TD BGCOLOR=\"$colour\">".get_string("feedback").":";
+ echo "<td bgcolor=\"$colour\">".get_string("feedback").":";
choose_from_menu($grades, "r$entry->id", $entry->rating, get_string("nograde")."...");
if ($entry->timemarked) {
- echo " <FONT SIZE=1>".userdate($entry->timemarked)."</FONT>";
+ echo " <font size=\"1\">".userdate($entry->timemarked)."</font>";
}
- echo "<BR><TEXTAREA NAME=\"c$entry->id\" ROWS=12 COLS=60 WRAP=virtual>";
+ echo "<br /><textarea name=\"c$entry->id\" rows=\"12\" cols=\"60\" wrap=\"virtual\">";
p($entry->comment);
- echo "</TEXTAREA><BR>";
- echo "</TD></TR>";
+ echo "</textarea><br />";
+ echo "</td></tr>";
}
- echo "</TABLE><BR CLEAR=ALL>\n";
+ echo "</table><br clear=\"all\">\n";
}
error("Weird journal error");
}
- echo "\n<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1 ALIGN=CENTER><TR><TD BGCOLOR=#888888>";
- echo "\n<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 VALIGN=TOP>";
+ echo "\n<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\"><tr><td bgcolor=#888888>";
+ echo "\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" valign=\"top\">";
- echo "\n<TR>";
- echo "\n<TD ROWSPAN=3 BGCOLOR=\"$THEME->body\" WIDTH=35 VALIGN=TOP>";
+ echo "\n<tr>";
+ echo "\n<td rowspan=\"3\" bgcolor=\"$THEME->body\" width=\"35\" valign=\"top\">";
print_user_picture($teacher->id, $course->id, $teacher->picture);
- echo "</TD>";
- echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">".fullname($teacher);
- echo " <FONT SIZE=2><I>".userdate($entry->timemarked)."</I>";
- echo "</TR>";
+ echo "</td>";
+ echo "<td nowrap=\"nowrap\" width=\"100%\" bgcolor=\"$THEME->cellheading\">".fullname($teacher);
+ echo " <font size=\"2\"><i>".userdate($entry->timemarked)."</i>";
+ echo "</tr>";
- echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+ echo "\n<tr><td width=\"100%\" bgcolor=\"$THEME->cellcontent\">";
- echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
+ echo "<p align=\"right\"><font size=\"-1\"><i>";
if ($grades[$entry->rating]) {
echo get_string("grade").": ";
echo $grades[$entry->rating];
} else {
print_string("nograde");
}
- echo "</I></FONT></P>";
+ echo "</i></font></p>";
echo format_text($entry->comment);
- echo "</TD></TR></TABLE>";
- echo "</TD></TR></TABLE>";
+ echo "</td></tr></table>";
+ echo "</td></tr></table>";
}
?>
?>
<form name="form" method="post" action="mod.php">
-<table cellpadding=5>
-<tr valign=top>
- <td align=right><p><b><?php print_string("journalname", "journal") ?>:</b></p></td>
+<table cellpadding="5">
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("journalname", "journal") ?>:</b></p></td>
<td>
- <input type="text" name="name" size=30 value="<?php p($form->name) ?>" />
+ <input type="text" name="name" size="30" value="<?php p($form->name) ?>" />
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("journalquestion", "journal") ?>:</b></p>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("journalquestion", "journal") ?>:</b></p>
<font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
if ($usehtmleditor) {
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else {
- echo "<p align=right>";
+ echo "<p align=\"right\">";
helpbutton("textformat", get_string("formattexttype"));
print_string("formattexttype");
echo ": ";
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("grade") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("grade") ?>:</b></p></td>
<td>
<?php
print_grade_menu($course->id, "assessed", "$form->assessed");
?>
</td>
</tr>
-<tr valign=top>
- <td align=right><p><b><?php print_string("daysavailable", "journal") ?>:</b></p></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("daysavailable", "journal") ?>:</b></p></td>
<td>
<?php
$options = array();
</table>
<center>
-<input type="hidden" name=course value="<?php p($form->course) ?>" />
-<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
-<input type="hidden" name=section value="<?php p($form->section) ?>" />
-<input type="hidden" name=module value="<?php p($form->module) ?>" />
-<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
-<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
-<input type="hidden" name=mode value="<?php p($form->mode) ?>" />
+<input type="hidden" name="course" value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="section" value="<?php p($form->section) ?>" />
+<input type="hidden" name="module" value="<?php p($form->module) ?>" />
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
-<input type="submit" name=cancel value="<?php print_string("cancel") ?>" />
+<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</form>
</center>
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
if ($allowedtograde) {
echo "<center>";
- echo "<input type=hidden name=id value=\"$cm->id\" />";
- echo "<input type=submit value=\"".get_string("saveallfeedback", "journal")."\" />";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
+ echo "<input type=\"submit\" value=\"".get_string("saveallfeedback", "journal")."\" />";
echo "</center>";
echo "</form>";
}
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//journal mods
-<?PHP // $Id$
+<?php // $Id$
////////////////////////////////////////////////////////////////////////////////
// Code fragment to define the module version etc.
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
$strjournals = get_string("modulenameplural", "journal");
print_header_simple("$journal->name", "",
- "<A HREF=index.php?id=$course->id>$strjournals</A> -> $journal->name", "", "", true,
+ "<a href=\"index.php?id=$course->id\">$strjournals</a> -> $journal->name", "", "", true,
update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
if (isteacher($course->id)) {
}
$entrycount = journal_count_entries($journal, $currentgroup);
- echo "<p align=right><a href=\"report.php?id=$cm->id\">".
+ echo "<p align=\"right\"><a href=\"report.php?id=$cm->id\">".
get_string("viewallentries","journal", $entrycount)."</a>$groupname</p>";
} else if (!$cm->visible) {
if ($timenow < $timefinish) {
$options = array ("id" => "$cm->id");
- echo "<CENTER>";
+ echo "<center>";
if (!isguest()) {
print_single_button("edit.php", $options, get_string("startoredit","journal"));
}
- echo "</CENTER>";
+ echo "</center>";
}
if ($entry = get_record("journal_entries", "userid", $USER->id, "journal", $journal->id)) {
if (empty($entry->text)) {
- echo "<P ALIGN=center><B>".get_string("blankentry","journal")."</B></P>";
+ echo "<p align=\"center\"><b>".get_string("blankentry","journal")."</b></p>";
} else {
echo format_text($entry->text, $entry->format);
}
} else {
- echo "<B><I>".get_string("notstarted","journal")."</I></B>";
+ echo "<b><i>".get_string("notstarted","journal")."</i></b>";
}
print_simple_box_end();
if ($timenow < $timefinish) {
if ($entry->modified) {
- echo "<P><FONT SIZE=-2><B>".get_string("lastedited").":</B> ";
+ echo "<p><font size=\"-2\"><b>".get_string("lastedited").":</b> ";
echo userdate($entry->modified);
echo " (".get_string("numwords", "", count_words($entry->text)).")";
- echo "</FONT></P>";
+ echo "</font></p>";
}
if ($journal->days) {
- echo "<P><FONT SIZE=-2><B>".get_string("editingends", "journal").":</B> ";
- echo userdate($timefinish)."</FONT></P>";
+ echo "<p><font size=\"-2\"><b>".get_string("editingends", "journal").":</b> ";
+ echo userdate($timefinish)."</font></p>";
}
} else {
- echo "<P><FONT SIZE=-2><B>".get_string("editingended", "journal").":</B> ";
- echo userdate($timefinish)."</P>";
+ echo "<p><font size=\"-2\"><b>".get_string("editingended", "journal").":</b> ";
+ echo userdate($timefinish)."</p>";
}
if ($entry->comment or $entry->rating) {
} else {
- echo "<P><B>".get_string("notopenuntil", "journal").": ";
- echo userdate($timestart)."</B></P>";
+ echo "<p><b>".get_string("notopenuntil", "journal").": ";
+ echo userdate($timestart)."</b></p>";
}
print_footer($course);
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//label mods
-<?PHP\r
-\r
-function label_upgrade($oldversion) {\r
-/// This function does anything necessary to upgrade \r
-/// older versions to match current functionality \r
-\r
- global $CFG;\r
-\r
- if ($oldversion < 2003091400) {\r
- table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");\r
- }\r
-\r
- if ($oldversion < 2004021900) {\r
- modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");\r
- modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");\r
- }\r
-\r
-\r
- return true;\r
-}\r
-\r
-?>\r
+<?php
+
+
+
+function label_upgrade($oldversion) {
+
+/// This function does anything necessary to upgrade
+
+/// older versions to match current functionality
+
+
+
+ global $CFG;
+
+
+
+ if ($oldversion < 2003091400) {
+
+ table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");
+
+ }
+
+
+
+ if ($oldversion < 2004021900) {
+
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");
+
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");
+
+ }
+
+
+
+
+
+ return true;
+
+}
+
+
+
+?>
+
-<?PHP\r
-\r
-function label_upgrade($oldversion) {\r
-/// This function does anything necessary to upgrade \r
-/// older versions to match current functionality \r
-\r
- global $CFG;\r
-\r
- if ($oldversion < 2003091400) {\r
- table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");\r
- }\r
-\r
- if ($oldversion < 2004021900) {\r
- modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");\r
- modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");\r
- }\r
-\r
- return true;\r
-}\r
-\r
-?>\r
+<?php
+
+
+
+function label_upgrade($oldversion) {
+
+/// This function does anything necessary to upgrade
+
+/// older versions to match current functionality
+
+
+
+ global $CFG;
+
+
+
+ if ($oldversion < 2003091400) {
+
+ table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");
+
+ }
+
+
+
+ if ($oldversion < 2004021900) {
+
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");
+
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");
+
+ }
+
+
+
+ return true;
+
+}
+
+
+
+?>
+
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
-<?PHP // $Id$
+<?php // $Id$
/// Library of functions and constants for module label
<form name="form" method="post" action="mod.php">
<center>
-<table cellpadding=5>
-<tr valign=top>
- <td align=right><p><b><?php print_string("labeltext", "label") ?>:</b></p>
+<table cellpadding="5">
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("labeltext", "label") ?>:</b></p>
<font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
</table>
<!-- these hidden variables are always the same -->
-<input type="hidden" name=course value="<?php p($form->course) ?>" />
-<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
-<input type="hidden" name=section value="<?php p($form->section) ?>" />
-<input type="hidden" name=module value="<?php p($form->module) ?>" />
-<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
-<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
-<input type="hidden" name=mode value="<?php p($form->mode) ?>" />
+<input type="hidden" name="course" value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="section" value="<?php p($form->section) ?>" />
+<input type="hidden" name="module" value="<?php p($form->module) ?>" />
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
</center>
</form>
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//label mods
-<?PHP // $Id$
+<?php // $Id$
/////////////////////////////////////////////////////////////////////////////////
/// Code fragment to define the version of label
-<?PHP // $Id$
+<?php // $Id$
require_once("../../config.php");
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//lesson mods
-<?PHP
+<?php
function lesson_upgrade($oldversion) {
/// This function does anything necessary to upgrade
-<?PHP
+<?php
function lesson_upgrade($oldversion) {
/// This function does anything necessary to upgrade
-<?PHP // $Id$
+<?php // $Id$
////////////////////////////////////////////////////////////////////
/// format.php - Default format class for file imports/exports. //
-<?PHP // $Id$
+<?php // $Id$
// Import quiz questions into the given category
require_once("../../config.php");
$strlessons = get_string("modulenameplural", "lesson");
print_header_simple("$strimportquestions", " $strimportquestions",
- "<A HREF=index.php?id=$course->id>$strlessons</A> -> <a href=\"view.php?id=$cm->id\">$lesson->name</a>-> $strimportquestions");
+ "<a href=\"index.php?id=$course->id\">$strlessons</a> -> <a href=\"view.php?id=$cm->id\">$lesson->name</a>-> $strimportquestions");
if ($form = data_submitted()) { /// Filename
print_heading_with_help($strimportquestions, "import", "lesson");
print_simple_box_start("center", "", "$THEME->cellheading");
- echo "<form enctype=\"multipart/form-data\" method=\"post\" action=import.php>";
+ echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"import.php\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
echo "<input type=\"hidden\" name=\"pageid\" value=\"".$_GET['pageid']."\" />\n";
- echo "<table cellpadding=5>";
+ echo "<table cellpadding=\"5\">";
- echo "<tr><td align=right>";
+ echo "<tr><td align=\"right\">";
print_string("fileformat", "lesson");
echo ":</td><td>";
choose_from_menu($fileformatnames, "format", "gift", "");
echo "</tr>";
- echo "<tr><td align=right>";
+ echo "<tr><td align=\"right\">";
print_string("upload");
echo ":</td><td>";
echo " <input name=\"newfile\" type=\"file\" size=\"50\" />";
echo "</tr><tr><td> </td><td>";
- echo " <input type=submit name=save value=\"".get_string("uploadthisfile")."\" />";
+ echo " <input type=\"submit\" name=\"save\" value=\"".get_string("uploadthisfile")."\" />";
echo "</td></tr>";
echo "</table>";
-<?PHP // $Id$
+<?php // $Id$
/// This page lists all the instances of lesson in a particular course
foreach ($lessons as $lesson) {
if (!$lesson->visible) {
//Show dimmed if the mod is hidden
- $link = "<A class=\"dimmed\" HREF=\"view.php?id=$lesson->coursemodule\">$lesson->name</A>";
+ $link = "<a class=\"dimmed\" href=\"view.php?id=$lesson->coursemodule\">$lesson->name</a>";
} else {
//Show normal if the mod is visible
- $link = "<A HREF=\"view.php?id=$lesson->coursemodule\">$lesson->name</A>";
+ $link = "<a href=\"view.php?id=$lesson->coursemodule\">$lesson->name</a>";
}
if ($lesson->deadline > $timenow) {
$due = userdate($lesson->deadline);
} else {
- $due = "<FONT COLOR=\"red\">".userdate($lesson->deadline)."</FONT>";
+ $due = "<font color=\"red\">".userdate($lesson->deadline)."</font>";
}
$grade_value = '';
}
}
- echo "<BR>";
+ echo "<br />";
print_table($table);
-<?PHP // $Id: lesson.php, v 1.0 25 Jan 2004
+<?php // $Id: lesson.php, v 1.0 25 Jan 2004
/*************************************************
ACTIONS handled are:
$navigation = "";
if ($course->category) {
- $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strlessons = get_string("modulenameplural", "lesson");
// ... print the header and...
print_header("$course->shortname: $lesson->name", "$course->fullname",
- "$navigation <A HREF=index.php?id=$course->id>$strlessons</A> ->
- <A HREF=\"view.php?id=$cm->id\">$lesson->name</A>",
+ "$navigation <a href=\"index.php?id=$course->id\">$strlessons</a> ->
+ <a href=\"view.php?id=$cm->id\">$lesson->name</a>",
"", "", true);
//...get the action
print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson");
?>
<form name="form" method="post" action="lesson.php">
- <input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
- <input type="hidden" name="pageid" value="<?PHP echo $_GET['pageid'] ?>" />
- <input type="hidden" name="qtype" value="<?PHP echo LESSON_BRANCHTABLE ?>" />
- <center><table cellpadding=5 border=1>
+ <input type="hidden" name="pageid" value="<?php echo $_GET['pageid'] ?>" />
+ <input type="hidden" name="qtype" value="<?php echo LESSON_BRANCHTABLE ?>" />
+ <center><table cellpadding="5" border="1">
<tr><td align="center">
<tr valign="top">
<td><b><?php print_string("pagetitle", "lesson"); ?>:</b><br />
<input type="text" name="title" size="80" maxsize="255" value="" /></td></tr>
- <?PHP
+ <?php
echo "<tr><td><b>";
echo get_string("pagecontents", "lesson").":</b><br />\n";
print_textarea($usehtmleditor, 25,70, 630, 400, "contents");
echo "<tr><td><b>".get_string("description", "lesson")." $iplus1:</b><br />\n";
print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$i]");
echo "</td></tr>\n";
- echo "<tr><td><B>".get_string("jump", "lesson")." $iplus1:</b> \n";
+ echo "<tr><td><b>".get_string("jump", "lesson")." $iplus1:</b> \n";
if ($i) {
// answers 2, 3, 4... jumpto this page
lesson_choose_from_menu($jump, "jumpto[$i]", 0, "");
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
</form>
- <?PHP
+ <?php
}
print_heading_with_help(get_string("addaquestionpage", "lesson"), "overview", "lesson");
?>
<form name="form" method="post" action="lesson.php">
- <input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
- <input type="hidden" name="pageid" value="<?PHP echo $_GET['pageid'] ?>" />
- <center><table cellpadding=5 border=1>
+ <input type="hidden" name="pageid" value="<?php echo $_GET['pageid'] ?>" />
+ <center><table cellpadding="5" border="1">
<tr><td align="center">
<tr valign="top">
<td><b><?php print_string("pagetitle", "lesson"); ?>:</b><br />
<input type="text" name="title" size="80" maxsize="255" value="" /></td></tr>
- <?PHP
+ <?php
echo "<tr><td><b>";
echo get_string("pagecontents", "lesson").":</b><br />\n";
print_textarea($usehtmleditor, 25,70, 630, 400, "contents");
echo "<tr><td><b>".get_string("response", "lesson")." $iplus1:</b><br />\n";
print_textarea(false, 6, 70, 630, 300, "response[$i]");
echo "</td></tr>\n";
- echo "<tr><td><B>".get_string("jump", "lesson")." $iplus1:</b> \n";
+ echo "<tr><td><b>".get_string("jump", "lesson")." $iplus1:</b> \n";
if ($i) {
// answers 2, 3, 4... jumpto this page
lesson_choose_from_menu($jump, "jumpto[$i]", 0, "");
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
</form>
- <?PHP
+ <?php
}
// give teacher a proforma
?>
<form name="editpage" method="post" action="lesson.php">
- <input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="updatepage" />
- <input type="hidden" name="pageid" value="<?PHP echo $_GET['pageid'] ?>" />
+ <input type="hidden" name="pageid" value="<?php echo $_GET['pageid'] ?>" />
<input type="hidden" name="redisplay" value="0" />
- <center><table cellpadding=5 border=1>
+ <center><table cellpadding="5" border="1">
<tr><td align="center">
<tr valign="top">
<td><b><?php print_string("pagetitle", "lesson"); ?>:</b><br />
- <input type="text" name="title" size="80" maxsize="255" value="<?PHP echo $page->title ?>" /></td>
+ <input type="text" name="title" size="80" maxsize="255" value="<?php echo $page->title ?>" /></td>
</tr>
- <?PHP
+ <?php
echo "<tr><td><b>";
echo get_string("pagecontents", "lesson").":</b><br />\n";
print_textarea($usehtmleditor, 25, 70, 630, 400, "contents", $page->contents);
echo "</td></tr>\n";
break;
}
- echo "<tr><td><B>".get_string("jump", "lesson")." $iplus1:</b> \n";
+ echo "<tr><td><b>".get_string("jump", "lesson")." $iplus1:</b> \n";
lesson_choose_from_menu($jump, "jumpto[$i]", 0, "");
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
echo "</td></tr>\n";
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
</form>
- <?PHP
+ <?php
}
-<?PHP // $Id$
+<?php // $Id$
/// Library of functions and constants for module lesson
/// (replace lesson with the name of your module and delete this line)
$javascript = "";
}
- $output = "<SELECT NAME=$name $javascript>\n";
+ $output = "<select name=$name $javascript>\n";
if ($nothing) {
- $output .= " <OPTION VALUE=\"$nothingvalue\"\n";
+ $output .= " <option value=\"$nothingvalue\"\n";
if ($nothingvalue == $selected) {
$output .= " SELECTED";
}
- $output .= ">$nothing</OPTION>\n";
+ $output .= ">$nothing</option>\n";
}
if (!empty($options)) {
foreach ($options as $value => $label) {
- $output .= " <OPTION VALUE=\"$value\"";
+ $output .= " <option value=\"$value\"";
if ($value == $selected) {
$output .= " SELECTED";
}
// stop zero label being replaced by array index value
// if ($label) {
- // $output .= ">$label</OPTION>\n";
+ // $output .= ">$label</option>\n";
// } else {
- // $output .= ">$value</OPTION>\n";
+ // $output .= ">$value</option>\n";
// }
- $output .= ">$label</OPTION>\n";
+ $output .= ">$label</option>\n";
}
}
- $output .= "</SELECT>\n";
+ $output .= "</select>\n";
if ($return) {
return $output;
?>
-<FORM name="form" method="post" action="<?php echo $ME ?>">
-<CENTER>
-<TABLE cellpadding=5>
-<TR valign=top>
- <TD align=right><P><B><?php print_string("name") ?>:</B></P></TD>
- <TD>
- <INPUT type="text" name="name" size=30 value="<?php p($form->name) ?>" />
- </TD>
-</TR>
+<form name="form" method="post" action="<?php echo $ME ?>">
+<center>
+<table cellpadding="5">
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("name") ?>:</b></p></td>
+ <td>
+ <input type="text" name="name" size="30" value="<?php p($form->name) ?>" />
+ </td>
+</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("maximumgrade") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
<td>
<?php
for ($i=100; $i>=0; $i--) {
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</b></p></td>
<td>
<?php
for ($i=10; $i>1; $i--) {
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("maximumnumberofattempts", "lesson") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("maximumnumberofattempts", "lesson") ?>:</b></p></td>
<td>
<?php
unset($numbers);
</tr>
<tr>
- <td align=right><P><B><?php print_string("actionaftercorrectanswer", "lesson") ?>:</B></P></TD>
+ <td align="right"><p><b><?php print_string("actionaftercorrectanswer", "lesson") ?>:</b></p></td>
<td>
- <?PHP
+ <?php
choose_from_menu($LESSON_NEXTPAGE_ACTION, "nextpagedefault", $form->nextpagedefault, "");
helpbutton("nextpageaction", get_string("actionaftercorrectanswer", "lesson"), "lesson");
?>
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("minimumnumberofquestions", "lesson") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("minimumnumberofquestions", "lesson") ?>:</b></p></td>
<td>
<?php
unset($numbers);
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("numberofpagestoshow", "lesson") ?>:</B></P></TD>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("numberofpagestoshow", "lesson") ?>:</b></p></td>
<td>
<?php
unset($numbers);
</tr>
<tr>
- <td align=right><P><B><?php print_string("canretake", "lesson", $course->student) ?>:</B></P></TD>
+ <td align="right"><p><b><?php print_string("canretake", "lesson", $course->student) ?>:</b></p></td>
<td>
- <?PHP
+ <?php
$options[0] = get_string("no"); $options[1] = get_string("yes");
choose_from_menu($options, "retake", $form->retake, "");
helpbutton("retake", get_string("canretake", "lesson", $course->student), "lesson");
</tr>
<tr>
- <td align=right><P><B><?php print_string("handlingofretakes", "lesson") ?>:</B></P></TD>
+ <td align="right"><p><b><?php print_string("handlingofretakes", "lesson") ?>:</b></p></td>
<td>
- <?PHP
+ <?php
$options[0] = get_string("usemean", "lesson"); $options[1] = get_string("usemaximum", "lesson");
choose_from_menu($options, "usemaxgrade", $form->usemaxgrade, "");
helpbutton("handlingofretakes", get_string("handlingofretakes", "lesson"), "lesson");
</td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("available", "lesson") ?>:</B></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("available", "lesson") ?>:</b></td>
<td><?php
print_date_selector("availableday", "availablemonth", "availableyear", $form->available);
echo " - ";
?></td>
</tr>
-<tr valign=top>
- <td align=right><P><B><?php print_string("deadline", "lesson") ?>:</B></td>
+<tr valign="top">
+ <td align="right"><p><b><?php print_string("deadline", "lesson") ?>:</b></td>
<td><?php
print_date_selector("deadlineday", "deadlinemonth", "deadlineyear", $form->deadline);
echo " - ";
?></td>
</tr>
-</TABLE>
+</table>
<!-- These hidden variables are always the same -->
-<INPUT type="hidden" name=course value="<?php p($form->course) ?>" />
-<INPUT type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
-<INPUT type="hidden" name=section value="<?php p($form->section) ?>" />
-<INPUT type="hidden" name=module value="<?php p($form->module) ?>" />
-<INPUT type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
-<INPUT type="hidden" name=instance value="<?php p($form->instance) ?>" />
-<INPUT type="hidden" name=mode value="<?php p($form->mode) ?>" />
-<INPUT type="submit" value="<?php print_string("savechanges") ?>" />
-</CENTER>
-</FORM>
+<input type="hidden" name="course" value="<?php p($form->course) ?>" />
+<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name="section" value="<?php p($form->section) ?>" />
+<input type="hidden" name="module" value="<?php p($form->module) ?>" />
+<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
+<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
+<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
+<input type="submit" value="<?php print_string("savechanges") ?>" />
+</center>
+</form>
-<?PHP //$Id$
+<?php //$Id$
//This php script contains all the stuff to backup/restore
//lesson mods
-<?PHP // $Id$
+<?php // $Id$
/////////////////////////////////////////////////////////////////////////////////
/// Code fragment to define the version of lesson
-<?PHP // $Id$
+<?php // $Id$
/// This page prints a particular instance of lesson
/// (Replace lesson with the name of your module)
$strlesson = get_string("modulename", "lesson");
print_header_simple("$lesson->name", "",
- "<A HREF=index.php?id=$course->id>$strlessons</A> -> <a href=\"view.php?id=$cm->id\">$lesson->name</a>",
+ "<a href=index.php?id=$course->id>$strlessons</a> -> <a href=\"view.php?id=$cm->id\">$lesson->name</a>",
"", "", true, update_module_button($cm->id, $course->id, $strlesson),
navmenu($course, $cm));
// if there are no pages give teacher a blank proforma
?>
<form name="form" method="post" action="lesson.php">
- <input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
+ <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertpage" />
<input type="hidden" name="pageid" value="0" />
- <center><table cellpadding=5 border=1>
+ <center><table cellpadding="5" border="1">
<tr><td align="center">
<tr valign="top">
<td><p><b><?php print_string("pagetitle", "lesson"); ?>:</b></p></td></tr>
<tr><td><input type="text" name="title" size="80" maxsize="255" value="" /></td></tr>
- <?PHP
+ <?php
echo "<tr><td><b>";
echo get_string("pagecontents", "lesson").":</b><br />\n";
print_textarea($usehtmleditor, 25, 70, 630, 400, "contents");
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
</form>
- <?PHP
+ <?php
use_html_editor("contents"); // Lets give IE more time load the page before replacing textarea.
// show import link
print_heading("<a href=\"import.php?id=$cm->id&pageid=0\">".get_string("importquestions",
if (isteacheredit($course->id)) {
if ($npages > 1) {
echo "<a title=\"".get_string("move")."\" href=\"lesson.php?id=$cm->id&action=move&pageid=$page->id\">\n".
- "<img src=\"$pixpath/t/move.gif\" hspace=\"2\" height=11 width=11 border=0></a>\n";
+ "<img src=\"$pixpath/t/move.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a>\n";
}
echo "<a title=\"".get_string("update")."\" href=\"lesson.php?id=$cm->id&action=editpage&pageid=$page->id\">\n".
- "<img src=\"$pixpath/t/edit.gif\" hspace=\"2\" height=11 width=11 border=0></a>\n".
+ "<img src=\"$pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a>\n".
"<a title=\"".get_string("delete")."\" href=\"lesson.php?id=$cm->id&action=confirmdelete&pageid=$page->id\">\n".
- "<img src=\"$pixpath/t/delete.gif\" hspace=\"2\" height=11 width=11 border=0></a>\n";
+ "<img src=\"$pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a>\n";
}
echo "</td></tr>\n";
echo "<tr><td colspan=\"2\">\n";