Browse Source

Validade da matrícula pela data considera apenas dia/mês/ano

master
Marco Rougeth 10 years ago
parent
commit
fa7c9fa4ff
  1. 5
      lib.php

5
lib.php

@ -283,7 +283,10 @@ class enrol_ilbead_plugin extends enrol_plugin {
$enrol = enrol_get_plugin('ilbead'); $enrol = enrol_get_plugin('ilbead');
$timestart = time(); $timestart = time();
if ($instance->enrolperiod) { if ($instance->enrolperiod) {
$timeend = $timestart + $instance->enrolperiod; $timeend = date("Y/m/d", (string)($timestart + $instance->enrolperiod));
list($year, $month, $day) = split("/", $timeend);
$timeend = (int)strtotime("$year-$month-$day 23:59:59");
} else { } else {
$timeend = 0; $timeend = 0;
} }

Loading…
Cancel
Save