Gestion des isncrits WIP
This commit is contained in:
parent
038611b390
commit
f15d317f02
@ -27,6 +27,7 @@ class course extends common
|
||||
'categoryAdd' => self::GROUP_ADMIN,
|
||||
'categoryDelete' => self::GROUP_ADMIN,
|
||||
'user' => self::GROUP_ADMIN,
|
||||
'userAdd' => self::GROUP_ADMIN,
|
||||
];
|
||||
|
||||
public static $courseAccess = [
|
||||
@ -46,6 +47,8 @@ class course extends common
|
||||
|
||||
public static $courseCategories = [];
|
||||
|
||||
public static $courseUsers = [];
|
||||
|
||||
public static $courses = [];
|
||||
|
||||
public static $swapMessage = [];
|
||||
@ -69,6 +72,11 @@ class course extends common
|
||||
$author,
|
||||
$description,
|
||||
'<a href="' . $categorieUrl . '" target="_blank">' . $categorieUrl . '</a>',
|
||||
template::button('categoryUser' . $courseId, [
|
||||
'href' => helper::baseUrl() . 'course/user/' . $courseId,
|
||||
'value' => template::ico('users'),
|
||||
'help' => 'Inscrits'
|
||||
]),
|
||||
template::button('courseEdit' . $courseId, [
|
||||
'href' => helper::baseUrl() . 'course/edit/' . $courseId,
|
||||
'value' => template::ico('pencil'),
|
||||
@ -295,7 +303,7 @@ class course extends common
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Catégorie'),
|
||||
'title' => helper::translate('Catégorie de cours'),
|
||||
'view' => 'category'
|
||||
]);
|
||||
}
|
||||
@ -351,6 +359,41 @@ class course extends common
|
||||
]);
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
$users = $this->getData(['enrolment', $this->getUrl(2)]);
|
||||
ksort($users);
|
||||
foreach ($users as $userId => $userValue) {
|
||||
self::$courseUsers[] = [
|
||||
$userId,
|
||||
$this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']),
|
||||
$userValue['lastPageId'],
|
||||
helper::dateUTF8('%d %B %Y - %H:%M',$userValue['lastDateVisited']),
|
||||
template::button('courseDelete' . $userId, [
|
||||
'class' => 'categoryDelete buttonRed',
|
||||
'href' => helper::baseUrl() . 'course/categoryDelete/' . $userId,
|
||||
'value' => template::ico('trash'),
|
||||
'help' => 'Supprimer'
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Inscrits'),
|
||||
'view' => 'user'
|
||||
]);
|
||||
}
|
||||
|
||||
public function userAdd()
|
||||
{
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Inscrire'),
|
||||
'view' => 'userAdd'
|
||||
]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Traitement du changement de langue
|
||||
*/
|
||||
|
@ -1,13 +1,13 @@
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('courseCategoryModulesBack', [
|
||||
<?php echo template::button('categoryBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'course',
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 offset10">
|
||||
<?php echo template::button('courseCategoryModulesAdd', [
|
||||
<?php echo template::button('categoryAdd', [
|
||||
'class' => 'buttonGreen',
|
||||
'href' => helper::baseUrl() . 'course/categoryAdd',
|
||||
'value' => template::ico('plus')
|
||||
|
@ -6,14 +6,7 @@
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 offset8">
|
||||
<?php echo template::button('courseUser', [
|
||||
'href' => helper::baseUrl() . 'course/user',
|
||||
'value' => template::ico('users'),
|
||||
'help' => 'Etudiants inscrits'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<div class="col1 offset9">
|
||||
<?php echo template::button('courseCategory', [
|
||||
'href' => helper::baseUrl() . 'course/category',
|
||||
'value' => template::ico('table'),
|
||||
@ -29,7 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php if($module::$courses): ?>
|
||||
<?php echo template::table([2, 1, 3, 4, 1, 1], $module::$courses, ['Titre court', 'Auteur', 'Description', 'Lien direct', '', '']); ?>
|
||||
<?php echo template::table([2, 2, 2, 3, 1, 1, 1], $module::$courses, ['Titre court', 'Auteur', 'Description', 'Lien direct', '', '', '']); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Aucun Cours'); ?>
|
||||
<?php endif; ?>
|
||||
|
@ -0,0 +1,22 @@
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('courseUserBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'course',
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 offset10">
|
||||
<?php echo template::button('courseUserAdd', [
|
||||
'class' => 'buttonGreen',
|
||||
'href' => helper::baseUrl() . 'course/userAdd',
|
||||
'value' => template::ico('plus')
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?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 else: ?>
|
||||
<?php echo template::speech('Aucun inscrit'); ?>
|
||||
<?php endif; ?>
|
18
core/module/course/view/userAdd/userAdd.css
Normal file
18
core/module/course/view/userAdd/userAdd.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
|
||||
*/
|
22
core/module/course/view/userAdd/userAdd.php
Normal file
22
core/module/course/view/userAdd/userAdd.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php echo template::formOpen('courseUserAddForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('courseUserAddBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'course',
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
<?php echo template::submit('courseUserAddSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Utilisateurs'); ?>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user