Skip to content

Commit

Permalink
MDL-68913 mod_assign: fix behat failure & version number
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Nov 11, 2021
1 parent 3da8ea4 commit f94f9f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mod/assign/classes/output/renderer.php
Expand Up @@ -1375,7 +1375,8 @@ public function render_assign_course_index_summary(\assign_course_index_summary
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;

Expand Down
4 changes: 2 additions & 2 deletions mod/assign/db/upgrade.php
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/version.php
Expand Up @@ -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.

0 comments on commit f94f9f8

Please sign in to comment.