Skip to content

Commit

Permalink
MDL-61249 enrol_manual: Fix end date calculation
Browse files Browse the repository at this point in the history
This patch has been given by Bruno Malaval.
  • Loading branch information
sarjona committed Feb 23, 2018
1 parent 296a3aa commit e2cd8d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enrol/manual/ajax.php
Expand Up @@ -91,7 +91,7 @@
}

$roleid = optional_param('roletoassign', null, PARAM_INT);
$duration = optional_param('duration', 0, PARAM_FLOAT);
$duration = optional_param('duration', 0, PARAM_INT);
$startdate = optional_param('startdate', 0, PARAM_INT);
$recovergrades = optional_param('recovergrades', 0, PARAM_INT);

Expand Down Expand Up @@ -125,7 +125,7 @@
if ($duration <= 0) {
$timeend = 0;
} else {
$timeend = $timestart + intval($duration*24*60*60);
$timeend = $timestart + $duration;
}

$instances = $manager->get_enrolment_instances();
Expand Down

0 comments on commit e2cd8d3

Please sign in to comment.