Commit a30f0799 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Merge branch 'MDL-68913-fix' of https://github.com/sarjona/moodle

parents d650e652 f94f9f87
......@@ -1375,7 +1375,8 @@ class renderer extends \plugin_renderer_base {
protected function get_time_remaining(\mod_assign\output\assign_submission_status $status): array {
$time = time();
$submission = $status->teamsubmission ? $status->teamsubmission : $status->submission;
$timelimitenabled = get_config('assign', 'enabletimelimit') && $status->timelimit > 0 && $submission->timestarted;
$submissionstarted = $submission && property_exists($submission, 'timestarted') && $submission->timestarted;
$timelimitenabled = get_config('assign', 'enabletimelimit') && $status->timelimit > 0 && $submissionstarted;
$duedatereached = $status->duedate > 0 && $status->duedate - $time <= 0;
$timelimitenabledbeforeduedate = $timelimitenabled && !$duedatereached;
......
......@@ -59,7 +59,7 @@ function xmldb_assign_upgrade($oldversion) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2021093000) {
if ($oldversion < 2021110901) {
// Define field activity to be added to assign.
$table = new xmldb_table('assign');
$field = new xmldb_field('activity', XMLDB_TYPE_TEXT, null, null, null, null, null, 'alwaysshowdescription');
......@@ -109,7 +109,7 @@ function xmldb_assign_upgrade($oldversion) {
}
// Assign savepoint reached.
upgrade_mod_savepoint(true, 2021093000, 'assign');
upgrade_mod_savepoint(true, 2021110901, 'assign');
}
return true;
......
......@@ -25,5 +25,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_assign'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2021110900; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2021110901; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2021052500; // Requires this Moodle version.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment