@@ 365-369 (lines=5) @@ | ||
362 | // These links are only visible by the course manager. |
|
363 | unset($lnk); |
|
364 | if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { |
|
365 | if ($tool['visibility'] == '1' || $tool['name'] == TOOL_TRACKING) { |
|
366 | $link['name'] = Display::return_icon('remove.gif', get_lang('Deactivate')); |
|
367 | $link['cmd'] = 'hide=yes'; |
|
368 | $lnk[] = $link; |
|
369 | } |
|
370 | ||
371 | if ($course_tool_category == TOOL_PUBLIC_BUT_HIDDEN) { |
|
372 | $link['name'] = Display::return_icon('add.gif', get_lang('Activate')); |
|
@@ 399-403 (lines=5) @@ | ||
396 | $lnk[] = $link; |
|
397 | } |
|
398 | } |
|
399 | if ($tool['visibility'] == 0 && $tool['added_tool'] == 0) { |
|
400 | $link['name'] = Display::return_icon('delete.gif', get_lang('Remove')); |
|
401 | $link['cmd'] = 'remove=yes'; |
|
402 | $lnk[] = $link; |
|
403 | } |
|
404 | } |
|
405 | if (is_array($lnk)) { |
|
406 | foreach ($lnk as & $this_link) { |