courseUserEnrolment change de nom
This commit is contained in:
parent
71e4bd5612
commit
56af790d82
@ -1455,8 +1455,9 @@ class common
|
||||
* @param string $userId identifiant de l'utilisateur
|
||||
* @param string $courseId identifiant du cours sollicité
|
||||
*/
|
||||
public function courseUserEnrolment($courseId, $userId = null)
|
||||
public function courseIsUserEnroled($courseId)
|
||||
{
|
||||
$userId = $this->getUser('id');
|
||||
$group = $userId ? $this->getData(['user', $userId, 'group']) : false;
|
||||
switch ($group) {
|
||||
case self::GROUP_ADMIN:
|
||||
|
@ -316,7 +316,7 @@ class course extends common
|
||||
self::$swapMessage['submitLabel'] = 'Se connecter';
|
||||
self::$swapMessage['enrolmentMessage'] = '';
|
||||
self::$swapMessage['enrolmentKey'] = '';
|
||||
if ($this->courseUserEnrolment($courseId, $userId) === false) {
|
||||
if ($this->courseIsUserEnroled($courseId) === false) {
|
||||
switch ($this->getData(['course', $courseId, 'enrolment'])) {
|
||||
case self::COURSE_ENROLMENT_GUEST:
|
||||
case self::COURSE_ENROLMENT_SELF:
|
||||
|
Loading…
Reference in New Issue
Block a user