Permalink
Browse files

Little robustness fixes

  • Loading branch information...
1 parent 814ada4 commit 5eda92d0e2c9932a8a5005adb19004dde0f68040 moodler committed Dec 30, 2002
Showing with 11 additions and 3 deletions.
  1. +5 −0 admin/auth.php
  2. +2 −2 course/teachers.php
  3. +2 −1 mod/journal/edit.php
  4. +2 −0 mod/resource/details.php
View
5 admin/auth.php
@@ -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");
View
4 course/teachers.php
@@ -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");
}
View
3 mod/journal/edit.php
@@ -69,9 +69,10 @@
$onsubmit = "onsubmit=\"copyrichtext(theform.text);\"";
} else {
$defaultformat = FORMAT_MOODLE;
+ $onsubmit = "";
}
- if (! $entry ) {
+ if (empty($entry)) {
$entry->text = "";
$entry->format = $defaultformat;
}
View
2 mod/resource/details.php
@@ -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>";

0 comments on commit 5eda92d

Please sign in to comment.