diff --git a/core/core.php b/core/core.php index 1a55464..2f45c1e 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.0.42'; + const ZWII_VERSION = '1.0.43'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/'; diff --git a/core/module/course/course.php b/core/module/course/course.php index 88f1582..c39eac6 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -475,7 +475,10 @@ class course extends common $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']), $pageId, helper::dateUTF8('%d %B %Y - %H:%M', $maxTime), - round(($viewPages * 100) / $sumPages, 1) . ' %', + template::button('userHistory' . $userId, [ + 'href' => helper::baseUrl() . 'course/userHistory/' . $courseId . '/' . $userId, + 'value'=> round(($viewPages * 100) / $sumPages, 1) . ' %' + ] ), template::button('userDelete' . $userId, [ 'class' => 'userDelete buttonRed', 'href' => helper::baseUrl() . 'course/userDelete/' . $courseId . '/' . $userId, @@ -497,7 +500,7 @@ class course extends common // Valeurs en sortie $this->addOutput([ - 'title' => sprintf(helper::translate('Aucun inscrit dans le cours %s'), $this->getData(['course', $courseId, 'title'])), + 'title' => sprintf(helper::translate('Inscriptions dans le cours %s'), $this->getData(['course', $courseId, 'title'])), 'view' => 'user', 'vendor' => [ 'datatables' @@ -668,17 +671,17 @@ class course extends common $courseId = $this->getUrl(2); $userId = $this->getUrl(3); - foreach ($this->getData(['history', $courseId, $userId]) as $pageId => $time) { + $history = $this->getData(['enrolment', $courseId, $userId]); + foreach ($history['history'] as $pageId => $time) { self::$userHistory[$pageId] = [ + helper::dateUTF8('%d %B %Y - %H:%M:%S', $time), $this->getData(['page', $pageId, 'shortTitle']), - helper::dateUTF8('%d %B %Y - %H:%M', $time) - ] - ; + ]; } // Valeurs en sortie $this->addOutput([ - 'title' => helper::translate('Historique'), + 'title' => helper::translate('Historique ') . $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']), 'view' => 'userHistory', 'vendor' => [ 'datatables' diff --git a/core/module/course/view/userHistory/userHistory.css b/core/module/course/view/userHistory/userHistory.css new file mode 100644 index 0000000..ec84629 --- /dev/null +++ b/core/module/course/view/userHistory/userHistory.css @@ -0,0 +1,18 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2023, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + + +/** NE PAS EFFACER +* admin.css +*/ \ No newline at end of file diff --git a/core/module/course/view/userHistory/userHistory.js.php b/core/module/course/view/userHistory/userHistory.js.php new file mode 100644 index 0000000..df88874 --- /dev/null +++ b/core/module/course/view/userHistory/userHistory.js.php @@ -0,0 +1,20 @@ +/** + * This file is part of Zwii. + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2023, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + +$(document).ready((function () { + $('#dataTables').DataTable({ + language: { + url: "core/vendor/datatables/french.json" + } + }); +})); \ No newline at end of file diff --git a/core/module/course/view/userHistory/userHistory.php b/core/module/course/view/userHistory/userHistory.php new file mode 100644 index 0000000..beaaed8 --- /dev/null +++ b/core/module/course/view/userHistory/userHistory.php @@ -0,0 +1,14 @@ +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . 'course/user/' . $this->getUrl(2), + 'value' => template::ico('left') + ]); ?> +
+
+ + 'dataTables']); ?> + + + \ No newline at end of file