fix bug in course information's user list when multi url enabled

When multi url is enabled, users of multiple portals are listed in the course information. It seems to me it's a bug fixed with this pull request
fixed

Le 25/07/2014 15:53, Julio a écrit :
>
> In main/admin/course_information.php:
>
> > @@ -110,8 +110,16 @@ function get_course_usage($course_code, $session_id = 0)
> >  echo Display::page_header(get_lang('Users'));
> >  $table_course_user     = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
> >  $table_user            = Database :: get_main_table(TABLE_MAIN_USER);
> > -$sql                   = "SELECT *,cu.status as course_status FROM $table_course_user cu, $table_user u WHERE cu.user_id = u.user_id AND cu.course_code = '".$code."' AND cu.relation_type <> ".COURSE_RELATION_TYPE_RRHH." ";
> > -$res                   = Database::query($sql);
> > +$sql = "SELECT *,cu.status as course_status
> > +		FROM $table_course_user cu, $table_user u";
> > +if(api_is_multiple_url_enabled()){
> > +	$sql .= " INNER JOIN ".Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER)." url_rel_user
> > +				ON u.user_id = url_rel_user.user_id
> > +				AND url_rel_user.access_url_id = ".intval(api_get_current_access_url_id());
> > +}
> > +$sql .= " WHERE cu.user_id = u.user_id AND cu.course_code = '".$code."'
> > +		  AND cu.relation_type <> ".COURSE_RELATION_TYPE_RRHH;
> > +$res = Database::query($sql, __FILE__, __LINE__);
>
> Don't need to add "*FILE*, *LINE*"
>
> Is fine with:
>
> $res = Database::query($sql);
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/chamilo/chamilo-lms/pull/325/files#r15401243>.
>

-- 
*Logo Code Couleurs

agence de communication et*
*de développement multimédia

Eric Marguin
*+33 (0) 9 72 44 54 67
http://www.agence-codecouleurs.fr