v46 workshop lien manquant

This commit is contained in:
Fred Tempez 2023-10-19 15:27:57 +02:00
parent b231450ff5
commit 58e947b73f
4 changed files with 18 additions and 4 deletions

View File

@ -50,7 +50,7 @@ class common
const ACCESS_TIMER = 1800;
// Numéro de version
const ZWII_VERSION = '1.0.45';
const ZWII_VERSION = '1.0.46';
// URL autoupdate
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/';

View File

@ -66,9 +66,9 @@
</div>
<div class="row">
<div class="col12">
<?php echo template::text('coursesConfigUrlText', [
<?php echo template::text('coursesConfigCaption', [
'label' => 'Texte du lien vers le cours',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'urlText'])
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'caption'])
]); ?>
</div>
</div>

View File

@ -48,12 +48,26 @@
</p>
<?php endif; ?>
<!-- Lien -->
<?php if (
$courseValue['access'] === self::COURSE_ACCESS_OPEN
||
($courseValue['access'] === self::COURSE_ACCESS_DATE && time() >= $courseValue['openingDate'] && time() <= $courseValue['closingDate'])
): ?>
<a href="<?php echo helper::baseUrl();?>course/swap/<?php echo $courseId; ?>">
<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'caption']); ?>
</a>
<?php endif; ?>
<!-- Modalité d'inscription -->
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
<p>
<?php echo helper::translate('Inscription : ') . $module::$coursesEnrolment[$courseValue['enrolment']]; ?>
</p>
<?php endif; ?>
<!-- Lien d'accès -->
<!-- Fin du bloc et bordure -->
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
</div>

View File

@ -74,7 +74,7 @@ class workshop extends common
'openingdate' => $this->getInput('coursesConfigShowOpeningDate', helper::FILTER_BOOLEAN),
'closingdate' => $this->getInput('coursesConfigShowClosingDate', helper::FILTER_BOOLEAN),
'enrolment' => $this->getInput('coursesConfigShowEnrolment', helper::FILTER_BOOLEAN),
'urlText' => $this->getInput('coursesConfigUrlText', helper::FILTER_STRING_SHORT),
'caption' => $this->getInput('coursesConfigCaption', helper::FILTER_STRING_SHORT),
'layout' => $this->getInput('coursesConfigLayout', helper::FILTER_INT),
'template' => $this->getInput('coursesConfigTemplate', helper::FILTER_BOOLEAN),
]