*/ // Flag to allow for anonymous user - needs to be set before global.inc.php. Container::$legacyTemplate = 'layout_empty.html.twig'; $use_anonymous = true; $htmlHeadXtra[] = " "; if (isset($_GET['error'])) { switch ($_GET['error']){ case 'document_deleted': echo '

'; Display::display_error_message(get_lang('DocumentHasBeenDeleted')); break; case 'prerequisites': echo '

'; Display::display_warning_message(get_lang('LearnpathPrereqNotCompleted')); break; case 'document_not_found': echo '

'; Display::display_warning_message(get_lang('FileNotFound')); break; case 'reached_one_attempt': echo '

'; Display::display_warning_message(get_lang('ReachedOneAttempt')); break; case 'x_frames_options': $frameSource = Session::read('x_frame_source'); if (!empty($frameSource)) { $src = $frameSource; $icon = ' '; echo Display::return_message( Display::url($icon.$src, $src, ['class' => 'btn generated', 'target' => '_blank']), 'normal', false ); Session::erase('x_frame_source'); } break; default: break; } } elseif (isset($_GET['msg']) && $_GET['msg'] == 'exerciseFinished') { echo '

'; Display::display_normal_message(get_lang('ExerciseFinished')); } ?>