@@ 1120-1140 (lines=21) @@ | ||
1117 | global $exerciseId, $exe_id; |
|
1118 | // Question is a HOT_SPOT |
|
1119 | //checking document/images visibility |
|
1120 | if (api_is_platform_admin() || api_is_course_admin()) { |
|
1121 | $course = api_get_course_info(); |
|
1122 | $doc_id = DocumentManager::get_document_id( |
|
1123 | $course, |
|
1124 | '/images/' . $pictureName |
|
1125 | ); |
|
1126 | if (is_numeric($doc_id)) { |
|
1127 | $images_folder_visibility = api_get_item_visibility( |
|
1128 | $course, |
|
1129 | 'document', |
|
1130 | $doc_id, |
|
1131 | api_get_session_id() |
|
1132 | ); |
|
1133 | if (!$images_folder_visibility) { |
|
1134 | //This message is shown only to the course/platform admin if the image is set to visibility = false |
|
1135 | Display::display_warning_message( |
|
1136 | get_lang('ChangeTheVisibilityOfTheCurrentImage') |
|
1137 | ); |
|
1138 | } |
|
1139 | } |
|
1140 | } |
|
1141 | $questionName = $objQuestionTmp->selectTitle(); |
|
1142 | $questionDescription = $objQuestionTmp->selectDescription(); |
|
1143 |
@@ 7532-7542 (lines=11) @@ | ||
7529 | } elseif ($answerType == HOT_SPOT || $answerType == HOT_SPOT_DELINEATION) { |
|
7530 | // Question is a HOT_SPOT |
|
7531 | //checking document/images visibility |
|
7532 | if (api_is_platform_admin() || api_is_course_admin()) { |
|
7533 | $course = api_get_course_info(); |
|
7534 | $doc_id = DocumentManager::get_document_id($course, '/images/'.$pictureName); |
|
7535 | if (is_numeric($doc_id)) { |
|
7536 | $images_folder_visibility = api_get_item_visibility($course, 'document', $doc_id, api_get_session_id()); |
|
7537 | if (!$images_folder_visibility) { |
|
7538 | //This message is shown only to the course/platform admin if the image is set to visibility = false |
|
7539 | Display::display_warning_message(get_lang('ChangeTheVisibilityOfTheCurrentImage')); |
|
7540 | } |
|
7541 | } |
|
7542 | } |
|
7543 | $questionName = $objQuestionTmp->selectTitle(); |
|
7544 | $questionDescription = $objQuestionTmp->selectDescription(); |
|
7545 |