Little robustness fixes
This commit is contained in:
@@ -59,6 +59,11 @@
|
||||
if (! isset($config->guestloginbutton)) {
|
||||
$config->guestloginbutton = 1;
|
||||
}
|
||||
|
||||
if (empty($focus)) {
|
||||
$focus = "";
|
||||
}
|
||||
|
||||
$guestoptions[0] = get_string("hide");
|
||||
$guestoptions[1] = get_string("show");
|
||||
|
||||
|
||||
+2
-2
@@ -36,8 +36,8 @@
|
||||
if (! $teacher = get_record("user_teachers", "course", "$course->id", "userid", "$num")) {
|
||||
error("No such teacher in course $course->shortname with user id $num");
|
||||
}
|
||||
$teacher->role = $vals[r];
|
||||
$teacher->authority = $vals[a];
|
||||
$teacher->role = $vals['r'];
|
||||
$teacher->authority = $vals['a'];
|
||||
if (!update_record("user_teachers", $teacher)) {
|
||||
error("Could not update teacher entry id = $teacher->id");
|
||||
}
|
||||
|
||||
@@ -69,9 +69,10 @@
|
||||
$onsubmit = "onsubmit=\"copyrichtext(theform.text);\"";
|
||||
} else {
|
||||
$defaultformat = FORMAT_MOODLE;
|
||||
$onsubmit = "";
|
||||
}
|
||||
|
||||
if (! $entry ) {
|
||||
if (empty($entry)) {
|
||||
$entry->text = "";
|
||||
$entry->format = $defaultformat;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
if ($usehtmleditor and $form->type == HTML) {
|
||||
$onsubmit = "onsubmit=\"copyrichtext(theform.alltext);\"";
|
||||
} else {
|
||||
$onsubmit = "";
|
||||
}
|
||||
echo "<FORM NAME=theform METHOD=post $onsubmit ACTION=\"$form->destination\">";
|
||||
echo "<TABLE CELLPADDING=5 ALIGN=CENTER>";
|
||||
|
||||
Reference in New Issue
Block a user