function viewTopic($course_id, $topic_id) { global $JLMS_DB, $Itemid, $JLMS_CONFIG; $lists = array(); $usertype = $JLMS_CONFIG->get('current_usertype', 0); if ($course_id == $JLMS_CONFIG->get('course_id')) { $row = new JLMS_Topic($JLMS_DB); if ($topic_id) { $row->load($topic_id); } JLMS_topic_html::showTopic($course_id, $topic_id, $row, $lists); } else { $msg = ''; //_JLMS_TOPIC_HACK; JLMSRedirect(sefRelToAbs("index.php?option={$option}&Itemid={$Itemid}&task=details_course&id={$course_id}#topic_{$topic_id}"), $msg); } }