Course delete all enrolled
This commit is contained in:
parent
67a78a46be
commit
9c4556586c
@ -29,6 +29,7 @@ class course extends common
|
|||||||
'user' => self::GROUP_ADMIN,
|
'user' => self::GROUP_ADMIN,
|
||||||
'userAdd' => self::GROUP_ADMIN,
|
'userAdd' => self::GROUP_ADMIN,
|
||||||
'userDelete' => self::GROUP_ADMIN,
|
'userDelete' => self::GROUP_ADMIN,
|
||||||
|
'userDeleteAll' => self::GROUP_ADMIN,
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $courseAccess = [
|
public static $courseAccess = [
|
||||||
@ -430,6 +431,30 @@ class course extends common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Désinscription de tous les utilisateurs
|
||||||
|
*/
|
||||||
|
public function userDeleteAll()
|
||||||
|
{
|
||||||
|
// Accès refusé
|
||||||
|
if (
|
||||||
|
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||||
|
) {
|
||||||
|
// Valeurs en sortie
|
||||||
|
$this->addOutput([
|
||||||
|
'access' => false
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
$this->setData(['enrolment', $this->getUrl(2), array()]);
|
||||||
|
// Valeurs en sortie
|
||||||
|
$this->addOutput([
|
||||||
|
'redirect' => helper::baseUrl() . 'course/user/' . $this->getUrl(2),
|
||||||
|
'notification' => helper::translate('Cours réinitialisé'),
|
||||||
|
'state' => true
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Traitement du changement de langue
|
* Traitement du changement de langue
|
||||||
*/
|
*/
|
||||||
|
@ -10,4 +10,15 @@
|
|||||||
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
* @link http://zwiicms.fr/
|
* @link http://zwiicms.fr/
|
||||||
*/
|
*/
|
||||||
$(".userDelete").on("click", (function () { var _this = $(this); return message = "<?php echo helper::translate('Confirmer la désinscription de cet utilisateur');?>", core.confirm(message, (function () { $(location).attr("href", _this.attr("href")) })) }));
|
(".userDelete").on("click", (function() {
|
||||||
|
var _this = $(this);
|
||||||
|
return message = "<?php echo helper::translate('Confirmer la désinscription de cet utilisateur');?>", core.confirm(message, (function() {
|
||||||
|
$(location).attr("href", _this.attr("href"))
|
||||||
|
}))
|
||||||
|
}));
|
||||||
|
(".userDeleteAll").on("click", (function() {
|
||||||
|
var _this = $(this);
|
||||||
|
return message = "<?php echo helper::translate('Confirmer la désinscription de tous les utilisateur');?>", core.confirm(message, (function() {
|
||||||
|
$(location).attr("href", _this.attr("href"))
|
||||||
|
}))
|
||||||
|
}));
|
@ -6,16 +6,23 @@
|
|||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col1 offset10">
|
<div class="col2 offset9">
|
||||||
|
<?php echo template::button('userDeleteAll', [
|
||||||
|
'class' => 'userDeleteAll buttonRed',
|
||||||
|
'href' => helper::baseUrl() . 'course/userDeleteAll/' . $this->getUrl(2),
|
||||||
|
'value' => helper::translate('Réinitialiser'),
|
||||||
|
'help' => 'Désinscrire tous les utilisateurs'
|
||||||
|
])
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
<?php /*echo template::button('courseUserAdd', [
|
<?php /*echo template::button('courseUserAdd', [
|
||||||
'class' => 'buttonGreen',
|
'class' => 'buttonGreen',
|
||||||
'href' => helper::baseUrl() . 'course/userAdd',
|
'href' => helper::baseUrl() . 'course/userAdd',
|
||||||
'value' => template::ico('plus')
|
'value' => template::ico('plus')
|
||||||
]); */?>
|
]); */?>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?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, 3, 1], $module::$courseUsers, ['Id', 'Nom Prénom', 'Id dernière page', 'Date - Heure', '']); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo template::speech('Aucun inscrit'); ?>
|
<?php echo template::speech('Aucun inscrit'); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user