$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;
} else {
$text .= "$strview</A></P>";
}
- if ($journal->section) {
+ if (!empty($journal->section)) {
$section = "$journal->section";
} else {
$section = "";
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)) {