|
@@ 165-172 (lines=8) @@
|
| 162 |
|
* @author Patrick Cool <[email protected]>, Ghent University |
| 163 |
|
* @assert ('') === false |
| 164 |
|
*/ |
| 165 |
|
public static function get_course_information($course_code) |
| 166 |
|
{ |
| 167 |
|
return Database::fetch_array( |
| 168 |
|
Database::query( |
| 169 |
|
"SELECT *, id as real_id FROM " . Database::get_main_table(TABLE_MAIN_COURSE) . " |
| 170 |
|
WHERE code='" . Database::escape_string($course_code) . "'"), 'ASSOC' |
| 171 |
|
); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
/** |
| 175 |
|
* Returns a list of courses. Should work with quickform syntax |
|
@@ 291-300 (lines=10) @@
|
| 288 |
|
* @return an array with int fields "visibility", "subscribe", "unsubscribe" |
| 289 |
|
* @assert ('') === false |
| 290 |
|
*/ |
| 291 |
|
public static function get_access_settings($course_code) |
| 292 |
|
{ |
| 293 |
|
return Database::fetch_array( |
| 294 |
|
Database::query( |
| 295 |
|
"SELECT visibility, subscribe, unsubscribe |
| 296 |
|
FROM " . Database::get_main_table(TABLE_MAIN_COURSE) . " |
| 297 |
|
WHERE code = '" . Database::escape_string($course_code) . "'" |
| 298 |
|
) |
| 299 |
|
); |
| 300 |
|
} |
| 301 |
|
|
| 302 |
|
/** |
| 303 |
|
* Returns the status of a user in a course, which is COURSEMANAGER or STUDENT. |