1.4.26 Gestion des utilisateurs date de la dernière page vue

This commit is contained in:
Fred Tempez 2024-02-11 17:53:56 +01:00
parent a4164e4a2d
commit 17b76e1a0f
6 changed files with 8 additions and 6 deletions

View File

@ -668,7 +668,7 @@ class course extends common
// Construction du tableau
self::$courseUsers[] = [
$userId,
//$userId,
$this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']),
isset($pages[$this->getData(['enrolment', $courseId, $userId, 'lastPageView'])]['title'])
? $pages[$this->getData(['enrolment', $courseId, $userId, 'lastPageView'])]['title']

View File

@ -30,7 +30,7 @@ $(document).ready((function () {
locale: 'fr',
"columnDefs": [
{
target: 7,
target: 6,
orderable: false,
searchable: false
}

View File

@ -53,7 +53,7 @@
</div>
<?php echo template::formClose(); ?>
<?php if ($module::$courseUsers): ?>
<?php echo template::table([2, 2, 3, 1, 1, 1 , 1, 1], $module::$courseUsers, ['Id', 'Nom Prénom', 'Dernière page vue', 'Date' , 'Heure', 'Étiquettes', 'Progression', ''], ['id' => 'dataTables']); ?>
<?php echo template::table([3, 4, 1, 1, 1, 1, 1], $module::$courseUsers, ['Nom Prénom', 'Dernière page vue', 'Date' , 'Heure', 'Étiquettes', 'Progression', ''], ['id' => 'dataTables']); ?>
<?php else: ?>
<?php echo template::speech('Aucun participant'); ?>
<?php endif; ?>

View File

@ -518,13 +518,15 @@ class user extends common
// Formatage de la liste
self::$users[] = [
$userId,
//$userId,
$this->getData(['user', $userId, 'firstname']) . ' ' . $userLastNames,
helper::translate(self::$groups[(int) $this->getData(['user', $userId, 'group'])]),
empty($this->getData(['profil', $this->getData(['user', $userId, 'group']), $this->getData(['user', $userId, 'profil']), 'name']))
? helper::translate(self::$groups[(int) $this->getData(['user', $userId, 'group'])])
: $this->getData(['profil', $this->getData(['user', $userId, 'group']), $this->getData(['user', $userId, 'profil']), 'name']),
$this->getData(['user', $userId, 'tags']),
helper::dateUTF8('%d/%m/%Y', $this->getData(['user', $userId, 'accessTimer']), self::$i18nUI),
//helper::dateUTF8('%H:%M', $this->getData(['user', $userId, 'accessTimer']), self::$i18nUI),
template::button('userEdit' . $userId, [
'href' => helper::baseUrl() . 'user/edit/' . $userId,
'value' => template::ico('pencil'),

View File

@ -22,7 +22,7 @@ $(document).ready((function () {
$("#userFilterGroup, #userFilterFirstName, #userFilterLastName").change(function () {
$("#userFilterUserForm").submit();
});
$.fn.dataTable.moment( 'DD/MM/YYYY' );
$('#dataTables').DataTable({
language: {
url: "core/vendor/datatables/french.json"

View File

@ -60,4 +60,4 @@
</div>
</div>
<?php echo template::formClose(); ?>
<?php echo template::table([2, 2, 2, 2, 2, 1, 1], $module::$users, ['Identifiant', 'Nom', 'Groupe', 'Profil', 'Étiquettes', '', ''], ['id' => 'dataTables']); ?>
<?php echo template::table([3, 2, 2, 2, 2, 1, 1], $module::$users, [ 'Nom', 'Groupe', 'Profil', 'Étiquettes', 'Date dernière vue', '', ''], ['id' => 'dataTables']); ?>