diff --git a/main/group/group.php b/main/group/group.php index 453a79bd6b..67c9229118 100644 --- a/main/group/group.php +++ b/main/group/group.php @@ -156,7 +156,7 @@ if (api_is_allowed_to_edit(false, true)) { echo '
'; if (api_is_allowed_to_edit(false, true)) { echo ''.Display::return_icon('new_group.png', get_lang('NewGroupCreate'),'','32').''; - if (Database::count_rows(Database::get_course_table(TABLE_GROUP)) > 0) { + if (CourseManager::count_rows_course_table(Database::get_course_table(TABLE_GROUP),api_get_session_id(), api_get_course_int_id())) > 0) { //echo ''.Display::return_icon('group_view.gif').' '.get_lang('GroupOverview').' '; echo ''.Display::return_icon('group_summary.png', get_lang('GroupOverview'),'','32').''; } diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index 2a03ef58bb..0d889eb389 100644 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -378,7 +378,7 @@ class Database { * @return int The number of rows in the given table. */ public static function count_rows($table) { - $obj = self::fetch_object(self::query("SELECT COUNT(*) AS n FROM $table WHERE c_id = ".api_get_course_int_id())); // + $obj = self::fetch_object(self::query("SELECT COUNT(*) AS n FROM $table")); // return $obj->n; } diff --git a/main/mySpace/index.php b/main/mySpace/index.php index cbc73b050f..6d303eead0 100644 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -367,10 +367,10 @@ if (api_is_allowed_to_create_course() && $view == 'teacher') { $table->set_additional_parameters($parameters); $table -> set_header(0, get_lang('CourseTitle'), false, 'align="center"'); $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(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('AvgAssignments'), false); $table -> set_header(8, get_lang('Details'), false); diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index 2e3e82ad2b..630ea7c811 100644 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -511,11 +511,11 @@ if (!empty($student_id)) { - 'absmiddle', 'hspace' => '3px'));?> + 'absmiddle', 'hspace' => '3px'));?> - 'absmiddle', 'hspace' => '3px')); ?> + 'absmiddle', 'hspace' => '3px')); ?> @@ -634,7 +634,7 @@ if (empty($_GET['details'])) { $scoretotal_display = '0/0 (0%)'; if (!empty($scoretotal)) { - $scoretotal_display = round($scoretotal[0],2).'/'.round($scoretotal[1],2).'('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)'; + $scoretotal_display = round($scoretotal[0],1).'/'.round($scoretotal[1],1).' ('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)'; } $progress = Tracking::get_avg_student_progress($info_user['user_id'], $course_code, null, $session_id); @@ -712,11 +712,11 @@ if (empty($_GET['details'])) { - - - - - + + + + + '.get_lang('Details').''; if (api_is_course_admin()) { @@ -841,7 +841,7 @@ if (empty($_GET['details'])) {
'absmiddle', 'hspace' => '3px')); ?> 'absmiddle', 'hspace' => '3px')); ?> 'absmiddle', 'hspace' => '3px')); ?> 'absmiddle','hspace' => '3px')); ?> 'absmiddle','hspace' => '3px')); ?> 'absmiddle', 'hspace' => '3px')); ?> 'absmiddle', 'hspace' => '3px')); ?> 'absmiddle', 'hspace' => '3px')); ?> 'absmiddle','hspace' => '3px')); ?> 'absmiddle','hspace' => '3px')); ?>
- + diff --git a/main/mySpace/myspace.lib.php b/main/mySpace/myspace.lib.php index 35083b6f4a..6fbebc5706 100644 --- a/main/mySpace/myspace.lib.php +++ b/main/mySpace/myspace.lib.php @@ -2,7 +2,6 @@ /* For licensing terms, see /license.txt */ require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php'; require_once api_get_path(LIBRARY_PATH).'tracking.lib.php'; -require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'; class MySpace { @@ -1346,7 +1345,7 @@ class MySpace { // database table definition $access_url_id = api_get_current_access_url_id(); $tbl_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); - $main_user_table = Database :: get_main_table(TABLE_MAIN_USER); + $main_user_table = Database::get_main_table(TABLE_MAIN_USER); if ($_configuration['multiple_access_urls']) { $condition_multi_url = ", $tbl_url_rel_user as url_user WHERE user.user_id=url_user.user_id AND access_url_id='$access_url_id'"; diff --git a/main/mySpace/student.php b/main/mySpace/student.php index a56a2fecdf..821b7e582c 100644 --- a/main/mySpace/student.php +++ b/main/mySpace/student.php @@ -280,6 +280,9 @@ if (api_is_allowed_to_create_course() || api_is_drh()) { $row[] = $string_date; if ($export_csv) { + + $row[count($row) - 1] = strip_tags($row[count($row) - 1]); + $row[count($row) - 2] = strip_tags($row[count($row) - 2]); $csv_content[] = $row; } diff --git a/main/tracking/courseLog.php b/main/tracking/courseLog.php index 9cef919b0d..7f294c7e22 100644 --- a/main/tracking/courseLog.php +++ b/main/tracking/courseLog.php @@ -12,7 +12,7 @@ $pathopen = isset($_REQUEST['pathopen']) ? $_REQUEST['pathopen'] : null; // Language files that need to be included. $language_file = array('admin', 'tracking','scorm'); -// Including the global initialization file. +// Including the global initialization file require_once '../inc/global.inc.php'; $from_myspace = false; @@ -534,16 +534,21 @@ if ($_GET['studentlist'] == 'false') { $table->set_header(10, get_lang('Survey'), false); $table->set_header(11, get_lang('FirstLogin'), false, 'align="center"'); $table->set_header(12, get_lang('LatestLogin'), false, 'align="center"'); - $table->set_header(13, get_lang('AdditionalProfileField'), false); - $table->set_header(14, get_lang('Details'), false); + if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) { + $table->set_header(13, $extra_info['field_display_text'], false); + $table->set_header(14, get_lang('Details'), false); + } else { + $table->set_header(13, get_lang('Details'), false); + } + } else { $table->set_header(10, get_lang('FirstLogin'), false, 'align="center"'); $table->set_header(11, get_lang('LatestLogin'), false, 'align="center"'); if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) { $table->set_header(12, $extra_info['field_display_text'], false); - $table->set_header(13, get_lang('Details'), false); - } else { + $table->set_header(13, get_lang('Details'), false); + } else { $table->set_header(12, get_lang('Details'), false); } } @@ -577,8 +582,7 @@ if ($_GET['studentlist'] == 'false') { } $csv_headers[] = get_lang('FirstLogin', ''); - $csv_headers[] = get_lang('LatestLogin', ''); - + $csv_headers[] = get_lang('LatestLogin', ''); if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) { $csv_headers[] = $extra_info['field_display_text']; diff --git a/main/tracking/exams.php b/main/tracking/exams.php index 78e4e8df9d..ca6c3882df 100644 --- a/main/tracking/exams.php +++ b/main/tracking/exams.php @@ -120,7 +120,7 @@ if (!$export_to_xls) { if ($global) { $html_result .= '
'absmiddle', 'hspace' => '3px')) ?> 'absmiddle', 'hspace' => '3px')) ?>
'; $html_result .= ''; - $html_result .= ''; + $html_result .= ''; $html_result .= ''; $html_result .= ''; $html_result .= ''; @@ -129,7 +129,7 @@ if ($global) { $html_result .= ''; } else { $html_result .= '
'.get_lang('Courses').''.get_lang('Exercises').''.get_lang('Quiz').''.get_lang('ExamTaken').''.get_lang('ExamNotTaken').''.sprintf(get_lang('ExamPassX'), $filter_score).'%
'; - $html_result .= ''; + $html_result .= ''; $html_result .= ''; //$html_result .= ''; $html_result .= '';
'.get_lang('Exercises').'
'.get_lang('Quiz').''.get_lang('User').''.sprintf(get_lang('ExamPassX'), $filter_score).''.get_lang('Percentage').' %