}
if (!empty($_REQUEST['session_id'])) {
    $session_id = intval($_REQUEST['session_id']);
} else {
    $session_id = 0;
}
if (empty($session_id)) {
    $session_id = key($my_session_list);
}
$form->setDefaults(array('session_id' => $session_id));
$course_list = SessionManager::get_course_list_by_session_id($session_id);
if (!$export_to_xls) {
    Display::display_header(get_lang("MySpace"));
    echo '<div class="actions">';
    if ($global) {
        echo MySpace::getTopMenu();
    } else {
        echo '<div style="float:left; clear:left">
				<a href="courseLog.php?' . api_get_cidreq() . '&studentlist=true">' . get_lang('StudentsTracking') . '</a>&nbsp;|
				<a href="courseLog.php?' . api_get_cidreq() . '&studentlist=false">' . get_lang('CourseTracking') . '</a>&nbsp;';
        echo '</div>';
    }
    echo '</div>';
    if (api_is_platform_admin()) {
        echo MySpace::getAdminActions();
    }
    echo '<h2>' . get_lang('LPExerciseResultsBySession') . '</h2>';
    $form->display();
    Display::display_normal_message(get_lang('StudentScoreAverageIsCalculatedBaseInAllLPsAndAllAttempts'));
}
$users = SessionManager::get_users_by_session($session_id);