Robustness

This commit is contained in:
moodler 2003-01-01 07:18:43 +00:00
parent 13469b820d
commit 7f7f2cca29
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@
$entrytext = get_field("journal_entries", "text", "userid", $USER->id, "journal", $journal->id);
$journal->timestart = $course->startdate + (($journal->section - 1) * 608400);
if ($journal->daysopen) {
if (!empty($journal->daysopen)) {
$journal->timefinish = $journal->timestart + (3600 * 24 * $journal->daysopen);
} else {
$journal->timefinish = 9999999999;
@ -66,7 +66,7 @@
} else {
$text .= "$strview</A></P>";
}
if ($journal->section) {
if (!empty($journal->section)) {
$section = "$journal->section";
} else {
$section = "";

View File

@ -136,7 +136,7 @@ function print_user($user, $course, $string) {
echo "<FONT SIZE=-1>";
echo "<FONT SIZE=3><B>$user->firstname $user->lastname</B></FONT>";
echo "<P>";
if ($user->role and ($user->role <> $course->teacher)) {
if (!empty($user->role) and ($user->role <> $course->teacher)) {
echo "$string->role: $user->role<BR>";
}
if ($user->maildisplay == 1 or ($user->maildisplay == 2 and $course->category) or isteacher($course->id)) {