| @@ 161-172 (lines=12) @@ | ||
| 158 | return $row; |
|
| 159 | } |
|
| 160 | ||
| 161 | function list_tutor($specialtyId) |
|
| 162 | {
|
|
| 163 | global $tableSepeSpecialtyTutors; |
|
| 164 | $sql = "SELECT * FROM $tableSepeSpecialtyTutors WHERE specialty_id = $specialtyId"; |
|
| 165 | $res = Database::query($sql); |
|
| 166 | if (Database::num_rows($res) > 0) {
|
|
| 167 | $row = Database::fetch_assoc($res); |
|
| 168 | } else {
|
|
| 169 | $row = false; |
|
| 170 | } |
|
| 171 | return $row; |
|
| 172 | } |
|
| 173 | ||
| 174 | function getCentersList() |
|
| 175 | {
|
|
| @@ 5517-5527 (lines=11) @@ | ||
| 5514 | * @param int $courseId |
|
| 5515 | * @return bool |
|
| 5516 | */ |
|
| 5517 | public static function hasCourseSetting($variable, $courseId) |
|
| 5518 | { |
|
| 5519 | $courseSetting = Database::get_course_table(TABLE_COURSE_SETTING); |
|
| 5520 | $courseId = intval($courseId); |
|
| 5521 | $variable = Database::escape_string($variable); |
|
| 5522 | $sql = "SELECT variable FROM $courseSetting |
|
| 5523 | WHERE c_id = $courseId AND variable = '$variable'"; |
|
| 5524 | $result = Database::query($sql); |
|
| 5525 | ||
| 5526 | return Database::num_rows($result) > 0; |
|
| 5527 | } |
|
| 5528 | ||
| 5529 | /** |
|
| 5530 | * Get information from the track_e_course_access table |
|
| @@ 2824-2839 (lines=16) @@ | ||
| 2821 | * |
|
| 2822 | * @return array |
|
| 2823 | */ |
|
| 2824 | public function getAllUserPerTag($fieldId, $tag) |
|
| 2825 | { |
|
| 2826 | $tagRelUserTable = Database::get_main_table(TABLE_MAIN_USER_REL_TAG); |
|
| 2827 | $tag = Database::escape_string($tag); |
|
| 2828 | $fieldId = (int) $fieldId; |
|
| 2829 | ||
| 2830 | $sql = "SELECT user_id |
|
| 2831 | FROM {$this->table_field_tag} f INNER JOIN $tagRelUserTable ft |
|
| 2832 | ON tag_id = f.id |
|
| 2833 | WHERE tag = '$tag' AND f.field_id = $fieldId; |
|
| 2834 | "; |
|
| 2835 | ||
| 2836 | $result = Database::query($sql); |
|
| 2837 | ||
| 2838 | return Database::store_result($result, 'ASSOC'); |
|
| 2839 | } |
|
| 2840 | ||
| 2841 | /** |
|
| 2842 | * @param int $fieldId |
|