Merge branch 'MDL-74142-master' of https://github.com/aanabit/moodle

This commit is contained in:
Sara Arjona
2022-03-10 11:58:21 +01:00
2 changed files with 10 additions and 1 deletions
+8
View File
@@ -371,6 +371,14 @@ class renderer extends \plugin_renderer_base {
}
// Add time limit info if there is one.
$timelimitenabled = get_config('assign', 'enabletimelimit');
if ($timelimitenabled && $summary->timelimit > 0) {
$cell1content = get_string('timelimit', 'assign');
$cell2content = format_time($summary->timelimit);
$this->add_table_row_tuple($t, $cell1content, $cell2content, [], []);
}
// All done - write the table.
$o .= \html_writer::table($t);
$o .= $this->output->box_end();
@@ -164,7 +164,8 @@ Feature: Set availability dates for an assignment
And I set the field "timelimit[timeunit]" to "seconds"
# Set 'Due date' to 2 days 5 hours 30 minutes ago.
And I set the field "Due date" to "##2 days 5 hours 30 minutes ago##"
And I press "Save and return to course"
And I press "Save and display"
And I should see "5 secs" in the "Time limit" "table_row"
And I log out
When I am on the "Assignment name" Activity page logged in as student1