@@ 5893-5905 (lines=13) @@ | ||
5890 | $sql = "SELECT thematic_id FROM $table_tool |
|
5891 | WHERE c_id = $course_id AND id = $ref"; |
|
5892 | $rs_thematic = Database::query($sql); |
|
5893 | if (Database::num_rows($rs_thematic)) { |
|
5894 | $row_thematic = Database::fetch_array($rs_thematic); |
|
5895 | $thematic_id = $row_thematic['thematic_id']; |
|
5896 | ||
5897 | $sql = "SELECT session.id, session.name, user.username |
|
5898 | FROM $tbl_thematic t, $table_session session, $table_user user |
|
5899 | WHERE |
|
5900 | t.c_id = $course_id AND |
|
5901 | t.session_id = session.id AND |
|
5902 | session.id_coach = user.user_id AND |
|
5903 | t.id = $thematic_id"; |
|
5904 | $recorset = Database::query($sql); |
|
5905 | } |
|
5906 | } else { |
|
5907 | $sql = "SELECT session.id, session.name, user.username |
|
5908 | FROM $table_tool tool, $table_session session, $table_user user |
@@ 7099-7108 (lines=10) @@ | ||
7096 | ||
7097 | if ($id != 0 && is_array($extra_info)) { |
|
7098 | $item_title = stripslashes($extra_info['title']); |
|
7099 | } elseif (is_numeric($extra_info)) { |
|
7100 | $sql = "SELECT thread_title as title FROM $tbl_forum |
|
7101 | WHERE c_id = $course_id AND thread_id = " . $extra_info; |
|
7102 | ||
7103 | $result = Database::query($sql); |
|
7104 | $row = Database :: fetch_array($result); |
|
7105 | ||
7106 | $item_title = $row['title']; |
|
7107 | $item_description = ''; |
|
7108 | } else { |
|
7109 | $item_title = ''; |
|
7110 | $item_description = ''; |
|
7111 | } |