Skip to content

Commit 2ab7ffa

Browse files
committed
Improve fix for issue with publication of additional links on course homepage (was using c_tool.id instead of c_tool.iid)
1 parent 3652277 commit 2ab7ffa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

main/inc/ajax/course_home.ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$criteria = [
2424
'cId' => $course_id,
2525
'sessionId' => 0,
26-
'id' => (int) $_GET['id']
26+
'iid' => (int) $_GET['id']
2727
];
2828
/** @var CTool $tool */
2929
$tool = $repository->findOneBy($criteria);

main/inc/lib/course_home.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ public static function show_tools_category($all_tools_list, $rows = false)
793793
$link['name'] = Display::return_icon(
794794
'visible.png',
795795
get_lang('Deactivate'),
796-
array('id' => 'linktool_'.$tool['id']),
796+
array('id' => 'linktool_'.$tool['iid']),
797797
ICON_SIZE_SMALL,
798798
false
799799
);
@@ -804,7 +804,7 @@ public static function show_tools_category($all_tools_list, $rows = false)
804804
$link['name'] = Display::return_icon(
805805
'invisible.png',
806806
get_lang('Activate'),
807-
array('id' => 'linktool_'.$tool['id']),
807+
array('id' => 'linktool_'.$tool['iid']),
808808
ICON_SIZE_SMALL,
809809
false
810810
);

0 commit comments

Comments
 (0)