ZwiiCampus/core/module/course/view/suscribe/suscribe.php

63 lines
3.5 KiB
PHP
Raw Normal View History

2023-09-23 19:23:41 +02:00
<?php echo template::formOpen('courseSwapForm'); ?>
2023-09-22 19:33:03 +02:00
<div class="row">
<div class="col12">
2023-11-18 16:14:19 +01:00
<?php echo "<h3>Auteur : " . $this->signature($this->getData(['course', $this->getUrl(2), 'author'])) . "</h3>"; ?>
2023-10-06 18:15:57 +02:00
<?php echo "<p>Description : " . $this->getData(['course', $this->getUrl(2), 'description']) . "</p>"; ?>
2023-11-18 16:14:19 +01:00
<!--Restriction de date limite d'ouverture-->
2023-10-06 21:24:50 +02:00
<?php echo "<p>Disponibilité : " . $module::$courseAccess[$this->getData(['course', $this->getUrl(2), 'access'])]; ?>
2023-10-06 18:15:57 +02:00
<?php if ($this->getData(['course', $this->getUrl(2), 'access']) === $module::COURSE_ACCESS_DATE): ?>
<?php $from = helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'openingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'openingDate']), self::$i18nUI); ?>
<?php $to = helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'closingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'closingDate']), self::$i18nUI); ?>
<?php echo sprintf(helper::translate(' du %s au %s'), $from, $to); ?>
<?php endif; ?>
2023-11-18 16:14:19 +01:00
<?php echo '</p>'; ?>
<?php echo "<p>Inscription : " . $module::$courseEnrolment[$this->getData(['course', $this->getUrl(2), 'enrolment'])] . '.'; ?>
<!--Restriction de date limite d'insription-->
<?php if ($this->getData(['course', $this->getUrl(2), 'limitEnrolment']) === true && $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time()):?>
<?php echo helper::translate(' Les inscriptions sont closes depuis le ') ?>
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']), self::$i18nUI); ?>
<?php endif; ?>
<?php echo '</p>'; ?>
2023-09-22 19:33:03 +02:00
</div>
</div>
2023-09-23 19:23:41 +02:00
<div class="row">
<div class="col12">
<?php if ($module::$swapMessage['enrolmentKey']) {
echo $module::$swapMessage['enrolmentKey'];
}
?>
<?php if ($module::$swapMessage['enrolmentMessage']) {
echo $module::$swapMessage['enrolmentMessage'];
}
?>
</div>
</div>
2023-09-22 19:33:03 +02:00
<div class="row">
<div class="col2">
2023-09-23 19:23:41 +02:00
<?php echo template::button('courseSwapBack', [
2023-09-22 19:33:03 +02:00
'href' => helper::baseUrl(),
'value' => template::ico('left')
]); ?>
</div>
2023-10-06 21:24:50 +02:00
<?php if ($module::$swapMessage['submitLabel'] === 'Connexion'): ?>
<div class="col2 offset8">
<?php echo template::button('courseConnect', [
'href' => helper::baseUrl(true) . 'user/login',
'value' => template::ico('login'),
'help' => 'Connexion',
]); ?>
</div>
<?php else: ?>
2023-10-11 21:31:55 +02:00
<div class="col3 offset7">
2023-10-06 21:24:50 +02:00
<?php echo template::submit('courseSwapSubmit', [
'value' => $module::$swapMessage['submitLabel'],
2023-11-18 16:14:19 +01:00
'disabled' => !($module->courseIsAvailable($this->getUrl(2))
&& !($this->getData(['course', $this->getUrl(2), 'limitEnrolment']) === true
&& $this->getData(['course', $this->getUrl(2), 'limitEnrolmentDate']) <= time())
),
2023-10-06 21:24:50 +02:00
]); ?>
</div>
<?php endif; ?>
2023-09-22 19:33:03 +02:00
</div>
<?php echo template::formClose(); ?>