forked from ZwiiCMS-Team/ZwiiCampus
v29 pourcentage de progression
This commit is contained in:
parent
ae372e1d9c
commit
c54da11107
@ -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.28';
|
const ZWII_VERSION = '1.0.29';
|
||||||
|
|
||||||
// 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/';
|
||||||
|
@ -398,13 +398,23 @@ class course extends common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Liste alphabétique
|
// Liste alphabétique
|
||||||
self::$alphabet = range('A', 'Z');
|
self::$alphabet = range('A', 'Z');
|
||||||
$alphabet = range('A', 'Z');
|
$alphabet = range('A', 'Z');
|
||||||
self::$alphabet = array_combine($alphabet, self::$alphabet);
|
self::$alphabet = array_combine($alphabet, self::$alphabet);
|
||||||
self::$alphabet = array_merge(['all' => 'Tout'], self::$alphabet);
|
self::$alphabet = array_merge(['all' => 'Tout'], self::$alphabet);
|
||||||
// Liste des inscrits dans le cours sélectionné.
|
|
||||||
|
// Cours sélectionné
|
||||||
$courseId = $this->getUrl(2);
|
$courseId = $this->getUrl(2);
|
||||||
|
|
||||||
|
// Statistiques du cours sélectionné calcul du nombre de pages
|
||||||
|
$currentSite = self::$siteContent;
|
||||||
|
$this->initDB('page', $courseId);
|
||||||
|
$sumPages = count($this->getData(['page']));
|
||||||
|
self::$siteContent = $currentSite;
|
||||||
|
|
||||||
|
// Liste des inscrits dans le cours sélectionné.
|
||||||
$users = $this->getData(['enrolment', $courseId]);
|
$users = $this->getData(['enrolment', $courseId]);
|
||||||
ksort($users);
|
ksort($users);
|
||||||
foreach ($users as $userId => $userValue) {
|
foreach ($users as $userId => $userValue) {
|
||||||
@ -418,23 +428,34 @@ class course extends common
|
|||||||
$profil = (string) $this->getData(['user', $userId, 'profil']);
|
$profil = (string) $this->getData(['user', $userId, 'profil']);
|
||||||
$firstName = $this->getData(['user', $userId, 'firstname']);
|
$firstName = $this->getData(['user', $userId, 'firstname']);
|
||||||
$lastName = $this->getData(['user', $userId, 'lastname']);
|
$lastName = $this->getData(['user', $userId, 'lastname']);
|
||||||
if ( $this->getInput('courseFilterGroup', helper::FILTER_INT) > 0
|
if (
|
||||||
&& $this->getInput('courseFilterGroup', helper::FILTER_STRING_SHORT) !== $group . $profil )
|
$this->getInput('courseFilterGroup', helper::FILTER_INT) > 0
|
||||||
|
&& $this->getInput('courseFilterGroup', helper::FILTER_STRING_SHORT) !== $group . $profil
|
||||||
|
)
|
||||||
continue;
|
continue;
|
||||||
// Première lettre du prénom
|
// Première lettre du prénom
|
||||||
if ($this->getInput('courseFilterFirstName', helper::FILTER_STRING_SHORT) !== 'all'
|
if (
|
||||||
&& $this->getInput('courseFilterFirstName', helper::FILTER_STRING_SHORT) !== strtoupper(substr($firstName, 0, 1)))
|
$this->getInput('courseFilterFirstName', helper::FILTER_STRING_SHORT) !== 'all'
|
||||||
|
&& $this->getInput('courseFilterFirstName', helper::FILTER_STRING_SHORT) !== strtoupper(substr($firstName, 0, 1))
|
||||||
|
)
|
||||||
continue;
|
continue;
|
||||||
// Première lettre du nom
|
// Première lettre du nom
|
||||||
if ($this->getInput('courseFilterLastName', helper::FILTER_STRING_SHORT) !== 'all'
|
if (
|
||||||
&& $this->getInput('courseFilterLastName', helper::FILTER_STRING_SHORT) !== strtoupper(substr($lastName, 0, 1)))
|
$this->getInput('courseFilterLastName', helper::FILTER_STRING_SHORT) !== 'all'
|
||||||
|
&& $this->getInput('courseFilterLastName', helper::FILTER_STRING_SHORT) !== strtoupper(substr($lastName, 0, 1))
|
||||||
|
)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Taux de parcours
|
||||||
|
$viewPages = count($this->getData(['enrolment', $courseId, $userId, 'history']));
|
||||||
|
// Construction tu tableau
|
||||||
self::$courseUsers[] = [
|
self::$courseUsers[] = [
|
||||||
$userId,
|
$userId,
|
||||||
$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),
|
||||||
|
($viewPages * 100)/ $sumPages . ' %',
|
||||||
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,
|
||||||
|
@ -55,7 +55,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, 3, 1], $module::$courseUsers, ['Id', 'Nom Prénom', 'Id dernière page', 'Date - Heure', '']); ?>
|
<?php echo template::table([2, 3, 3, 2, 1, 1], $module::$courseUsers, ['Id', 'Nom Prénom', 'Id dernière page', 'Date - Heure', 'Progression', '']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun inscrit'); ?>
|
<?php echo template::speech('Aucun inscrit'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
Loading…
Reference in New Issue
Block a user