workshop tient compte des restrictions d'inscriptions

This commit is contained in:
Fred Tempez 2023-11-18 16:34:49 +01:00
parent 3c4e5f7d05
commit 9c23902d63
3 changed files with 119 additions and 104 deletions

View File

@ -165,6 +165,15 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row">
<div class="col4">
<?php echo template::text('coursesCaptionEnrolmentLimit', [
'label' => 'Limitation date inscription',
'value' => $this->getData(['module', $this->getUrl(0), 'caption', 'enrolmentLimit']),
'help' => 'Classe CSS de la division : workshopEnrolmentLimit'
]); ?>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,8 @@
<div class="row workshopRowContainer"> <div class="row workshopRowContainer">
<?php endif; ?> <?php endif; ?>
<!-- Layout en colonnes --> <!-- Layout en colonnes -->
<div class="workshopItemContainer col<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'layout']); ?>"> <div
class="workshopItemContainer col<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'layout']); ?>">
<!-- Affchage par bloc et bordure --> <!-- Affchage par bloc et bordure -->
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> <?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
<div class="block"> <div class="block">
@ -62,8 +63,11 @@
<?php echo $module::$coursesEnrolment[$courseValue['enrolment']]; ?> <?php echo $module::$coursesEnrolment[$courseValue['enrolment']]; ?>
</span> </span>
</p> </p>
<?php if ($this->getData(['course', $courseId, 'limitEnrolment']) === true ):?>
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'enrolmentLimit']); ?>
<?php echo helper::dateUTF8(' %d %B %Y', $this->getData(['course', $courseId, 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $courseId, 'limitEnrolmentDate']), self::$i18nUI); ?>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
<!-- Lien accès au contenu--> <!-- Lien accès au contenu-->
<div class="row"> <div class="row">
<div class="col6 workshopLinkContainer"> <div class="col6 workshopLinkContainer">

View File

@ -41,25 +41,26 @@ class workshop extends common
public static $coursesEnrolment = []; public static $coursesEnrolment = [];
public static $default = [ public static $default = [
"config" => array( 'config' => array(
"category" => "general", 'category' => 'general',
"title" => true, 'title' => true,
"author" => true, 'author' => true,
"description" => true, 'description' => true,
"access" => true, 'access' => true,
"enrolment" => true, 'enrolment' => true,
"layout" => 6, 'layout' => 6,
"template" => true 'template' => true
), ),
"caption" => array( 'caption' => array(
"accessopen" => "Ouvert", 'accessopen' => 'Ouvert',
"accessdate" => "P&eacute;riode d&#039;ouverture du %s au %s", 'accessdate' => 'P&eacute;riode d&#039;ouverture du %s au %s',
"accessclose" => "Ferm&eacute;", 'accessclose' => 'Ferm&eacute;',
"enrolguest" => "Anonyme", 'enrolguest' => 'Anonyme',
"enrolself" => "Membres", 'enrolself' => 'Membres',
"enrolselfkey" => "Membres avec cl&eacute;", 'enrolselfkey' => 'Membres avec cl&eacute;',
"url" => "Acc&eacute;der au contenu", 'url' => 'Acc&eacute;der au contenu',
"unsuscribe" => "Me d&eacute;sinscrire" 'unsuscribe' => 'Me d&eacute;sinscrire',
'enrolmentLimit' => 'Date limite des inscriptions',
) )
]; ];
@ -108,6 +109,7 @@ class workshop extends common
'enrolselfkey' => $this->getInput('coursesCaptionSelfKey', helper::FILTER_STRING_SHORT), 'enrolselfkey' => $this->getInput('coursesCaptionSelfKey', helper::FILTER_STRING_SHORT),
'url' => $this->getInput('coursesCaptionUrl', helper::FILTER_STRING_SHORT), 'url' => $this->getInput('coursesCaptionUrl', helper::FILTER_STRING_SHORT),
'unsuscribe' => $this->getInput('coursesCaptionUnsuscribe', helper::FILTER_STRING_SHORT), 'unsuscribe' => $this->getInput('coursesCaptionUnsuscribe', helper::FILTER_STRING_SHORT),
'enrolmentLimit' => $this->getInput('coursesCaptionEnrolmentLimit', helper::FILTER_STRING_SHORT),
] ]
]); ]);
// Valeurs en sortie // Valeurs en sortie