$(function() { $().timelinr(); $(".dialog").dialog("destroy"); $(".dialog").dialog({ autoOpen: false, show: "blind", resizable: false, height:300, width:550, modal: true }); $(".opener").click(function() { var my_id = $(this).attr(\'id\'); var big_image = \'#main_graph_\' + my_id; $( big_image ).dialog("open"); return false; }); }); '; require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php'; $user_id = api_get_user_id(); $course_user_list = CourseManager::get_courses_list_by_user_id($user_id); $dates = $issues = ''; if (!empty($course_user_list)) { $items = MySpace::get_connections_from_course_list($user_id, $course_user_list); $first = null; $last = null; $last_item = count($items); $count = 1; foreach ($items as $result) { $login = $result['login']; if ($count == 1) { $first = ''.get_lang('First').''; } if ($count == $last_item) { $last = ''.get_lang('Last').''; } $course_info = api_get_course_info_by_id($result['real_id']); $course_image = ''; $dates .= '
  • '.api_get_utc_datetime($login).'
  • '; $issues .= '
  • '.$course_image.'
    '.sprintf(get_lang('YouHaveEnteredTheCourseXInY'), $course_info['code'], api_convert_and_format_date($login, DATE_FORMAT_LONG)).'
  • '; $count++; } } $selectedCourse = isset($_GET['course']) ? $_GET['course'] : null; $selectedSession = isset($_GET['session_id']) ? $_GET['session_id'] : null; $content = Tracking::show_user_progress(api_get_user_id()); $content .= Tracking::show_course_detail(api_get_user_id(), $selectedCourse, $selectedSession); if (!empty($dates)) { if (!empty($content)) { $content .= '

    '; } $content .= '
    '.Display::page_subheader(get_lang('Timeline')).'
    '; $content .= '
    '; } $message = null; if (empty($content)) { $message = Display::return_message(get_lang('NoDataAvailable'), 'warning'); } //$app['title'] = $tool_name; $tpl = $app['template']; $tpl->assign('message', $message); $tpl->assign('content', $content); $tpl->display_one_col_template();