Merge pull request #681 from ilosada/fix_queries

Fix some chamilo queries
1.10.x
Yannick Warnier 10 years ago
commit ee679fd131
  1. 2
      main/inc/lib/course.lib.php
  2. 2
      main/inc/lib/tracking.lib.php
  3. 2
      main/inc/local.inc.php

@ -3259,7 +3259,7 @@ class CourseManager
$tableSessionRelCourse = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
$orderBy = ' ORDER BY position';
$extraInnerJoin = " INNER JOIN $tableSessionRelCourse src
ON (c.code = src.course_code AND session_id = $sessionId) ";
ON (c.id = src.c_id AND session_id = $sessionId) ";
}
}

@ -3078,7 +3078,7 @@ class Tracking
$sql = "SELECT DISTINCT code, c_id
FROM $tbl_session_course sc
INNER JOIN $courseTable c
sc.c_id = c.id
ON sc.c_id = c.id
WHERE session_id= $session_id";
$result = Database::query($sql);

@ -1089,7 +1089,7 @@ if ((isset($uidReset) && $uidReset) || (isset($cidReset) && $cidReset)) {
$is_sessionAdmin = true;
} else {
// Am I a session coach for this session?
$sql = "SELECT id, id_coach FROM $tbl_session session
$sql = "SELECT session.id, session.id_coach FROM $tbl_session session
INNER JOIN $tbl_session_course sc
ON sc.session_id = session.id
WHERE session.id = $session_id

Loading…
Cancel
Save