| @@ 5596-5602 (lines=7) @@ | ||
| 5593 | } |
|
| 5594 | ||
| 5595 | // Deleted exercise. |
|
| 5596 | if ($this->active == -1) { |
|
| 5597 | return array( |
|
| 5598 | 'value' => false, |
|
| 5599 | 'message' => Display::return_message(get_lang('ExerciseNotFound'), 'warning', false), |
|
| 5600 | 'rawMessage' => get_lang('ExerciseNotFound') |
|
| 5601 | ); |
|
| 5602 | } |
|
| 5603 | ||
| 5604 | // Checking visibility in the item_property table. |
|
| 5605 | $visibility = api_get_item_visibility( |
|
| @@ 5619-5625 (lines=7) @@ | ||
| 5616 | // 2. If the exercise is not active. |
|
| 5617 | if (empty($lpId)) { |
|
| 5618 | // 2.1 LP is OFF |
|
| 5619 | if ($this->active == 0) { |
|
| 5620 | return array( |
|
| 5621 | 'value' => false, |
|
| 5622 | 'message' => Display::return_message(get_lang('ExerciseNotFound'), 'warning', false), |
|
| 5623 | 'rawMessage' => get_lang('ExerciseNotFound') |
|
| 5624 | ); |
|
| 5625 | } |
|
| 5626 | } else { |
|
| 5627 | // 2.1 LP is loaded |
|
| 5628 | if ($this->active == 0 && !learnpath::is_lp_visible_for_student($lpId, api_get_user_id())) { |
|