if (empty($session_id)) { if ($count_courses) { $title = '<img src="' . api_get_path(WEB_IMG_PATH) . 'course.gif"> ' . get_lang('Courses') . ' (' . $count_courses . ') '; } } else { //If we are in Course Session $session_name = api_get_session_name($session_id); $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL) . ' ' . $session_name; $menu_items[] = '<a href="' . api_get_self() . '?view=teacher">' . get_lang('TeacherInterface') . '</a>'; } } if ((api_is_allowed_to_create_course() || api_is_drh()) && in_array($view, array('teacher', 'drh'))) { //Courses if ($count_courses) { echo Display::page_subheader($title); $data = MySpace::get_course_data(null, null, null, null, $courses, $csv_content, $charset); $table = new SortableTable('courses_my_space', 'get_number_of_courses'); $parameters['view'] = 'teacher'; $parameters['class'] = 'data_table'; $table->set_additional_parameters($parameters); $table->set_header(0, get_lang('CourseTitle'), false); $table->set_header(1, get_lang('NbStudents'), false); $table->set_header(2, get_lang('AvgTimeSpentInTheCourse') . ' ' . Display::return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table->set_header(3, get_lang('AvgStudentsProgress') . ' ' . Display::return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table->set_header(4, get_lang('AvgCourseScore') . ' ' . Display::return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table->set_header(5, get_lang('AvgExercisesScore') . ' ' . Display::return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table->set_header(6, get_lang('AvgMessages'), false); $table->set_header(7, get_lang('AverageAssignments'), false); $table->set_header(8, get_lang('Details'), false); foreach ($data as $row) { $table->addRow($row);