| @@ 653-659 (lines=7) @@ | ||
| 650 | $root = array(0, get_lang('RootCat'), $level); |
|
| 651 | $targets[] = $root; |
|
| 652 | ||
| 653 | if (isset($this->courseId) && !empty($this->courseId)) { |
|
| 654 | $crscats = Category::load(null,null,$this->course_code,0); |
|
| 655 | foreach ($crscats as $cat) { |
|
| 656 | $targets[] = array ($cat->get_id(), $cat->get_name(), $level+1); |
|
| 657 | $targets = $this->add_target_subcategories($targets, $level+1, $cat->get_id()); |
|
| 658 | } |
|
| 659 | } |
|
| 660 | ||
| 661 | $indcats = Category::load(null, $user, 0, 0); |
|
| 662 | foreach ($indcats as $cat) { |
|
| @@ 1384-1392 (lines=9) @@ | ||
| 1381 | $root = array(0, get_lang('RootCat'), $level); |
|
| 1382 | $targets[] = $root; |
|
| 1383 | ||
| 1384 | if (isset($this->course_code) && !empty($this->course_code)) { |
|
| 1385 | $crscats = self::load(null, null, $this->course_code, 0); |
|
| 1386 | foreach ($crscats as $cat) { |
|
| 1387 | if ($this->can_be_moved_to_cat($cat)) { |
|
| 1388 | $targets[] = array($cat->get_id(), $cat->get_name(), $level + 1); |
|
| 1389 | $targets = $this->add_target_subcategories($targets, $level + 1, $cat->get_id()); |
|
| 1390 | } |
|
| 1391 | } |
|
| 1392 | } |
|
| 1393 | ||
| 1394 | $indcats = self::load(null, $user, 0, 0); |
|
| 1395 | foreach ($indcats as $cat) { |
|