forked from ZwiiCMS-Team/ZwiiCampus
v43 Historique de progression
This commit is contained in:
parent
f11f57da29
commit
44856c03c6
@ -50,7 +50,7 @@ class common
|
|||||||
const ACCESS_TIMER = 1800;
|
const ACCESS_TIMER = 1800;
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '1.0.42';
|
const ZWII_VERSION = '1.0.43';
|
||||||
|
|
||||||
// URL autoupdate
|
// URL autoupdate
|
||||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/';
|
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/';
|
||||||
|
@ -475,7 +475,10 @@ class course extends common
|
|||||||
$this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']),
|
$this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']),
|
||||||
$pageId,
|
$pageId,
|
||||||
helper::dateUTF8('%d %B %Y - %H:%M', $maxTime),
|
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, [
|
template::button('userDelete' . $userId, [
|
||||||
'class' => 'userDelete buttonRed',
|
'class' => 'userDelete buttonRed',
|
||||||
'href' => helper::baseUrl() . 'course/userDelete/' . $courseId . '/' . $userId,
|
'href' => helper::baseUrl() . 'course/userDelete/' . $courseId . '/' . $userId,
|
||||||
@ -497,7 +500,7 @@ class course extends common
|
|||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$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',
|
'view' => 'user',
|
||||||
'vendor' => [
|
'vendor' => [
|
||||||
'datatables'
|
'datatables'
|
||||||
@ -668,17 +671,17 @@ class course extends common
|
|||||||
|
|
||||||
$courseId = $this->getUrl(2);
|
$courseId = $this->getUrl(2);
|
||||||
$userId = $this->getUrl(3);
|
$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] = [
|
self::$userHistory[$pageId] = [
|
||||||
|
helper::dateUTF8('%d %B %Y - %H:%M:%S', $time),
|
||||||
$this->getData(['page', $pageId, 'shortTitle']),
|
$this->getData(['page', $pageId, 'shortTitle']),
|
||||||
helper::dateUTF8('%d %B %Y - %H:%M', $time)
|
];
|
||||||
]
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => helper::translate('Historique'),
|
'title' => helper::translate('Historique ') . $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']),
|
||||||
'view' => 'userHistory',
|
'view' => 'userHistory',
|
||||||
'vendor' => [
|
'vendor' => [
|
||||||
'datatables'
|
'datatables'
|
||||||
|
18
core/module/course/view/userHistory/userHistory.css
Normal file
18
core/module/course/view/userHistory/userHistory.css
Normal file
@ -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 <remi.jean@outlook.com>
|
||||||
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
|
* @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
|
||||||
|
*/
|
20
core/module/course/view/userHistory/userHistory.js.php
Normal file
20
core/module/course/view/userHistory/userHistory.js.php
Normal file
@ -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 <remi.jean@outlook.com>
|
||||||
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||||
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||||
|
* @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"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}));
|
14
core/module/course/view/userHistory/userHistory.php
Normal file
14
core/module/course/view/userHistory/userHistory.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col1">
|
||||||
|
<?php echo template::button('courseUserHistoryBack', [
|
||||||
|
'class' => 'buttonGrey',
|
||||||
|
'href' => helper::baseUrl() . 'course/user/' . $this->getUrl(2),
|
||||||
|
'value' => template::ico('left')
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php if ($module::$userHistory): ?>
|
||||||
|
<?php echo template::table([6, 6], $module::$userHistory, ['Page', 'Dernière consultation de cette page'], ['id' => 'dataTables']); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php echo template::speech('Aucun historique'); ?>
|
||||||
|
<?php endif; ?>
|
Loading…
Reference in New Issue
Block a user