Rôles renommés, fonctions pour déterminer les droits d'accès à un cours, le sous ensembles teacher et students sont supprimés dans enrolment, le profil et le groupe moodle comptent

This commit is contained in:
Fred Tempez 2023-09-21 19:32:30 +02:00
parent 0e6b843b1d
commit 727f8123c0
23 changed files with 104 additions and 134 deletions

View File

@ -345,7 +345,7 @@ class layout extends common
}
// Affichage de la barre de membre simple
if (
$this->getUser('group') >= self::GROUP_STUDENT && $this->getUser('group') < self::GROUP_ADMIN
$this->getUser('group') >= self::GROUP_TUTOR && $this->getUser('group') < self::GROUP_ADMIN
&& $this->getData(['theme', 'footer', 'memberBar']) === true
) {
$items .= '<span id="footerDisplayMemberAccount"';
@ -506,11 +506,11 @@ class layout extends common
}
// Commandes pour les membres simples
if (
$this->getUser('group') >= self::GROUP_STUDENT && $this->getUser('group') < self::GROUP_ADMIN
$this->getUser('group') >= self::GROUP_TUTOR && $this->getUser('group') < self::GROUP_ADMIN
&& $this->getData(['theme', 'menu', 'memberBar']) === true
) {
if (
$this->getUser('group') >= self::GROUP_STUDENT &&
$this->getUser('group') >= self::GROUP_TUTOR &&
$this->getUser('permission', 'filemanager') === true
) {
$itemsRight .= '<li>' . template::ico('folder', [

View File

@ -527,7 +527,7 @@ class core extends common
$access = null;
if ($this->getData(['page', $this->getUrl(0)]) !== null) {
if (
$this->getData(['page', $this->getUrl(0), 'group']) === self::GROUP_VISITOR
$this->getData(['page', $this->getUrl(0), 'group']) === self::GROUP_STUDENT
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
// and $this->getUser('group') >= $this->getData(['page', $this->getUrl(0), 'group'])
// Modification qui tient compte du profil de la page
@ -705,7 +705,7 @@ class core extends common
$output = $module->output;
// Check le groupe de l'utilisateur
if (
($module::$actions[$action] === self::GROUP_VISITOR
($module::$actions[$action] === self::GROUP_STUDENT
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') >= $module::$actions[$action]
and $this->getUser('permission', $moduleId, $action)

View File

@ -25,8 +25,8 @@ class common
const DISPLAY_LAYOUT_MAIN = 4;
const DISPLAY_LAYOUT_LIGHT = 5;
const GROUP_BANNED = -1;
const GROUP_VISITOR = 0;
const GROUP_STUDENT = 1;
const GROUP_STUDENT = 0;
const GROUP_TUTOR = 1;
const GROUP_TEACHER = 2;
// Groupe MODERATOR, compatibilité avec les anciens modules :
const GROUP_ADMIN = 3;
@ -94,14 +94,6 @@ class common
'theme',
'user'
];
/*
Cette variable est supprimée du test dans le routeur.
public static $accessExclude = [
'login',
'logout',
'maintenance',
];
*/
private $data = [];
private $hierarchy = [
'all' => [],
@ -153,25 +145,25 @@ class common
];
public static $groups = [
self::GROUP_BANNED => 'Banni',
self::GROUP_VISITOR => 'Visiteur',
self::GROUP_STUDENT => 'Apprenant',
self::GROUP_TUTOR => 'Tuteur',
self::GROUP_TEACHER => 'Enseignant',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupEdits = [
self::GROUP_BANNED => 'Banni',
self::GROUP_STUDENT => 'Apprenant',
self::GROUP_TUTOR => 'Tuteur',
self::GROUP_TEACHER => 'Enseignant',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupNews = [
self::GROUP_STUDENT => 'Apprenant',
self::GROUP_TUTOR => 'Tuteur',
self::GROUP_TEACHER => 'Enseignant',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupPublics = [
self::GROUP_VISITOR => 'Visiteur',
self::GROUP_STUDENT => 'Apprenant',
self::GROUP_TUTOR => 'Tuteur',
self::GROUP_TEACHER => 'Enseignant',
self::GROUP_ADMIN => 'Administrateur'
];
@ -453,7 +445,6 @@ class common
// Mise à jour des données core
include('core/include/update.inc.php');
}
@ -720,7 +711,7 @@ class common
// Page parent
$this->getData(['page', $pageId, 'parentPageId']) === ''
// Ignore les pages dont l'utilisateur n'a pas accès
and ($this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR
and ($this->getData(['page', $pageId, 'group']) === self::GROUP_STUDENT
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
//and $this->getUser('group') >= $this->getData(['page', $pageId, 'group'])
// Modification qui tient compte du profil de la page
@ -745,8 +736,8 @@ class common
$parentId = $this->getData(['page', $pageId, 'parentPageId'])
// Ignore les pages dont l'utilisateur n'a pas accès
and (
($this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR
and $this->getData(['page', $parentId, 'group']) === self::GROUP_VISITOR
($this->getData(['page', $pageId, 'group']) === self::GROUP_STUDENT
and $this->getData(['page', $parentId, 'group']) === self::GROUP_STUDENT
)
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
//and $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])
@ -1439,11 +1430,12 @@ class common
return $c;
case self::GROUP_TEACHER:
foreach ($c as $courseId => $value) {
if ($this->getData(['enrolment', $courseId, 'teacher']) !== $userId) {
if ($this->getData(['enrolment', $courseId]) !== $userId) {
unset($c[$courseId]);
}
}
return $c;
case self::GROUP_TUTOR:
case self::GROUP_STUDENT:
foreach ($c as $courseId => $value) {
$students = $this->getData(['enrolment', $courseId, 'students']);
@ -1463,45 +1455,31 @@ class common
* @param string $userId identifiant de l'utilisateur
* @param string $courseId identifiant du cours sollicité
*/
public function courseUserEnrolment($courseId, $userId)
public function courseUserEnrolment($courseId, $userId = null)
{
// Modalité d'ouverture du cours
// L'utilisateur n'est pas admin
switch ($this->getData(['user', $userId, 'group'])) {
$group = $userId ? $this->getData(['user', $userId, 'group']) : false;
switch ($group) {
case self::GROUP_ADMIN:
return true;
$r = true;
break;
case self::GROUP_TEACHER:
return ($userId === $this->getData(['enrolment', $courseId, 'teacher']));
$r = in_array($userId, array_keys($this->getData(['enrolment', $courseId])));
break;
case self::GROUP_TUTOR:
case self::GROUP_STUDENT:
return (
// Le cours est-il ouvert ?
$this->courseIsAvailable($courseId) &&
// L'étudiant est inscrit ?
array_search($userId, $this->getData(['enrolment', $courseId, 'students']))
);
case self::GROUP_VISITOR:
// Le cours est-il ouvert ?
return (
$this->courseIsAvailable($courseId) &&
$this->getData(['course', $courseId, 'enrolment']) === self::COURSE_ENROLMENT_GUEST
);
$r = $this->courseIsAvailable($courseId) &&
(in_array($userId, array_keys($this->getData(['enrolment', $courseId]))) ||
$this->getData(['course', $courseId, 'enrolment']) <= self::COURSE_ENROLMENT_SELF);
break;
// Visiteur non connecté
case false:
$r = $this->courseIsAvailable($courseId) &&
$this->getData(['course', $courseId, 'enrolment']) === self::COURSE_ENROLMENT_GUEST;
break;
default:
return false;
}
if ($this->getData(['user', $userId, 'group']) < self::GROUP_ADMIN) {
if (
// le cours est fermé
$this->getData(['course', $courseId, 'access']) === self::COURSE_ACCESS_CLOSE
||
// Le cours ets ouvert entre deux dates
($this->getData(['course', $courseId, 'access']) &&
($this->getData(['course', $courseId, 'openingDate']) >= time() ||
$this->getData(['course', $courseId, 'clodingDate']) <= time())
)
) {
return;
}
$r = false;
}
return $r;
}
/**

View File

@ -32,7 +32,7 @@
</head>
<body>
<!-- Barre d'administration -->
<?php if ($this->getUser('group') > self::GROUP_STUDENT) : ?>
<?php if ($this->getUser('group') > self::GROUP_TUTOR) : ?>
<?php $layout->showBar(); ?>
<?php endif; ?>
<!-- Notifications -->
@ -45,7 +45,7 @@
$this->getData(['theme', 'menu', 'position']) === 'top'
and $this->getData(['theme', 'menu', 'fixed']) === true
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') > self::GROUP_STUDENT
and $this->getUser('group') > self::GROUP_TUTOR
) {
echo '<nav id="navfixedconnected" >';
} else {

View File

@ -21,8 +21,8 @@ class course extends common
'edit' => self::GROUP_ADMIN,
'add' => self::GROUP_ADMIN,
'delete' => self::GROUP_ADMIN,
'swap' => self::GROUP_VISITOR,
'change' => self::GROUP_VISITOR,
'swap' => self::GROUP_STUDENT,
'change' => self::GROUP_STUDENT,
];
public static $courseAccess = [
@ -42,6 +42,7 @@ class course extends common
public static $courses = [];
public static $changeMessages = [];
public function index()
@ -115,10 +116,7 @@ class course extends common
$this->setData([
'enrolment',
$courseId,
[
'teacher' => $author,
'students' => []
]
[]
]);
// Valeurs en sortie
@ -205,17 +203,6 @@ class course extends common
]
]);
// BDD des inscrits
$students = is_null($this->getData(['enrolment', $courseId, 'students'])) ? [] : $this->getData(['enrolment', $courseId, 'students']);
$this->setData([
'enrolment',
$courseId,
[
'teacher' => $author,
'students' => $students
]
]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'course',
@ -249,14 +236,21 @@ class course extends common
if (
$this->isPost() ||
$this->getUrl(2) === 'home'
) {
$this->swap();
}
// Bouton de connexion ou d'inscription
// C'est un prof ou un admin
self::$changeMessages = $this->getUser('group') >= self::GROUP_TEACHER
? 'Se connecter'
// C'est un étudiant ou un visiteur
: '';
// Valeurs en sortie
$this->addOutput([
'title' => sprintf(helper::translate('Accéder au cours %s'), $this->getData(['course', $this->getUrl(2), 'shortTitle' ])),
'title' => sprintf(helper::translate('Accéder au cours %s'), $this->getData(['course', $this->getUrl(2), 'shortTitle'])),
'view' => 'change',
'display' => self::DISPLAY_LAYOUT_LIGHT,
]);

View File

@ -3,7 +3,7 @@
<div class="col12">
<?php echo "<h3>Auteur : " . $this->getData(['course', $this->getUrl(2), 'author' ]) . "</h3>"; ?>
<?php echo "<p> Description : " . $this->getData(['course', $this->getUrl(2), 'description' ]) . "</p>"; ?>
<?php echo "<p> Disponibilité : " . $module::$courseAccess[$this->getData(['course', $this->getUrl(2), 'access' ])]. "</p>";?>
<?php echo "<p> Disponibilité : " . $module::$courseAccess[$this->getData(['course', $this->getUrl(2), 'access' ])] . "</p>";?>
<?php echo "<p> Inscription : " . $module::$courseEnrolment[$this->getData(['course', $this->getUrl(2), 'enrolment' ])]. "</p>";?>
</div>
@ -18,6 +18,7 @@
<div class="col3 offset7">
<?php echo template::submit('courseChangeSubmit', [
'value' => 'Se connecter',
'disabled' => !$this->courseIsAvailable($this->getUrl(2)),
'ico' => ''
]); ?>
</div>

View File

@ -18,8 +18,8 @@ class install extends common
{
public static $actions = [
'index' => self::GROUP_VISITOR,
"postinstall" => self::GROUP_VISITOR,
'index' => self::GROUP_STUDENT,
"postinstall" => self::GROUP_STUDENT,
'steps' => self::GROUP_ADMIN,
'update' => self::GROUP_ADMIN
];

View File

@ -323,7 +323,7 @@ class init extends common
'comment' => 'Accès désactivé',
],
'0' => [
'name' => 'Visiteur',
'name' => 'Apprenant',
'readonly' => true,
'permanent' => true,
'comment' => 'Accède au site',
@ -687,7 +687,7 @@ class init extends common
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 1,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Accueil',
@ -718,7 +718,7 @@ class init extends common
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 6,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Contact',
@ -749,7 +749,7 @@ class init extends common
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 0,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Mentions légales',
@ -781,7 +781,7 @@ class init extends common
'modulePosition' => '',
'parentPageId' => '',
'position' => 0,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Maintenance en cours',
@ -813,7 +813,7 @@ class init extends common
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 0,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Erreur 403',
@ -844,7 +844,7 @@ class init extends common
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 0,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Erreur 404',
@ -989,7 +989,7 @@ class init extends common
'modulePosition' => 'bottom',
'parentPageId' => '',
'position' => 1,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'profil' => 0,
'targetBlank' => false,
'title' => 'Accueil',

View File

@ -17,7 +17,7 @@ class maintenance extends common
{
public static $actions = [
'index' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT
];
/**

View File

@ -155,7 +155,7 @@ class page extends common
'parentPageId' => '',
'modulePosition' => 'bottom',
'position' => 0,
'group' => self::GROUP_VISITOR,
'group' => self::GROUP_STUDENT,
'targetBlank' => false,
'title' => $pageTitle,
'shortTitle' => $pageTitle,
@ -564,7 +564,7 @@ class page extends common
// Profils installés
// Profils disponibles
foreach ($this->getData(['profil']) as $profilId => $profilData) {
if ($profilId < self::GROUP_STUDENT) {
if ($profilId < self::GROUP_TUTOR) {
continue;
}
if ($profilId === self::GROUP_ADMIN) {

View File

@ -389,8 +389,8 @@
</div>
<div class="col6">
<div class="pageEditGroupProfil displayNone"
id="pageEditGroupProfil<?php echo self::GROUP_STUDENT; ?>">
<?php echo template::select('pageEditProfil' . self::GROUP_STUDENT, $module::$userProfils[self::GROUP_STUDENT], [
id="pageEditGroupProfil<?php echo self::GROUP_TUTOR; ?>">
<?php echo template::select('pageEditProfil' . self::GROUP_TUTOR, $module::$userProfils[self::GROUP_TUTOR], [
'label' => 'Profil minimal pour accéder à la page',
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
'help' => 'Les profils de niveau supérieur accèdent à la page.',

View File

@ -16,7 +16,7 @@
class sitemap extends common
{
public static $actions = [
'index' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT
];
public static $siteMap = '';

View File

@ -22,11 +22,11 @@ class user extends common
'import' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN,
'template' => self::GROUP_ADMIN,
'edit' => self::GROUP_STUDENT,
'logout' => self::GROUP_STUDENT,
'forgot' => self::GROUP_VISITOR,
'login' => self::GROUP_VISITOR,
'reset' => self::GROUP_VISITOR,
'edit' => self::GROUP_TUTOR,
'logout' => self::GROUP_TUTOR,
'forgot' => self::GROUP_STUDENT,
'login' => self::GROUP_STUDENT,
'reset' => self::GROUP_STUDENT,
'profil' => self::GROUP_ADMIN,
'profilEdit' => self::GROUP_ADMIN,
'profilAdd' => self::GROUP_ADMIN,
@ -65,7 +65,7 @@ class user extends common
];
public static $groupProfils = [
self::GROUP_STUDENT => 'Membre',
self::GROUP_TUTOR => 'Membre',
self::GROUP_TEACHER => 'Éditeur'
];
@ -162,7 +162,7 @@ class user extends common
// Profils disponibles
foreach ($this->getData(['profil']) as $profilId => $profilData) {
if ($profilId < self::GROUP_STUDENT) {
if ($profilId < self::GROUP_TUTOR) {
continue;
}
if ($profilId === self::GROUP_ADMIN) {
@ -242,7 +242,7 @@ class user extends common
and (
// Impossible de s'auto-éditer
($this->getUser('id') === $this->getUrl(2)
and $this->getUrl('group') <= self::GROUP_VISITOR
and $this->getUrl('group') <= self::GROUP_STUDENT
)
// Impossible d'éditer un autre utilisateur
or ($this->getUrl('group') < self::GROUP_TEACHER)
@ -354,7 +354,7 @@ class user extends common
// Profils disponibles
foreach ($this->getData(['profil']) as $profilId => $profilData) {
if ($profilId < self::GROUP_STUDENT) {
if ($profilId < self::GROUP_TUTOR) {
continue;
}
if ($profilId === self::GROUP_ADMIN) {
@ -473,7 +473,7 @@ class user extends common
// Membres sans permissions spécifiques
if (
$groupId == self::GROUP_BANNED ||
$groupId == self::GROUP_VISITOR ||
$groupId == self::GROUP_STUDENT ||
$groupId == self::GROUP_ADMIN
) {
self::$userGroups[$groupId] = [
@ -492,7 +492,7 @@ class user extends common
])
];
} elseif (
$groupId == self::GROUP_STUDENT ||
$groupId == self::GROUP_TUTOR ||
$groupId == self::GROUP_TEACHER
) {
// Enumérer les sous groupes MEMBER et MODERATOR
@ -871,7 +871,7 @@ class user extends common
($this->getData(['user', $userId, 'connectTimeout']) + $this->getData(['config', 'connect', 'timeout'])) < time()
and $this->getData(['user', $userId, 'connectFail']) < $this->getData(['config', 'connect', 'attempt'])
and password_verify(html_entity_decode($this->getInput('userLoginPassword', helper::FILTER_STRING_SHORT, true)), $this->getData(['user', $userId, 'password']))
and $this->getData(['user', $userId, 'group']) >= self::GROUP_STUDENT
and $this->getData(['user', $userId, 'group']) >= self::GROUP_TUTOR
and $captcha === true
) {
// RAZ

View File

@ -91,13 +91,13 @@
<div class="col6">
<?php echo template::select('userAddGroup', self::$groupNews, [
'label' => 'Groupe',
'selected' => self::GROUP_STUDENT
'selected' => self::GROUP_TUTOR
]); ?>
</div>
<div class="col6">
<div class="userAddGroupProfil displayNone"
id="userAddGroupProfil<?php echo self::GROUP_STUDENT; ?>">
<?php echo template::select('userAddProfil' . self::GROUP_STUDENT, $module::$userProfils[self::GROUP_STUDENT], [
id="userAddGroupProfil<?php echo self::GROUP_TUTOR; ?>">
<?php echo template::select('userAddProfil' . self::GROUP_TUTOR, $module::$userProfils[self::GROUP_TUTOR], [
'label' => 'Profil',
]); ?>
</div>
@ -110,9 +110,9 @@
</div>
</div>
<div class="row">
<div id="userCommentProfil<?php echo self::GROUP_STUDENT; ?>" class="col12 displayNone userCommentProfil">
<?php echo template::textarea('useraddProfilComment' . self::GROUP_STUDENT, [
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_STUDENT])
<div id="userCommentProfil<?php echo self::GROUP_TUTOR; ?>" class="col12 displayNone userCommentProfil">
<?php echo template::textarea('useraddProfilComment' . self::GROUP_TUTOR, [
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_TUTOR])
]);
?>
</div>

View File

@ -116,8 +116,8 @@
</div>
<div class="col6">
<div class="userEditGroupProfil displayNone"
id="userEditGroupProfil<?php echo self::GROUP_STUDENT; ?>">
<?php echo template::select('userEditProfil' . self::GROUP_STUDENT, $module::$userProfils[self::GROUP_STUDENT], [
id="userEditGroupProfil<?php echo self::GROUP_TUTOR; ?>">
<?php echo template::select('userEditProfil' . self::GROUP_TUTOR, $module::$userProfils[self::GROUP_TUTOR], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
@ -135,10 +135,10 @@
</div>
<div class="row">
<div class="col12">
<div id="userCommentProfil<?php echo self::GROUP_STUDENT; ?>"
<div id="userCommentProfil<?php echo self::GROUP_TUTOR; ?>"
class="col12 userCommentProfil">
<?php echo template::textarea('userEditProfilComment' . self::GROUP_STUDENT, [
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_STUDENT]),
<?php echo template::textarea('userEditProfilComment' . self::GROUP_TUTOR, [
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_TUTOR]),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]);
?>

View File

@ -36,8 +36,8 @@ class blog extends common
'option' => self::GROUP_TEACHER,
'delete' => self::GROUP_TEACHER,
'edit' => self::GROUP_TEACHER,
'index' => self::GROUP_VISITOR,
'rss' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT,
'rss' => self::GROUP_STUDENT
];
public static $articles = [];

View File

@ -27,7 +27,7 @@ class form extends common
'data' => self::GROUP_TEACHER,
'delete' => self::GROUP_TEACHER,
'deleteall' => self::GROUP_TEACHER,
'index' => self::GROUP_VISITOR,
'index' => self::GROUP_STUDENT,
'export2csv' => self::GROUP_TEACHER,
];

View File

@ -53,7 +53,7 @@ class gallery extends common
'add' => self::GROUP_TEACHER,
'theme' => self::GROUP_TEACHER,
'option' => self::GROUP_TEACHER,
'index' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT
];
public static $sort = [

View File

@ -28,8 +28,8 @@ class news extends common
// paramétrage des news
'delete' => self::GROUP_TEACHER,
'edit' => self::GROUP_TEACHER,
'index' => self::GROUP_VISITOR,
'rss' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT,
'rss' => self::GROUP_STUDENT
];
public static $news = [];

View File

@ -22,7 +22,7 @@ class redirection extends common
public static $actions = [
'config' => self::GROUP_TEACHER,
'index' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT
];

View File

@ -25,7 +25,7 @@ class search extends common
const DATADIRECTORY = self::DATA_DIR . 'search/';
public static $actions = [
'index' => self::GROUP_VISITOR,
'index' => self::GROUP_STUDENT,
'config' => self::GROUP_TEACHER
];

View File

@ -24,7 +24,7 @@ class slider extends common
'theme' => self::GROUP_MODERATOR,
'delete' => self::GROUP_MODERATOR,
'dirs' => self::GROUP_MODERATOR,
'index' => self::GROUP_VISITOR
'index' => self::GROUP_STUDENT
];
const VERSION = '6.0';

View File

@ -22,13 +22,10 @@ BDD contenant les informations sur le cours
- 3 manuel, le prof inscrits
- enrolmentKey clé d'inscription, si non vide
data/course/enrolment.json
data/enrolment.json
Détermine la liste des inscrits
- userid
- userGroup
- userProfil
- lastPageId derrière page visitée
- lastDate date de la dernière vue
Règle de gestion :
- lastPageId derrière page visitée
- lastDate date de la dernière vue
Le profil Zwii détermine le rôle de l'utilisateur