forked from ZwiiCMS-Team/ZwiiCampus
Nom des groupes standard
This commit is contained in:
parent
4b51a26669
commit
81b8f32b52
@ -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_MEMBER && $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_MEMBER && $this->getUser('group') < self::GROUP_ADMIN
|
||||
&& $this->getData(['theme', 'menu', 'memberBar']) === true
|
||||
) {
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_STUDENT &&
|
||||
$this->getUser('group') >= self::GROUP_MEMBER &&
|
||||
$this->getUser('permission', 'filemanager') === true
|
||||
) {
|
||||
$itemsRight .= '<li>' . template::ico('folder', [
|
||||
@ -571,7 +571,7 @@ class layout extends common
|
||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) or ($this->getData(['page', $parentPageId, 'disable']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') < self::GROUP_TEACHER
|
||||
and $this->getUser('group') < self::GROUP_EDITOR
|
||||
)
|
||||
) {
|
||||
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
||||
@ -637,7 +637,7 @@ class layout extends common
|
||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) or ($this->getData(['page', $childKey, 'disable']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') < self::GROUP_TEACHER
|
||||
and $this->getUser('group') < self::GROUP_EDITOR
|
||||
)
|
||||
) {
|
||||
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
||||
@ -899,7 +899,7 @@ class layout extends common
|
||||
* Les enseignants les cours dont ils sont auteurs
|
||||
* Les étudiants les cours dans lesquels ils sont inscrits
|
||||
*/
|
||||
if ($this->getUser('group') >= self::GROUP_TEACHER) {
|
||||
if ($this->getUser('group') >= self::GROUP_EDITOR) {
|
||||
if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) {
|
||||
$leftItems .= '<li><select id="barSelectCourse" >';
|
||||
$leftItems .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
|
||||
@ -917,7 +917,7 @@ class layout extends common
|
||||
]) . '</li>';
|
||||
}
|
||||
// Liste des pages
|
||||
if ($this->getUser('group') >= self::GROUP_TEACHER) {
|
||||
if ($this->getUser('group') >= self::GROUP_EDITOR) {
|
||||
$leftItems .= '<li><select id="barSelectPage">';
|
||||
$leftItems .= '<option value="">' . helper::translate('Pages du site') . '</option>';
|
||||
$leftItems .= '<optgroup label="' . helper::translate('Pages orphelines') . '">';
|
||||
@ -1030,7 +1030,7 @@ class layout extends common
|
||||
// Items de droite
|
||||
$rightItems = '';
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_TEACHER
|
||||
$this->getUser('group') >= self::GROUP_EDITOR
|
||||
&& $this->getUser(
|
||||
'permission',
|
||||
'filemanager'
|
||||
@ -1090,7 +1090,7 @@ class layout extends common
|
||||
}
|
||||
}
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_TEACHER
|
||||
$this->getUser('group') >= self::GROUP_EDITOR
|
||||
&& $this->getUser('permission', 'user', 'edit')
|
||||
|
||||
) {
|
||||
@ -1177,7 +1177,7 @@ class layout extends common
|
||||
$vars .= 'var baseUrlQs = ' . json_encode(helper::baseUrl()) . ';';
|
||||
if (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') >= self::GROUP_TEACHER
|
||||
and $this->getUser('group') >= self::GROUP_EDITOR
|
||||
) {
|
||||
$vars .= 'var privateKey = ' . json_encode(md5_file(self::DATA_DIR . 'core.json')) . ';';
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ class core extends common
|
||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') < self::GROUP_TEACHER
|
||||
and $this->getUser('group') < self::GROUP_EDITOR
|
||||
)
|
||||
) {
|
||||
$access = false;
|
||||
|
@ -26,8 +26,8 @@ class common
|
||||
const DISPLAY_LAYOUT_LIGHT = 5;
|
||||
const GROUP_BANNED = -1;
|
||||
const GROUP_VISITOR = 0;
|
||||
const GROUP_STUDENT = 1;
|
||||
const GROUP_TEACHER = 2;
|
||||
const GROUP_MEMBER = 1;
|
||||
const GROUP_EDITOR = 2;
|
||||
// Groupe MODERATOR, compatibilité avec les anciens modules :
|
||||
const GROUP_ADMIN = 3;
|
||||
const SIGNATURE_ID = 1;
|
||||
@ -146,25 +146,25 @@ class common
|
||||
public static $groups = [
|
||||
self::GROUP_BANNED => 'Banni',
|
||||
self::GROUP_VISITOR => 'Visiteur',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_MEMBER => 'Etudiant',
|
||||
self::GROUP_EDITOR => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
public static $groupEdits = [
|
||||
self::GROUP_BANNED => 'Banni',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_MEMBER => 'Etudiant',
|
||||
self::GROUP_EDITOR => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
public static $groupNews = [
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_MEMBER => 'Etudiant',
|
||||
self::GROUP_EDITOR => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
public static $groupPublics = [
|
||||
self::GROUP_VISITOR => 'Visiteur',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_MEMBER => 'Etudiant',
|
||||
self::GROUP_EDITOR => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
|
||||
@ -1428,14 +1428,14 @@ class common
|
||||
switch ($userStatus) {
|
||||
case self::GROUP_ADMIN:
|
||||
return $c;
|
||||
case self::GROUP_TEACHER:
|
||||
case self::GROUP_EDITOR:
|
||||
foreach ($c as $courseId => $value) {
|
||||
if ($this->getData(['enrolment', $courseId]) !== $userId) {
|
||||
unset($c[$courseId]);
|
||||
}
|
||||
}
|
||||
return $c;
|
||||
case self::GROUP_STUDENT:
|
||||
case self::GROUP_MEMBER:
|
||||
case self::GROUP_VISITOR:
|
||||
foreach ($c as $courseId => $value) {
|
||||
$students = $this->getData(['enrolment', $courseId, 'students']);
|
||||
@ -1462,10 +1462,10 @@ class common
|
||||
case self::GROUP_ADMIN:
|
||||
$r = true;
|
||||
break;
|
||||
case self::GROUP_TEACHER:
|
||||
case self::GROUP_EDITOR:
|
||||
$r = in_array($userId, array_keys($this->getData(['enrolment', $courseId])));
|
||||
break;
|
||||
case self::GROUP_STUDENT:
|
||||
case self::GROUP_MEMBER:
|
||||
$r = $this->courseIsAvailable($courseId) &&
|
||||
(in_array($userId, array_keys($this->getData(['enrolment', $courseId]))) ||
|
||||
$this->getData(['course', $courseId, 'enrolment']) <= self::COURSE_ENROLMENT_SELF);
|
||||
|
@ -32,7 +32,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- Barre d'administration -->
|
||||
<?php if ($this->getUser('group') > self::GROUP_STUDENT) : ?>
|
||||
<?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?>
|
||||
<?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_MEMBER
|
||||
) {
|
||||
echo '<nav id="navfixedconnected" >';
|
||||
} else {
|
||||
|
@ -150,7 +150,7 @@ class course extends common
|
||||
// Le cours n'existe pas
|
||||
$this->getData(['course', $this->getUrl(2)]) === null
|
||||
// Groupe insuffisant
|
||||
and ($this->getUrl('group') < self::GROUP_TEACHER)
|
||||
and ($this->getUrl('group') < self::GROUP_EDITOR)
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -243,7 +243,7 @@ class course extends common
|
||||
|
||||
// Bouton de connexion ou d'inscription
|
||||
// C'est un prof ou un admin
|
||||
self::$changeMessages = $this->getUser('group') >= self::GROUP_TEACHER
|
||||
self::$changeMessages = $this->getUser('group') >= self::GROUP_EDITOR
|
||||
? 'Se connecter'
|
||||
// C'est un étudiant ou un visiteur
|
||||
: '';
|
||||
|
@ -18,12 +18,12 @@ class page extends common
|
||||
{
|
||||
|
||||
public static $actions = [
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'duplicate' => self::GROUP_TEACHER,
|
||||
'jsEditor' => self::GROUP_TEACHER,
|
||||
'cssEditor' => self::GROUP_TEACHER
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'duplicate' => self::GROUP_EDITOR,
|
||||
'jsEditor' => self::GROUP_EDITOR,
|
||||
'cssEditor' => self::GROUP_EDITOR
|
||||
];
|
||||
public static $pagesNoParentId = [
|
||||
'' => 'Aucune'
|
||||
@ -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_MEMBER) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
|
@ -389,16 +389,16 @@
|
||||
</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_MEMBER; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
'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.',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="pageEditGroupProfil displayNone"
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_TEACHER; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_TEACHER, $module::$userProfils[self::GROUP_TEACHER], [
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
'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.',
|
||||
|
@ -22,8 +22,8 @@ class user extends common
|
||||
'import' => self::GROUP_ADMIN,
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'template' => self::GROUP_ADMIN,
|
||||
'edit' => self::GROUP_STUDENT,
|
||||
'logout' => self::GROUP_STUDENT,
|
||||
'edit' => self::GROUP_MEMBER,
|
||||
'logout' => self::GROUP_MEMBER,
|
||||
'forgot' => self::GROUP_VISITOR,
|
||||
'login' => self::GROUP_VISITOR,
|
||||
'reset' => self::GROUP_VISITOR,
|
||||
@ -65,8 +65,8 @@ class user extends common
|
||||
];
|
||||
|
||||
public static $groupProfils = [
|
||||
self::GROUP_STUDENT => 'Membre',
|
||||
self::GROUP_TEACHER => 'Éditeur'
|
||||
self::GROUP_MEMBER => 'Membre',
|
||||
self::GROUP_EDITOR => 'Éditeur'
|
||||
];
|
||||
|
||||
public static $listModules = [];
|
||||
@ -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_MEMBER) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
@ -195,7 +195,7 @@ class user extends common
|
||||
// L'utilisateur n'existe pas
|
||||
$this->getData(['user', $this->getUrl(2)]) === null
|
||||
// Groupe insuffisant
|
||||
and ($this->getUrl('group') < self::GROUP_TEACHER)
|
||||
and ($this->getUrl('group') < self::GROUP_EDITOR)
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -245,7 +245,7 @@ class user extends common
|
||||
and $this->getUrl('group') <= self::GROUP_VISITOR
|
||||
)
|
||||
// Impossible d'éditer un autre utilisateur
|
||||
or ($this->getUrl('group') < self::GROUP_TEACHER)
|
||||
or ($this->getUrl('group') < self::GROUP_EDITOR)
|
||||
)
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
@ -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_MEMBER) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
@ -492,8 +492,8 @@ class user extends common
|
||||
])
|
||||
];
|
||||
} elseif (
|
||||
$groupId == self::GROUP_STUDENT ||
|
||||
$groupId == self::GROUP_TEACHER
|
||||
$groupId == self::GROUP_MEMBER ||
|
||||
$groupId == self::GROUP_EDITOR
|
||||
) {
|
||||
// Enumérer les sous groupes MEMBER et MODERATOR
|
||||
foreach ($groupData as $profilId => $profilData) {
|
||||
@ -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_MEMBER
|
||||
and $captcha === true
|
||||
) {
|
||||
// RAZ
|
||||
|
@ -91,34 +91,34 @@
|
||||
<div class="col6">
|
||||
<?php echo template::select('userAddGroup', self::$groupNews, [
|
||||
'label' => 'Groupe',
|
||||
'selected' => self::GROUP_STUDENT
|
||||
'selected' => self::GROUP_MEMBER
|
||||
]); ?>
|
||||
</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_MEMBER; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
'label' => 'Profil',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="userAddGroupProfil displayNone"
|
||||
id="userAddGroupProfil<?php echo self::GROUP_TEACHER; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_TEACHER, $module::$userProfils[self::GROUP_TEACHER], [
|
||||
id="userAddGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
'label' => 'Profil',
|
||||
]); ?>
|
||||
</div>
|
||||
</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_MEMBER; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment' . self::GROUP_MEMBER, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_MEMBER])
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div id="userCommentProfil<?php echo self::GROUP_TEACHER; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment2' . self::GROUP_TEACHER, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_TEACHER])
|
||||
<div id="userCommentProfil<?php echo self::GROUP_EDITOR; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment2' . self::GROUP_EDITOR, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_EDITOR])
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::text('userEditFirstname', [
|
||||
'autocomplete' => 'off',
|
||||
'disabled' => $this->getUser('group') > self::GROUP_TEACHER ? false : true,
|
||||
'disabled' => $this->getUser('group') > self::GROUP_EDITOR ? false : true,
|
||||
'label' => 'Prénom',
|
||||
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
|
||||
]); ?>
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::text('userEditLastname', [
|
||||
'autocomplete' => 'off',
|
||||
'disabled' => $this->getUser('group') > self::GROUP_TEACHER ? false : true,
|
||||
'disabled' => $this->getUser('group') > self::GROUP_EDITOR ? false : true,
|
||||
'label' => 'Nom',
|
||||
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
|
||||
]); ?>
|
||||
@ -116,16 +116,16 @@
|
||||
</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_MEMBER; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
'label' => 'Profil',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="userEditGroupProfil displayNone"
|
||||
id="userEditGroupProfil<?php echo self::GROUP_TEACHER; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_TEACHER, $module::$userProfils[self::GROUP_TEACHER], [
|
||||
id="userEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
'label' => 'Profil',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
@ -135,18 +135,18 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div id="userCommentProfil<?php echo self::GROUP_STUDENT; ?>"
|
||||
<div id="userCommentProfil<?php echo self::GROUP_MEMBER; ?>"
|
||||
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_MEMBER, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_MEMBER]),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div id="userCommentProfil<?php echo self::GROUP_TEACHER; ?>"
|
||||
<div id="userCommentProfil<?php echo self::GROUP_EDITOR; ?>"
|
||||
class="col12 userCommentProfil">
|
||||
<?php echo template::textarea('userEditProfilComment' . self::GROUP_TEACHER, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_TEACHER]),
|
||||
<?php echo template::textarea('userEditProfilComment' . self::GROUP_EDITOR, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_EDITOR]),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
]);
|
||||
?>
|
||||
|
@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->getUrl(2) >= self::GROUP_TEACHER): ?>
|
||||
<?php if ($this->getUrl(2) >= self::GROUP_EDITOR): ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
|
@ -29,7 +29,7 @@
|
||||
or (
|
||||
// Groupe
|
||||
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_TEACHER)
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR)
|
||||
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent'])
|
||||
)
|
||||
or (
|
||||
|
@ -62,7 +62,7 @@
|
||||
or (
|
||||
// Groupe
|
||||
($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_ADMIN
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_TEACHER)
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_EDITOR)
|
||||
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent'])
|
||||
)
|
||||
or (
|
||||
|
@ -44,15 +44,15 @@ class gallery extends common
|
||||
public static $config = [];
|
||||
|
||||
public static $actions = [
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'dirs' => self::GROUP_TEACHER,
|
||||
'sortGalleries' => self::GROUP_TEACHER,
|
||||
'sortPictures' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'theme' => self::GROUP_TEACHER,
|
||||
'option' => self::GROUP_TEACHER,
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'dirs' => self::GROUP_EDITOR,
|
||||
'sortGalleries' => self::GROUP_EDITOR,
|
||||
'sortPictures' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'theme' => self::GROUP_EDITOR,
|
||||
'option' => self::GROUP_EDITOR,
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
|
@ -21,13 +21,13 @@ class news extends common
|
||||
const DATADIRECTORY = self::DATA_DIR . 'news/';
|
||||
|
||||
public static $actions = [
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'config' => self::GROUP_EDITOR,
|
||||
// Edition des news
|
||||
'option' => self::GROUP_TEACHER,
|
||||
'option' => self::GROUP_EDITOR,
|
||||
// paramétrage des news
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'rss' => self::GROUP_VISITOR
|
||||
];
|
||||
|
@ -21,7 +21,7 @@ class redirection extends common
|
||||
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
|
||||
|
||||
public static $actions = [
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
@ -59,7 +59,7 @@ class redirection extends common
|
||||
// Message si l'utilisateur peut éditer la page
|
||||
if (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
&& $this->getUser('group') >= self::GROUP_TEACHER
|
||||
&& $this->getUser('group') >= self::GROUP_EDITOR
|
||||
&& $this->getUrl(1) !== 'force'
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
|
@ -26,7 +26,7 @@ class search extends common
|
||||
|
||||
public static $actions = [
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'config' => self::GROUP_TEACHER
|
||||
'config' => self::GROUP_EDITOR
|
||||
];
|
||||
|
||||
// Variables pour l'affichage des résultats
|
||||
|
Loading…
Reference in New Issue
Block a user