?> <p class="course_support_info"> <?php if ($course['code']) { ?> <i style="font-size:.88em">[<?php echo $keyword != "" ? Layout::highlight($course['code'], $keyword) : $course['code']; ?> ]</i><?php } ?> </p> <?php $smodel = new SubscriptionAlms(); if ($smodel->isUserWaitingForSelfUnsubscribe(Docebo::user()->idst, $course['idCourse'])) { echo '<p style="padding:.4em">' . Lang::t('_UNSUBSCRIBE_REQUEST_WAITING_FOR_MODERATION', 'course') . '</p>'; } else { //auto unsubscribe management: create a link for the user in the course block $_can_unsubscribe = $course['auto_unsubscribe'] == 1 || $course['auto_unsubscribe'] == 2; $_date_limit = $course['unsubscribe_date_limit'] != "" && $course['unsubscribe_date_limit'] != "0000-00-00 00:00:00" ? $course['unsubscribe_date_limit'] : FALSE; if ($_can_unsubscribe) { ?> <p class="course_support_info"> <?php if ($_date_limit !== FALSE && $_date_limit < date("Y-m-d H:i:s")) { echo ''; } else { ?> <a href="index.php?r=elearning/self_unsubscribe&id_course=<?php echo $course['idCourse'];