config['lms_config']['activity_form_id'] * (by default 1201). If the activity ID change, the installation must be performed again. */ use YesWiki\Lms\Controller\CourseController; use YesWiki\Lms\Service\LearnerManager; $GLOBALS['wiki']->addJavascriptFile('tools/lms/libs/lms.js'); $courseController = $GLOBALS['wiki']->services->get(CourseController::class); $learnerManager = $GLOBALS['wiki']->services->get(LearnerManager::class); // the current learner $learner = $learnerManager->getLearner(); ?>
LoadPage('PageMenuLms')) { echo $GLOBALS['wiki']->Format('{{include page="PageMenuLms"}}'); } ?>
getContextualCourse(); // the consulted module entry to display the current activity $module = $courseController->getContextualModule($course); if (!$course || !$module || $module->isAccessibleBy($learner, $course)) { $title = ''; if ($GLOBALS['wiki']->config['lms_config']['display_activity_title'] && !empty($html['bf_titre'])) { if (isset($fiche['bf_titre_affiche']) && !empty(trim($fiche['bf_titre_affiche']))){ $title = '

' . $fiche['bf_titre_affiche'] . '

'; } else { $title = '

' . $html['bf_titre'] . '

'; } } $content = !empty($html['bf_contenu']) ? $html['bf_contenu'] : ''; echo $title . $content; if (!empty($html['reactions']) && $course && $module) { echo $html['reactions']; } if (!empty($html['bf_navigation']) && $course && $module) { echo $html['bf_navigation']; } } else { echo '
' . _t('LMS_ACTIVITY_NOT_ACCESSIBLE') . '
'; } ?>