diff --git a/main/group/group.php b/main/group/group.php index fc8c3c6ef2..c3e7fc2d61 100644 --- a/main/group/group.php +++ b/main/group/group.php @@ -186,18 +186,18 @@ if (api_is_allowed_to_edit()) } // Show admin-panel echo ''; } @@ -320,7 +320,7 @@ foreach ($group_cats as $index => $category) $edit_actions = ''.get_lang( '; $edit_actions .= ''.get_lang( '; $edit_actions .= ''.get_lang( '; - $edit_actions .= ''.get_lang('; + $edit_actions .= ''.get_lang('; $row[] = $edit_actions; } $totalRegistered = $totalRegistered + $this_group[nbMember]; diff --git a/main/img/add_user.gif b/main/img/add_user.gif new file mode 100644 index 0000000000..b3b5344e9d Binary files /dev/null and b/main/img/add_user.gif differ diff --git a/main/img/add_user_big.gif b/main/img/add_user_big.gif new file mode 100644 index 0000000000..d84e886caf Binary files /dev/null and b/main/img/add_user_big.gif differ diff --git a/main/img/edit_group.gif b/main/img/edit_group.gif new file mode 100644 index 0000000000..290c24e272 Binary files /dev/null and b/main/img/edit_group.gif differ diff --git a/main/img/group_add_big.gif b/main/img/group_add_big.gif new file mode 100644 index 0000000000..71fb6ef9ff Binary files /dev/null and b/main/img/group_add_big.gif differ diff --git a/main/img/group_view.gif b/main/img/group_view.gif new file mode 100644 index 0000000000..349cdeb363 Binary files /dev/null and b/main/img/group_view.gif differ diff --git a/main/user/user.php b/main/user/user.php index 20cb26ffb1..0aaca2f7e1 100644 --- a/main/user/user.php +++ b/main/user/user.php @@ -292,10 +292,10 @@ Display::display_introduction_section(TOOL_USER, $is_allowed); if( api_is_allowed_to_edit()) { echo "
"; - echo ''.get_lang('ExportAsCSV').' | '; - echo ''.get_lang('ExportAsXLS').' | '; - echo "".get_lang("SubscribeUserToCourse")." | "; - echo "".get_lang("GroupUserManagement").""; + echo ' '.get_lang('ExportAsCSV').' | '; + echo ' '.get_lang('ExportAsXLS').' | '; + echo " ".get_lang("SubscribeUserToCourse")." | "; + echo " ".get_lang("GroupUserManagement").""; if(api_get_setting('use_session_mode')=='false') { echo ' | '.get_lang('Classes').''; @@ -437,12 +437,18 @@ function get_user_data($from, $number_of_items, $column, $direction) $columns[] = "'".get_lang('CourseManager')."'"; } $columns[] = 'u.user_id'; + /*$sql = "SELECT ".implode(',',$columns)." + FROM ".Database::get_main_table(TABLE_MAIN_USER)." `u`, ".Database::get_main_table(TABLE_MAIN_SESSION_COURSE)." c + WHERE `u`.`user_id`= c.`id_coach` + AND c.`course_code`='".$_SESSION['_course']['id']."' + AND c.id_session='".$_SESSION['id_session']."'";*/ + $sql = "SELECT ".implode(',',$columns)." FROM ".Database::get_main_table(TABLE_MAIN_USER)." `u`, ".Database::get_main_table(TABLE_MAIN_SESSION_COURSE)." c WHERE `u`.`user_id`= c.`id_coach` AND c.`course_code`='".$_SESSION['_course']['id']."' - AND c.id_session='".$_SESSION['id_session']."'"; - + "; + $res = api_sql_query($sql, __FILE__, __LINE__); $users = array (); while ($user = mysql_fetch_row($res)) @@ -466,12 +472,18 @@ function get_user_data($from, $number_of_items, $column, $direction) $columns[] = "''"; } $columns[] = 'u.user_id'; + /*$sql = "SELECT ".implode(',',$columns)." + FROM ".Database::get_main_table(TABLE_MAIN_USER)." `u`, ".Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER)." c + WHERE `u`.`user_id`= c.`id_user` + AND c.`course_code`='".$_SESSION['_course']['id']."' + AND c.id_session='".$_SESSION['id_session']."'";*/ + $sql = "SELECT ".implode(',',$columns)." FROM ".Database::get_main_table(TABLE_MAIN_USER)." `u`, ".Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER)." c WHERE `u`.`user_id`= c.`id_user` AND c.`course_code`='".$_SESSION['_course']['id']."' - AND c.id_session='".$_SESSION['id_session']."'"; - + "; + $res = api_sql_query($sql, __FILE__, __LINE__); while ($user = mysql_fetch_row($res)) @@ -485,12 +497,14 @@ function get_user_data($from, $number_of_items, $column, $direction) LEFT JOIN ".Database::get_course_table(TABLE_GROUP)." sg ON ug.group_id = sg.id WHERE ug.user_id IN ('".implode("','", $user_ids)."')"; + $res = api_sql_query($sql,__FILE__,__LINE__); while($group = mysql_fetch_object($res)) { $users[''.$group->user_id][5] .= $group->name.'
'; } } + return $users; } /** @@ -503,15 +517,15 @@ function modify_filter($user_id) global $origin,$_user,$is_allowed_to_track; // info - $result = ''.get_lang('Info').''; + $result = ''.get_lang('Info').' '; if(api_is_allowed_to_edit()) { if($is_allowed_to_track) { - $result .= ''.get_lang('Tracking').''; + $result .= ''.get_lang('Tracking').' '; } // edit - $result .= ''.get_lang('Edit').''; + $result .= ''.get_lang('Edit').' '; // unregister if( $user_id != $_user['user_id']) {