| @@ 1146-1160 (lines=15) @@ | ||
| 1143 | //checking document/images visibility |
|
| 1144 | if (api_is_platform_admin() || api_is_course_admin()) { |
|
| 1145 | $doc_id = $objQuestionTmp->getPictureId(); |
|
| 1146 | if (is_numeric($doc_id)) { |
|
| 1147 | $images_folder_visibility = api_get_item_visibility( |
|
| 1148 | $course, |
|
| 1149 | 'document', |
|
| 1150 | $doc_id, |
|
| 1151 | api_get_session_id() |
|
| 1152 | ); |
|
| 1153 | if (!$images_folder_visibility) { |
|
| 1154 | //This message is shown only to the course/platform admin if the image is set to visibility = false |
|
| 1155 | echo Display::return_message( |
|
| 1156 | get_lang('ChangeTheVisibilityOfTheCurrentImage'), |
|
| 1157 | 'warning' |
|
| 1158 | ); |
|
| 1159 | } |
|
| 1160 | } |
|
| 1161 | } |
|
| 1162 | $questionName = $objQuestionTmp->selectTitle(); |
|
| 1163 | $questionDescription = $objQuestionTmp->selectDescription(); |
|
| @@ 1279-1290 (lines=12) @@ | ||
| 1276 | $relPath = api_get_path(WEB_CODE_PATH); |
|
| 1277 | if (api_is_platform_admin() || api_is_course_admin()) { |
|
| 1278 | $docId = DocumentManager::get_document_id($course, '/images/'.$pictureName); |
|
| 1279 | if ($docId) { |
|
| 1280 | $images_folder_visibility = api_get_item_visibility( |
|
| 1281 | $course, |
|
| 1282 | 'document', |
|
| 1283 | $docId, |
|
| 1284 | api_get_session_id() |
|
| 1285 | ); |
|
| 1286 | ||
| 1287 | if (!$images_folder_visibility) { |
|
| 1288 | echo Display::return_message(get_lang('ChangeTheVisibilityOfTheCurrentImage'), 'warning'); |
|
| 1289 | } |
|
| 1290 | } |
|
| 1291 | ||
| 1292 | if ($freeze) { |
|
| 1293 | echo Display::img( |
|