|
@@ 333-337 (lines=5) @@
|
| 330 |
|
*/ |
| 331 |
|
public static function load_session_categories($id = null, $session_id = null) |
| 332 |
|
{ |
| 333 |
|
if (isset($id) && (int) $id === 0) { |
| 334 |
|
$cats = array(); |
| 335 |
|
$cats[] = self::create_root_category(); |
| 336 |
|
return $cats; |
| 337 |
|
} |
| 338 |
|
|
| 339 |
|
$courseInfo = api_get_course_info_by_id(api_get_course_int_id()); |
| 340 |
|
$courseCode = $courseInfo['code']; |
|
@@ 388-393 (lines=6) @@
|
| 385 |
|
) { |
| 386 |
|
//if the category given is explicitly 0 (not null), then create |
| 387 |
|
// a root category object (in memory) |
| 388 |
|
if (isset($id) && (int) $id === 0) { |
| 389 |
|
$cats = array(); |
| 390 |
|
$cats[] = self::create_root_category(); |
| 391 |
|
|
| 392 |
|
return $cats; |
| 393 |
|
} |
| 394 |
|
|
| 395 |
|
$tbl_grade_categories = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY); |
| 396 |
|
$sql = 'SELECT * FROM '.$tbl_grade_categories; |