| @@ 5650-5656 (lines=7) @@ | ||
| 5647 | } |
|
| 5648 | ||
| 5649 | // Deleted exercise. |
|
| 5650 | if ($this->active == -1) { |
|
| 5651 | return array( |
|
| 5652 | 'value' => false, |
|
| 5653 | 'message' => Display::return_message(get_lang('ExerciseNotFound'), 'warning', false), |
|
| 5654 | 'rawMessage' => get_lang('ExerciseNotFound') |
|
| 5655 | ); |
|
| 5656 | } |
|
| 5657 | ||
| 5658 | // Checking visibility in the item_property table. |
|
| 5659 | $visibility = api_get_item_visibility( |
|
| @@ 5673-5679 (lines=7) @@ | ||
| 5670 | // 2. If the exercise is not active. |
|
| 5671 | if (empty($lpId)) { |
|
| 5672 | // 2.1 LP is OFF |
|
| 5673 | if ($this->active == 0) { |
|
| 5674 | return array( |
|
| 5675 | 'value' => false, |
|
| 5676 | 'message' => Display::return_message(get_lang('ExerciseNotFound'), 'warning', false), |
|
| 5677 | 'rawMessage' => get_lang('ExerciseNotFound') |
|
| 5678 | ); |
|
| 5679 | } |
|
| 5680 | } else { |
|
| 5681 | // 2.1 LP is loaded |
|
| 5682 | if ($this->active == 0 && !learnpath::is_lp_visible_for_student($lpId, api_get_user_id())) { |
|