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 '
";
- 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 = '
';
+ $result = '
';
if(api_is_allowed_to_edit())
{
if($is_allowed_to_track)
{
- $result .= '
';
+ $result .= '
';
}
// edit
- $result .= '
';
+ $result .= '
';
// unregister
if( $user_id != $_user['user_id'])
{