Lien direct dans la liste des cours

This commit is contained in:
Fred Tempez 2023-09-30 09:25:01 +02:00
parent 07cb5d313f
commit 54087cec56
2 changed files with 3 additions and 1 deletions

View File

@ -54,10 +54,12 @@ class course extends common
$courseIdShortTitle = helper::arrayColumn($this->getData(['course']), 'shortTitle');
ksort($courseIdShortTitle);
foreach ($courseIdShortTitle as $courseId => $courseTitle) {
$categorieUrl = helper::baseUrl(!helper::checkRewrite()) . 'course/swap/' . $courseId ;
self::$courses[] = [
$courseTitle,
$this->getData(['course', $courseId, 'author']),
$this->getData(['course', $courseId, 'description']),
'<a href="' . $categorieUrl .'" target="_blank">' . $categorieUrl . '</a>',
template::button('courseEdit' . $courseId, [
'href' => helper::baseUrl() . 'course/edit/' . $courseId,
'value' => template::ico('pencil'),

View File

@ -22,7 +22,7 @@
</div>
</div>
<?php if($module::$courses): ?>
<?php echo template::table([3 , 3, 4, 1, 1], $module::$courses, ['Titre court', 'Auteur', 'Description', '', '']); ?>
<?php echo template::table([2, 2, 2, 4, 1, 1], $module::$courses, ['Titre court', 'Auteur', 'Description', 'Lien direct', '', '']); ?>
<?php else: ?>
<?php echo template::speech('Aucun Cours'); ?>
<?php endif; ?>