|
@@ 5692-5704 (lines=13) @@
|
| 5689 |
|
// is from a non-session context, hide the edition capabilities |
| 5690 |
|
if ($is_read_only /* or ($session_id!=api_get_session_id()) */) { |
| 5691 |
|
if (api_is_course_admin() || api_is_platform_admin()) { |
| 5692 |
|
if ($extension == 'svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') { |
| 5693 |
|
$modify_icons = '<a href="edit_draw.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5694 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5695 |
|
} elseif (in_array($extension, $web_odf_extension_list) && api_get_setting('enabled_support_odf') === true) { |
| 5696 |
|
$modify_icons = '<a href="edit_odf.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5697 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5698 |
|
} elseif ($extension == 'png' || $extension == 'jpg' || $extension == 'jpeg' || $extension == 'bmp' || $extension == 'gif' || $extension == 'pxd' && api_get_setting('enabled_support_pixlr') == 'true') { |
| 5699 |
|
$modify_icons = '<a href="edit_paint.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5700 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5701 |
|
} else { |
| 5702 |
|
$modify_icons = '<a href="edit_document.php?' . $courseParams . '&id=' . $document_id. '">' . |
| 5703 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5704 |
|
} |
| 5705 |
|
} else { |
| 5706 |
|
$modify_icons = Display::return_icon('edit_na.png', get_lang('Modify'), '', ICON_SIZE_SMALL); |
| 5707 |
|
} |
|
@@ 5723-5735 (lines=13) @@
|
| 5720 |
|
} else { |
| 5721 |
|
if ($sessionId) { |
| 5722 |
|
if ($document_data['session_id'] == $sessionId) { |
| 5723 |
|
if ($extension == 'svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') { |
| 5724 |
|
$modify_icons = '<a href="edit_draw.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5725 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5726 |
|
} elseif (in_array($extension, $web_odf_extension_list) && api_get_setting('enabled_support_odf') === true) { |
| 5727 |
|
$modify_icons = '<a href="edit_odf.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5728 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5729 |
|
} elseif ($extension == 'png' || $extension == 'jpg' || $extension == 'jpeg' || $extension == 'bmp' || $extension == 'gif' || $extension == 'pxd' && api_get_setting('enabled_support_pixlr') == 'true') { |
| 5730 |
|
$modify_icons = '<a href="edit_paint.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5731 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5732 |
|
} else { |
| 5733 |
|
$modify_icons = '<a href="edit_document.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5734 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5735 |
|
} |
| 5736 |
|
} else { |
| 5737 |
|
$modify_icons .= ' ' . Display::return_icon('edit_na.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
| 5738 |
|
} |
|
@@ 5739-5753 (lines=15) @@
|
| 5736 |
|
} else { |
| 5737 |
|
$modify_icons .= ' ' . Display::return_icon('edit_na.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
| 5738 |
|
} |
| 5739 |
|
} else { |
| 5740 |
|
if ($extension == 'svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') { |
| 5741 |
|
$modify_icons = '<a href="edit_draw.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5742 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5743 |
|
} elseif (in_array($extension, $web_odf_extension_list) && api_get_setting('enabled_support_odf') === true) { |
| 5744 |
|
$modify_icons = '<a href="edit_odf.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5745 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5746 |
|
} elseif ($extension == 'png' || $extension == 'jpg' || $extension == 'jpeg' || $extension == 'bmp' || $extension == 'gif' || $extension == 'pxd' && api_get_setting('enabled_support_pixlr') == 'true') { |
| 5747 |
|
$modify_icons = '<a href="edit_paint.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5748 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5749 |
|
} else { |
| 5750 |
|
$modify_icons = '<a href="edit_document.php?' . $courseParams . '&id=' . $document_id . '">' . |
| 5751 |
|
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL) . '</a>'; |
| 5752 |
|
} |
| 5753 |
|
} |
| 5754 |
|
} |
| 5755 |
|
|
| 5756 |
|
// Move button. |