MDL-61249 enrol_manual: Fix end date calculation

This patch has been given by Bruno Malaval.
This commit is contained in:
Sara Arjona
2018-02-02 14:53:56 +01:00
parent 296a3aa707
commit e2cd8d3c6d
+2 -2
View File
@@ -91,7 +91,7 @@ switch ($action) {
}
$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);
@@ -125,7 +125,7 @@ switch ($action) {
if ($duration <= 0) {
$timeend = 0;
} else {
$timeend = $timestart + intval($duration*24*60*60);
$timeend = $timestart + $duration;
}
$instances = $manager->get_enrolment_instances();