|
|
|
@ -333,6 +333,7 @@ class CourseHome |
|
|
|
|
) { |
|
|
|
|
$tool['link'] = $web_code_path.$tool['link']; |
|
|
|
|
} |
|
|
|
|
$class = ''; |
|
|
|
|
if ($course_tool_category == TOOL_PUBLIC_BUT_HIDDEN) { |
|
|
|
|
$class = 'class="invisible"'; |
|
|
|
|
} |
|
|
|
@ -344,7 +345,7 @@ class CourseHome |
|
|
|
|
if (strpos($tool['name'], 'visio_') !== false) { |
|
|
|
|
$html .= '<a '.$class.' href="javascript: void(0);" onclick="javascript: window.open(\''.htmlspecialchars($tool['link']).(($tool['image'] == 'external.gif' || $tool['image'] == 'external_na.gif') ? '' : $qm_or_amp.api_get_cidreq()).'\',\'window_visio'.api_get_course_id().'\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="'.$tool['target'].'">'; |
|
|
|
|
} elseif (strpos($tool['name'], 'chat') !== false && api_get_course_setting('allow_open_chat_window')) { |
|
|
|
|
$html .= '<a href="javascript: void(0);" onclick="javascript: window.open(\''.htmlspecialchars($tool['link']).$qm_or_amp.api_get_cidreq().'\',\'window_chat'.api_get_course_id().'\',config=\'height=\'+600+\', width=\'+825+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="'.$tool['target'].'"'.$class.'>'; |
|
|
|
|
$html .= '<a href="javascript: void(0);" onclick="javascript: window.open(\''.htmlspecialchars($tool['link']).$qm_or_amp.api_get_cidreq().'\',\'window_chat'.api_get_course_id().'\',config=\'height=\'+600+\', width=\'+825+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="'.$tool['target'].'" '.$class.'>'; |
|
|
|
|
} else { |
|
|
|
|
$html .= '<a href="'.htmlspecialchars($tool['link']).(($tool['image'] == 'external.gif' || $tool['image'] == 'external_na.gif') ? '' : $qm_or_amp.api_get_cidreq()).'" target="'.$tool['target'].'" '.$class.'>'; |
|
|
|
|
} |
|
|
|
@ -384,7 +385,7 @@ class CourseHome |
|
|
|
|
$lnk[] = $link; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($tool['adminlink']) { |
|
|
|
|
if (isset($tool['adminlink'])) { |
|
|
|
|
$html .= '<a href="'.$tool['adminlink'].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -413,7 +414,7 @@ class CourseHome |
|
|
|
|
$html .= '<div class="btn-options">'; |
|
|
|
|
$html .= '<div class="btn-group btn-group-sm" role="group">'; |
|
|
|
|
foreach ($lnk as & $this_link) { |
|
|
|
|
if (!$tool['adminlink']) { |
|
|
|
|
if (!isset($tool['adminlink'])) { |
|
|
|
|
$html .= '<a class="btn btn-default" title='.$this_link['title'].' href="'.api_get_self().'?'.api_get_cidreq().'&id='.$tool['id'].'&'.$this_link['cmd'].'">'.$this_link['name'].'</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|