$data = array(); $courseToolInformationTotal = null; while ($course = Database::fetch_object($res)) { $courseInfo = api_get_course_info_by_id($course->c_id); $courseCode = $courseInfo['code']; $courseToolInformation = null; $tools = '<a href="course_information.php?code=' . $courseCode . '">' . Display::return_icon('synthese_view.gif', get_lang('Overview')) . '</a>' . '<a href="' . $courseInfo['course_public_url'] . '">' . Display::return_icon('course_home.gif', get_lang('CourseHomepage')) . '</a>' . '<a href="course_edit.php?course_code=' . $courseCode . '">' . Display::return_icon('edit.gif', get_lang('Edit')) . '</a>'; if ($course->status == STUDENT) { $tools .= '<a href="user_information.php?action=unsubscribe&course_code=' . $courseCode . '&user_id=' . $user['user_id'] . '">' . Display::return_icon('delete.png', get_lang('Delete')) . '</a>'; } $timeSpent = api_time_to_hms(Tracking::get_time_spent_on_the_course($user['user_id'], $courseInfo['real_id'], 0)); $totalForumMessages = CourseManager::getCountPostInForumPerUser($user['user_id'], $course->id, 0); $row = array(Display::url($courseCode, $courseInfo['course_public_url']), $course->title, $course->status == STUDENT ? get_lang('Student') : get_lang('Teacher'), $timeSpent, $totalForumMessages, $tools); $csvContent[] = array_map('strip_tags', $row); $data[] = $row; $result = TrackingUserLogCSV::getToolInformation($user['user_id'], $courseInfo, 0); $courseToolInformationTotal .= $result['html']; $csvContent = array_merge($csvContent, $result['array']); } $courseInformation = Display::page_subheader(get_lang('Courses')); $courseInformation .= Display::return_sortable_table($header, $data, array(), array(), array('user_id' => intval($_GET['user_id']))); $courseInformation .= $courseToolInformationTotal; } else { $courseInformation = '<p>' . get_lang('NoCoursesForThisUser') . '</p>'; } /** * Show the URL in which this user is subscribed */ $urlInformation = null; if (api_is_multiple_url_enabled()) { $urlList = UrlManager::get_access_url_from_user($user['user_id']);
} if ($tracking_is_accepted) { $tracked_user_info['email'] == '' ? $mail_link = get_lang('NoEmail') : ($mail_link = Display::encrypted_mailto_link($tracked_user_info['email'])); if (!isset($view)) { $view = '0000000'; } //Logins list($title_line1, $line1) = TrackingUserLogCSV::display_login_tracking_info($view, $uInfo, $courseId); //Exercise results list($title_line2, $line2) = TrackingUserLogCSV::display_exercise_tracking_info($view, $uInfo, $_cid); //Student publications uploaded list($title_line3, $line3) = TrackingUserLogCSV::display_student_publications_tracking_info($view, $uInfo, $courseId); //Links usage list($title_line4, $line4) = TrackingUserLogCSV::display_links_tracking_info($view, $uInfo, $_cid); //Documents downloaded list($title_line5, $line5) = TrackingUserLogCSV::display_document_tracking_info($view, $uInfo, $_cid); $title_line = $title_line1 . $title_line2 . $title_line3 . $title_line4 . $title_line5; $line = $line1 . $line2 . $line3 . $line4 . $line5; } else { echo get_lang('ErrorUserNotInGroup'); } /* * Scorm contents and Learning Path */ //TODO: scorm tools is in work and the logs will change in few days... /*if(substr($view,5,1) == '1') { $new_view = substr_replace($view,'0',5,1); $title[1]=get_lang('ScormContentColumn'); $line =''; $sql = "SELECT id, name FROM $tbl_learnpath_main";