Fix signature enrol popup
move signature to core
This commit is contained in:
parent
16132a9b8e
commit
9e708fcd10
@ -1469,4 +1469,27 @@ class common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la signature d'un utilisateur
|
||||
*/
|
||||
public function signature($userId)
|
||||
{
|
||||
switch ($this->getData(['user', $userId, 'signature'])) {
|
||||
case 1:
|
||||
return $userId;
|
||||
break;
|
||||
case 2:
|
||||
return $this->getData(['user', $userId, 'pseudo']);
|
||||
break;
|
||||
case 3:
|
||||
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
|
||||
break;
|
||||
case 4:
|
||||
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||
break;
|
||||
default:
|
||||
return $this->getData(['user', $userId, 'firstname']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<?php echo template::formOpen('courseSwapForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo "<h3>Auteur : " . $this->getData(['course', $this->getUrl(2), 'author']) . "</h3>"; ?>
|
||||
<?php echo "<h3>Auteur : " . $this->signature($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'])]; ?>
|
||||
<?php if ($this->getData(['course', $this->getUrl(2), 'access']) === $module::COURSE_ACCESS_DATE): ?>
|
||||
|
@ -897,26 +897,4 @@ class blog extends common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la signature d'un utilisateur
|
||||
*/
|
||||
public function signature($userId)
|
||||
{
|
||||
switch ($this->getData(['user', $userId, 'signature'])) {
|
||||
case 1:
|
||||
return $userId;
|
||||
break;
|
||||
case 2:
|
||||
return $this->getData(['user', $userId, 'pseudo']);
|
||||
break;
|
||||
case 3:
|
||||
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
|
||||
break;
|
||||
case 4:
|
||||
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||
break;
|
||||
default:
|
||||
return $this->getData(['user', $userId, 'firstname']);
|
||||
}
|
||||
}
|
||||
}
|
@ -548,28 +548,6 @@ class news extends common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la signature d'un utilisateur
|
||||
*/
|
||||
private function signature($userId)
|
||||
{
|
||||
switch ($this->getData(['user', $userId, 'signature'])) {
|
||||
case 1:
|
||||
return $userId;
|
||||
break;
|
||||
case 2:
|
||||
return $this->getData(['user', $userId, 'pseudo']);
|
||||
break;
|
||||
case 3:
|
||||
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
|
||||
break;
|
||||
case 4:
|
||||
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||
break;
|
||||
default:
|
||||
return $this->getData(['user', $userId, 'firstname']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du module
|
||||
|
Loading…
Reference in New Issue
Block a user