diff --git a/mod/assignment/mod.html b/mod/assignment/mod.html index dfd4b64b24323..27f239c9cfef4 100644 --- a/mod/assignment/mod.html +++ b/mod/assignment/mod.html @@ -6,6 +6,30 @@ $defaultformat = FORMAT_MOODLE; $onsubmit = ""; } + if (empty($form->name)) { + $form->name = ""; + } + if (empty($form->description)) { + $form->description = ""; + } + if (empty($form->format)) { + $form->format = ""; + } + if (empty($form->type)) { + $form->type = ""; + } + if (empty($form->resubmit)) { + $form->resubmit = ""; + } + if (empty($form->grade)) { + $form->grade = ""; + } + if (empty($form->maxbytes)) { + $form->maxbytes = ""; + } + if (empty($form->timedue)) { + $form->timedue = ""; + } ?>
action=""> @@ -107,7 +131,6 @@ print_date_selector("dueday", "duemonth", "dueyear", $form->timedue); echo " - "; print_time_selector("duehour", "dueminute", $form->timedue); - formerr($err["duedate"]); ?> diff --git a/mod/forum/lib.php b/mod/forum/lib.php index b760e84dbeabc..f47664f90a2ec 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1472,7 +1472,11 @@ function forum_print_latest_discussions($forum_id=0, $forum_numdiscussions=5, $f } else { $discussion->replies = 0; } - $ownpost = ($discussion->userid == $USER->id); + if (!empty($USER->id)) { + $ownpost = ($discussion->userid == $USER->id); + } else { + $ownpost=false; + } switch ($forum_style) { case "minimal": echo "

".userdate($discussion->modified, "%d %b, %H:%M")." - $discussion->firstname";