mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-13795 - Proposed fix to show a nice string instead of a non-existent deadline. (merge)
This commit is contained in:
parent
fffb5d240a
commit
e9b18d9092
@ -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.';
|
||||
|
@ -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 = "<font color=\"red\">".userdate($lesson->deadline)."</font>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user