diff --git a/core/core.php b/core/core.php index d67b896..535d427 100644 --- a/core/core.php +++ b/core/core.php @@ -50,7 +50,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.1.03'; + const ZWII_VERSION = '1.1.04'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/'; diff --git a/core/module/course/course.php b/core/module/course/course.php index 2f33e54..d05ce78 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -162,6 +162,8 @@ class course extends common 'closingDate' => $this->getInput('courseAddClosingDate', helper::FILTER_DATETIME), 'enrolment' => $this->getInput('courseAddEnrolment', helper::FILTER_INT), 'enrolmentKey' => $this->getInput('courseAddEnrolmentKey'), + 'limitEnrolment' => $this->getInput('courseAddEnrolmentLimit', helper::FILTER_BOOLEAN), + 'limitEnrolmentDate' => $this->getInput('courseAddEnrolmentLimitDate', helper::FILTER_DATETIME), ] ]); @@ -227,6 +229,8 @@ class course extends common 'closingDate' => $this->getInput('courseClosingDate', helper::FILTER_DATETIME), 'enrolment' => $this->getInput('courseEditEnrolment', helper::FILTER_INT), 'enrolmentKey' => $this->getInput('courseEditEnrolmentKey'), + 'limitEnrolment' => $this->getInput('courseEditEnrolmentLimit', helper::FILTER_BOOLEAN), + 'limitEnrolmentDate' => $this->getInput('courseEditEnrolmentLimitDate', helper::FILTER_DATETIME), ] ]); @@ -863,12 +867,15 @@ class course extends common } $file = fopen($filename, 'w'); foreach ($history['history'] as $pageId => $time) { - $data = array_map('html_entity_decode', array( - $pageId, - $pages[$pageId]['title'], - $pages[$pageId]['number'], - helper::dateUTF8('%d %B %Y - %H:%M:%S', $time), - )); + $data = array_map( + 'html_entity_decode', + array( + $pageId, + $pages[$pageId]['title'], + $pages[$pageId]['number'], + helper::dateUTF8('%d %B %Y - %H:%M:%S', $time), + ) + ); // Écrire la ligne dans le fichier CSV fputcsv($file, $data, ';'); diff --git a/core/module/course/view/add/add.php b/core/module/course/view/add/add.php index 24b44dd..5589be4 100644 --- a/core/module/course/view/add/add.php +++ b/core/module/course/view/add/add.php @@ -86,6 +86,19 @@ ]); ?> +
Inscription : " . $module::$courseEnrolment[$this->getData(['course', $this->getUrl(2), 'enrolment'])] . "
"; ?> + '; ?> + Inscription : " . $module::$courseEnrolment[$this->getData(['course', $this->getUrl(2), 'enrolment'])] . '.'; ?> + + getData(['course', $this->getUrl(2), 'limitEnrolment']) === true && $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time()):?> + + getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI); ?> + + '; ?>