mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Robustness
This commit is contained in:
parent
13469b820d
commit
7f7f2cca29
@ -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 = "";
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user