Skip to content

Commit 535f4e7

Browse files
committed
Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19
2 parents 77ee175 + 17b821e commit 535f4e7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

main/inc/lib/course.lib.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,9 @@ public static function get_user_list_from_course_code(
12861286

12871287
if (!empty($session_id)) {
12881288
$sql = 'SELECT DISTINCT user.user_id, session_course_user.status as status_session, user.* ';
1289+
if ($return_count) {
1290+
$sql = " SELECT COUNT(user.user_id) as count";
1291+
}
12891292
$sql .= ' FROM '.Database::get_main_table(TABLE_MAIN_USER).' as user ';
12901293
$sql .= ' LEFT JOIN '.Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER).' as session_course_user
12911294
ON user.user_id = session_course_user.id_user
@@ -1393,11 +1396,11 @@ public static function get_user_list_from_course_code(
13931396
$table_user_field_value = Database::get_main_table(TABLE_MAIN_USER_FIELD_VALUES);
13941397
if ($count_rows) {
13951398
while ($user = Database::fetch_array($rs)) {
1396-
$report_info = array();
1397-
13981399
if ($return_count) {
13991400
return $user['count'];
14001401
}
1402+
$report_info = array();
1403+
14011404
$user_info = $user;
14021405
$user_info['status'] = $user['status'];
14031406

main/work/work.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,7 @@ function getStudentSubscribedToWork($workId, $courseId, $groupId = null, $sessio
28342834
$sessionId,
28352835
null,
28362836
null,
2837-
STUDENT,
2837+
null,
28382838
$getCount
28392839
);
28402840
} else {

0 commit comments

Comments
 (0)