From 09213b33091dd98a6234f64e2d49249d07229106 Mon Sep 17 00:00:00 2001 From: Marco Rougeth Date: Tue, 25 Nov 2014 15:45:09 -0200 Subject: [PATCH] =?UTF-8?q?Validade=20da=20matr=C3=ADcula=20pela=20data=20?= =?UTF-8?q?considera=20apenas=20dia/m=C3=AAs/ano?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib.php b/lib.php index 9f57366..4b70e89 100644 --- a/lib.php +++ b/lib.php @@ -294,7 +294,9 @@ class enrol_ilbeadtutorado_plugin extends enrol_plugin { $enrol = enrol_get_plugin('ilbeadtutorado'); $timestart = time(); 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 { $timeend = 0; }