/** * Constructor * @access public */ public function __construct(ilObjForumGUI $gui, ilForumTopic $topic, ilForumProperties $properties) { global $tpl, $ilCtrl; $this->gui = $gui; $this->topic = $topic; $this->properties = $properties; $this->tpl = new ilTemplate('tpl.frm_tree.html', true, true, 'Modules/Forum'); ilYuiUtil::initConnection(); $tpl->addJavaScript(ilYuiUtil::getLocalPath() . '/yahoo/yahoo-min.js'); $tpl->addJavaScript(ilYuiUtil::getLocalPath() . '/event/event-min.js'); $tpl->addJavaScript('./Modules/Forum/js/treeview.js'); $tpl->addJavaScript('./Modules/Forum/js/treeview_extensions.js'); $tpl->addCss('./Modules/Forum/css/forum_tree.css'); // Set ref_id for urls $ilCtrl->setParameter($this->gui, 'thr_pk', $this->topic->getId()); $ilCtrl->setParameter($this->gui, 'backurl', null); // Set urls for async commands $this->tpl->setVariable('THR_TREE_STATE_URL', $ilCtrl->getLinkTarget($this->gui, 'setTreeStateAsynch', '', true, false)); $this->tpl->setVariable('THR_TREE_FETCH_CHILDREN_URL', $ilCtrl->getLinkTarget($this->gui, 'fetchTreeChildrenAsync', '', true, false)); // Fetch root id of the thread node $this->root_id = $this->topic->getFirstPostNode()->getId(); if (!is_array($_SESSION['frm'][$this->topic->getId()]['openTreeNodes'])) { $_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes'] = array(0); } // Prevent key gaps shuffle($_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes']); }
/** * Export support scripts * * @param * @return */ function exportSupportScripts() { // export flv/mp3 player //copy(ilPlayerUtil::getFlashVideoPlayerFilename(true), // $this->js_dir."/".ilPlayerUtil::getFlashVideoPlayerFilename()); //copy("./Services/MediaObjects/flash_mp3_player/mp3player.swf", // $this->mp3_dir."/mp3player.swf"); // basic js copy('./Services/JavaScript/js/Basic.js', $this->js_dir . '/Basic.js'); copy('./Services/UIComponent/Overlay/js/ilOverlay.js', $this->js_dir . '/ilOverlay.js'); // jquery include_once "./Services/jQuery/classes/class.iljQueryUtil.php"; copy(iljQueryUtil::getLocaljQueryPath(), $this->js_dir . '/jquery.js'); copy(iljQueryUtil::getLocaljQueryUIPath(), $this->js_dir . '/jquery-ui-min.js'); copy(iljQueryUtil::getLocalMaphilightPath(), $this->js_dir . '/maphilight.js'); // yui stuff we use include_once "./Services/YUI/classes/class.ilYuiUtil.php"; copy(ilYuiUtil::getLocalPath('yahoo/yahoo-min.js'), $this->js_yahoo_dir . '/yahoo-min.js'); copy(ilYuiUtil::getLocalPath('yahoo-dom-event/yahoo-dom-event.js'), $this->js_yahoo_dir . '/yahoo-dom-event.js'); copy(ilYuiUtil::getLocalPath('animation/animation-min.js'), $this->js_yahoo_dir . '/animation-min.js'); copy(ilYuiUtil::getLocalPath('container/container-min.js'), $this->js_yahoo_dir . '/container-min.js'); copy(ilYuiUtil::getLocalPath('container/assets/skins/sam/container.css'), $this->css_dir . '/container.css'); // accordion copy('./Services/Accordion/js/accordion.js', $this->js_dir . '/accordion.js'); copy('./Services/Accordion/css/accordion.css', $this->css_dir . '/accordion.css'); // page presentation js copy('./Services/COPage/js/ilCOPagePres.js', $this->js_dir . '/ilCOPagePres.js'); // tooltip copy('./Services/UIComponent/Tooltip/js/ilTooltip.js', $this->js_dir . '/ilTooltip.js'); // mediaelement.js include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php"; ilPlayerUtil::copyPlayerFilesToTargetDirectory($this->flv_dir); // copy(ilPlayerUtil::getLocalMediaElementCssPath(), // $this->css_dir.'/mediaelementplayer.css'); // copy(ilPlayerUtil::getLocalMediaElementJsPath(), // $this->js_dir.'/mediaelement-and-player.js'); }
public function debugGUI() { global $lng; $lng->loadLanguageModule("scormdebug"); /* if ($_POST['password'] == $this->slm->getDebugPw()) { $_SESSION["debug_pw"] = $this->slm->getDebugPw(); } if ($_SESSION["debug_pw"]!=$this->slm->getDebugPw()) { $this->tpl = new ilTemplate("tpl.scorm2004.debug_pw.html", false, false, "./Modules/Scorm2004"); $this->tpl->setVariable('SUBMIT', $lng->txt("debugwindow_submit")); $this->tpl->setVariable('CANCEL', $lng->txt("debugwindow_cancel")); $this->tpl->setVariable('PASSWORD_ENTER', $lng->txt("debugwindow_password_enter")); $this->tpl->setVariable('DEBUG_URL','ilias.php?baseClass=ilSAHSPresentationGUI' .'&cmd=debugGUI&ref_id='.$_GET["ref_id"]); } else {*/ $this->tpl = new ilTemplate("tpl.scorm2004.debug.html", false, false, "./Modules/Scorm2004"); $this->tpl->setVariable('CONSOLE', $lng->txt("debugwindow_console")); $this->tpl->setVariable('LOGS', $lng->txt("debugwindow_logs")); $this->tpl->setVariable('COMMENT', $lng->txt("debugwindow_comment")); $this->tpl->setVariable('COMMENT_ENTER', $lng->txt("debugwindow_comment_enter")); $this->tpl->setVariable('START_RECORDING', $lng->txt("debugwindow_start_recording")); $this->tpl->setVariable('STOP_RECORDING', $lng->txt("debugwindow_stop_recording")); $this->tpl->setVariable('DELETE_LOGFILE', $lng->txt("debugwindow_delete_logfile")); $this->tpl->setVariable('SUBMISSION_FAILED', $lng->txt("debugwindow_submission_failed")); $this->tpl->setVariable('SUBMIT', $lng->txt("debugwindow_submit")); $this->tpl->setVariable('CANCEL', $lng->txt("debugwindow_cancel")); $this->tpl->setVariable('FILENAME', $lng->txt("debugwindow_filename")); $this->tpl->setVariable('DATE', $lng->txt("debugwindow_date")); $this->tpl->setVariable('ACTION', $lng->txt("debugwindow_action")); $this->tpl->setVariable('RECORD_IMG', ilUtil::getImagePath("record.png", "./Modules/Scorm2004")); $this->tpl->setVariable('STOP_IMG', ilUtil::getImagePath("stop.png", "./Modules/Scorm2004")); $this->tpl->setVariable('COMMENT_IMG', ilUtil::getImagePath("comment.png", "./Modules/Scorm2004")); $logfile = $this->logFileName() . ".html"; $this->tpl->setVariable('LOGFILE', $this->logFileName() . ".html"); $this->tpl->setVariable('FILES_DATA', json_encode($this->getLogFileList($lng->txt("debugwindow_delete"), $lng->txt("debugwindow_download"), $lng->txt("debugwindow_open")))); // path to latest yui distribution include_once "Services/YUI/classes/class.ilYuiUtil.php"; $this->tpl->setVariable('PATH_YUI', ilYuiUtil::getLocalPath()); //} echo $this->tpl->get("DEFAULT", true); }
/** * Get supplying export files * * @param * @return */ static function getSupplyingExportFiles($a_target_dir = ".") { include_once "./Services/YUI/classes/class.ilYuiUtil.php"; include_once "./Services/jQuery/classes/class.iljQueryUtil.php"; include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php"; $scripts = array(array("source" => ilYuiUtil::getLocalPath('yahoo/yahoo-min.js'), "target" => $a_target_dir . '/js/yahoo/yahoo-min.js', "type" => "js"), array("source" => ilYuiUtil::getLocalPath('yahoo-dom-event/yahoo-dom-event.js'), "target" => $a_target_dir . '/js/yahoo/yahoo-dom-event.js', "type" => "js"), array("source" => ilYuiUtil::getLocalPath('animation/animation-min.js'), "target" => $a_target_dir . '/js/yahoo/animation-min.js', "type" => "js"), array("source" => './Services/JavaScript/js/Basic.js', "target" => $a_target_dir . '/js/Basic.js', "type" => "js"), array("source" => './Services/Accordion/js/accordion.js', "target" => $a_target_dir . '/js/accordion.js', "type" => "js"), array("source" => './Services/Accordion/css/accordion.css', "target" => $a_target_dir . '/css/accordion.css', "type" => "css"), array("source" => iljQueryUtil::getLocaljQueryPath(), "target" => $a_target_dir . '/js/jquery.js', "type" => "js"), array("source" => iljQueryUtil::getLocalMaphilightPath(), "target" => $a_target_dir . '/js/maphilight.js', "type" => "js"), array("source" => iljQueryUtil::getLocaljQueryUIPath(), "target" => $a_target_dir . '/js/jquery-ui-min.js', "type" => "js"), array("source" => './Services/COPage/js/ilCOPagePres.js', "target" => $a_target_dir . '/js/ilCOPagePres.js', "type" => "js"), array("source" => './Modules/Scorm2004/scripts/questions/pure.js', "target" => $a_target_dir . '/js/pure.js', "type" => "js"), array("source" => './Modules/Scorm2004/scripts/questions/question_handling.js', "target" => $a_target_dir . '/js/question_handling.js', "type" => "js"), array("source" => './Modules/Scorm2004/templates/default/question_handling.css', "target" => $a_target_dir . '/css/question_handling.css', "type" => "css"), array("source" => ilPlayerUtil::getLocalMediaElementJsPath(), "target" => $a_target_dir . "/" . ilPlayerUtil::getLocalMediaElementJsPath(), "type" => "js"), array("source" => ilPlayerUtil::getLocalMediaElementCssPath(), "target" => $a_target_dir . "/" . ilPlayerUtil::getLocalMediaElementCssPath(), "type" => "css")); $mathJaxSetting = new ilSetting("MathJax"); $use_mathjax = $mathJaxSetting->get("enable"); if ($use_mathjax) { $scripts[] = array("source" => "", "target" => $mathJaxSetting->get("path_to_mathjax"), "type" => "js"); } return $scripts; }
/** * Export support scripts * * @param * @return */ function exportSupportScripts() { // basic js copy('./Services/JavaScript/js/Basic.js', $this->js_dir . '/Basic.js'); copy('./Services/UIComponent/Overlay/js/ilOverlay.js', $this->js_dir . '/ilOverlay.js'); // jquery include_once "./Services/jQuery/classes/class.iljQueryUtil.php"; copy(iljQueryUtil::getLocaljQueryPath(), $this->js_dir . '/jquery.js'); copy(iljQueryUtil::getLocaljQueryUIPath(), $this->js_dir . '/jquery-ui-min.js'); copy(iljQueryUtil::getLocalMaphilightPath(), $this->js_dir . '/maphilight.js'); // yui stuff we use include_once "./Services/YUI/classes/class.ilYuiUtil.php"; copy(ilYuiUtil::getLocalPath('yahoo/yahoo-min.js'), $this->js_yahoo_dir . '/yahoo-min.js'); copy(ilYuiUtil::getLocalPath('yahoo-dom-event/yahoo-dom-event.js'), $this->js_yahoo_dir . '/yahoo-dom-event.js'); copy(ilYuiUtil::getLocalPath('animation/animation-min.js'), $this->js_yahoo_dir . '/animation-min.js'); copy(ilYuiUtil::getLocalPath('container/container-min.js'), $this->js_yahoo_dir . '/container-min.js'); copy(ilYuiUtil::getLocalPath('container/assets/skins/sam/container.css'), $this->css_dir . '/container.css'); // accordion copy('./Services/Accordion/js/accordion.js', $this->js_dir . '/accordion.js'); copy('./Services/Accordion/css/accordion.css', $this->css_dir . '/accordion.css'); // page presentation js copy('./Services/COPage/js/ilCOPagePres.js', $this->js_dir . '/ilCOPagePres.js'); // tooltip copy('./Services/UIComponent/Tooltip/js/ilTooltip.js', $this->js_dir . '/ilTooltip.js'); // mediaelement.js include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php"; ilPlayerUtil::copyPlayerFilesToTargetDirectory($this->flv_dir); // matching question copy('./Modules/TestQuestionPool/js/ilMatchingQuestion.js', $this->js_dir . '/ilMatchingQuestion.js'); copy('./Modules/TestQuestionPool/templates/default/test_javascript.css', $this->css_dir . '/test_javascript.css'); // copy(ilPlayerUtil::getLocalMediaElementCssPath(), // $this->css_dir.'/mediaelementplayer.css'); // copy(ilPlayerUtil::getLocalMediaElementJsPath(), // $this->js_dir.'/mediaelement-and-player.js'); }