MDL-61249 enrol_manual: Fix end date calculation
This patch has been given by Bruno Malaval.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user