Filtre de désinscription

This commit is contained in:
Fred Tempez 2023-11-30 14:12:03 +01:00
parent d14eb9f6a8
commit ad578028d7
4 changed files with 10 additions and 5 deletions

View File

@ -491,8 +491,10 @@ class course extends common
$pageId = array_search($maxTime, $history); $pageId = array_search($maxTime, $history);
} }
// Compte les rôles // Compte les rôles valides
$profils[$this->getData(['user', $userId, 'group']) . $this->getData(['user', $userId, 'profil'])]++; if (isset($profils[$this->getData(['user', $userId, 'group']) . $this->getData(['user', $userId, 'profil'])])) {
$profils[$this->getData(['user', $userId, 'group']) . $this->getData(['user', $userId, 'profil'])]++;
}
// Filtres // Filtres
if ($this->isPost()) { if ($this->isPost()) {
@ -529,6 +531,7 @@ class course extends common
$this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']), $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']),
!empty($history) ? $pages[$pageId] : '-', !empty($history) ? $pages[$pageId] : '-',
!empty($history) ? helper::dateUTF8('%d %B %Y - %H:%M', $maxTime) : '-', !empty($history) ? helper::dateUTF8('%d %B %Y - %H:%M', $maxTime) : '-',
$this->getData(['user', $userId, 'tags']),
template::button('userHistory' . $userId, [ template::button('userHistory' . $userId, [
'href' => helper::baseUrl() . 'course/userHistory/' . $courseId . '/' . $userId, 'href' => helper::baseUrl() . 'course/userHistory/' . $courseId . '/' . $userId,
'value' => !empty($history) ? round(($viewPages * 100) / $sumPages, 1) . ' %' : '0%', 'value' => !empty($history) ? round(($viewPages * 100) / $sumPages, 1) . ' %' : '0%',
@ -660,6 +663,7 @@ class course extends common
$userId, $userId,
$this->getData(['user', $userId, 'firstname']), $this->getData(['user', $userId, 'firstname']),
$this->getData(['user', $userId, 'lastname']), $this->getData(['user', $userId, 'lastname']),
$this->getData(['user', $userId, 'tags']),
]; ];
} }
@ -804,6 +808,7 @@ class course extends common
$userId, $userId,
$this->getData(['user', $userId, 'firstname']), $this->getData(['user', $userId, 'firstname']),
$this->getData(['user', $userId, 'lastname']), $this->getData(['user', $userId, 'lastname']),
$this->getData(['user', $userId, 'tags']),
]; ];
} }

View File

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

View File

@ -44,7 +44,7 @@
</div> </div>
</div> </div>
<?php if ($module::$courseUsers): ?> <?php if ($module::$courseUsers): ?>
<?php echo template::table([1, 4, 4, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom'], ['id' => 'dataTables']); ?> <?php echo template::table([1, 2, 3, 3, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom', 'Etiquettes'], ['id' => 'dataTables']); ?>
<?php else: ?> <?php else: ?>
<?php echo template::speech('Aucun inscrit'); ?> <?php echo template::speech('Aucun inscrit'); ?>
<?php endif; ?> <?php endif; ?>

View File

@ -45,7 +45,7 @@
</div> </div>
</div> </div>
<?php if ($module::$courseUsers): ?> <?php if ($module::$courseUsers): ?>
<?php echo template::table([1, 4, 4, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom'], ['id' => 'dataTables']); ?> <?php echo template::table([1, 2, 3, 3, 3], $module::$courseUsers, ['', 'Id', 'Prénom', 'Nom', 'Etiquettes'], ['id' => 'dataTables']); ?>
<?php else: ?> <?php else: ?>
<?php echo template::speech('Aucun inscrit'); ?> <?php echo template::speech('Aucun inscrit'); ?>
<?php endif; ?> <?php endif; ?>