From: scyrma Date: Thu, 6 Mar 2008 05:02:07 +0000 (+0000) Subject: MDL-13795 - Proposed fix to show a nice string instead of a non-existent deadline... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e9b18d90928b844eb53675a3b2d6845059147e42;p=moodle.git MDL-13795 - Proposed fix to show a nice string instead of a non-existent deadline. (merge) --- diff --git a/lang/en_utf8/lesson.php b/lang/en_utf8/lesson.php index 21f4a8c3d4..882b061533 100644 --- a/lang/en_utf8/lesson.php +++ b/lang/en_utf8/lesson.php @@ -177,6 +177,7 @@ $string['nobranchtablefound'] = 'No Branch Table found'; $string['nocommentyet'] = 'No comment yet.'; $string['nocoursemods'] = 'No activities found'; $string['nocredit'] = 'No credit'; +$string['nodeadline'] = 'No deadline'; $string['noessayquestionsfound'] = 'No essay questions found in this lesson.'; $string['nohighscores'] = 'No high scores'; $string['nolessonattempts'] = 'No attempts have been made on this lesson.'; diff --git a/mod/lesson/index.php b/mod/lesson/index.php index 0dd0c97d63..ea33f44ebc 100644 --- a/mod/lesson/index.php +++ b/mod/lesson/index.php @@ -51,6 +51,7 @@ $strdeadline = get_string("deadline", "lesson"); $strweek = get_string("week"); $strtopic = get_string("topic"); + $strnodeadline = get_string("nodeadline", "lesson"); $table = new stdClass; if ($course->format == "weeks") { @@ -75,7 +76,9 @@ $cm = get_coursemodule_from_instance('lesson', $lesson->id); $context = get_context_instance(CONTEXT_MODULE, $cm->id); - if ($lesson->deadline > $timenow) { + if ($lesson->deadline == 0) { + $due = $strnodeadline; + } else if ($lesson->deadline > $timenow) { $due = userdate($lesson->deadline); } else { $due = "".userdate($lesson->deadline)."";