31        include_once 
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php";
 
   32        $this->
ilias = $ilias;
 
   34        $lng->loadLanguageModule(
"sop");
 
   37        $this->ctrl->saveParameter($this, 
"ref_id");
 
   39        $this->offline_mode = $this->offlineMode->getOfflineMode();
 
   45        $this->refId = 
$_GET[
"ref_id"];
 
   47        $this->clientIdSop = $this->offlineMode->getClientIdSop();
 
   49        $this->sop_frm_url = $this->offlineMode->cmd_url . 
'offlineMode_sop';
 
   50        $this->sopcache_url = $this->offlineMode->cmd_url . 
'offlineMode_sopcache';
 
   51        $this->lm_frm_url = $this->offlineMode->lm_cmd_url . 
'offlineMode_il2sop';
 
   52        $this->lmcache_url = $this->offlineMode->lm_cmd_url . 
'offlineMode_lmcache';
 
   53        $this->tracking_url = $this->offlineMode->lm_cmd_url . 
'offlineMode_tracking2sop';
 
   56            case 'offlineMode_sop':
 
   57                $log->write(
"offlineMode_sop");
 
   58                $sop_cache = 
new ilTemplate(
'tpl.cache.html', 
true, 
true, 
'Modules/ScormAicc');
 
   60                $sop_cache->setVariable(
"APPCACHE_URL", $this->sopcache_url);
 
   61                $sop_cache->setVariable(
"CACHE_TITLE", 
"SOP Cache Page");
 
   65            case 'offlineMode_sopcache':
 
   66                $log->write(
"offlineMode_manifest");
 
   67                $sop_manifest = 
new ilTemplate(
'tpl.sop.appcache', 
true, 
true, 
'Modules/ScormAicc');
 
   68                $entries = $this->offlineMode->getSopManifestEntries();
 
   69                $sop_manifest->setVariable(
"CACHE_ENTRIES", $entries);
 
   70                $sop_manifest->setVariable(
"VERSION", 
$vers);
 
   74            case 'offlineMode_il2sop':
 
   75                $log->write(
"offlineMode_il2sop");
 
   76                $lm_cache = 
new ilTemplate(
'tpl.cache.html', 
true, 
true, 
'Modules/ScormAicc');
 
   78                $lm_cache->setVariable(
"APPCACHE_URL", $this->lmcache_url);
 
   79                $lm_cache->setVariable(
"CACHE_TITLE", 
"LM Cache Page");
 
   83            case 'offlineMode_lmcache':
 
   84                $log->write(
"offlineMode_lmcache");
 
   85                $lm_manifest = 
new ilTemplate(
'tpl.lm.appcache', 
true, 
true, 
'Modules/ScormAicc');
 
   90                    $entries = $this->offlineMode->getLmManifestEntries();
 
   92                $lm_manifest->setVariable(
"CACHE_ENTRIES", $entries);
 
   93                $lm_manifest->setVariable(
"VERSION", 
$vers);
 
   97            case 'offlineMode_tracking2sop':
 
   98                $this->offlineMode->tracking2sop();
 
  101            case 'offlineMode_il2sopOk':
 
  102                $this->offlineMode->setOfflineMode(
"offline");
 
  103                $this->
view($this->offlineMode->getOfflineMode(), $cmd);
 
  106            case 'offlineMode_sop2ilpush':
 
  107                $this->offlineMode->sop2il();
 
  110            case 'offlineMode_sop2ilOk':
 
  111                $this->offlineMode->setOfflineMode(
"online");
 
  117            case 'offlineMode_player12':
 
  118                $log->write(
"offlineMode_player12");
 
  119                $player12 = 
new ilTemplate(
'tpl.player12.html', 
false, 
false, 
'Modules/ScormAicc');
 
  120                $player12->setVariable(
"SOP_TITLE", 
"ILIAS SCORM 1.2 Offline Player"); 
 
  121                $js_data = file_get_contents(
"./Modules/ScormAicc/scripts/basisAPI.js");
 
  122                $js_data .= file_get_contents(
"./Modules/ScormAicc/scripts/SCORM1_2standard.js");
 
  123                $player12->setVariable(
"SOP_SCRIPT", $js_data);
 
  127            case 'offlineMode_player2004':
 
  128                $log->write(
"offlineMode_player2004");
 
  131                $langstrings[
'btnStart'] = 
$lng->txt(
'scplayer_start');
 
  132                $langstrings[
'btnExit'] = 
$lng->txt(
'scplayer_exit');
 
  133                $langstrings[
'btnExitAll'] = 
$lng->txt(
'scplayer_exitall');
 
  134                $langstrings[
'btnSuspendAll'] = 
$lng->txt(
'scplayer_suspendall');
 
  135                $langstrings[
'btnPrevious'] = 
$lng->txt(
'scplayer_previous');
 
  136                $langstrings[
'btnContinue'] = 
$lng->txt(
'scplayer_continue');
 
  137                $langstrings[
'btnhidetree']=
$lng->txt(
'scplayer_hidetree');
 
  138                $langstrings[
'btnshowtree']=
$lng->txt(
'scplayer_showtree');
 
  139                $langstrings[
'linkexpandTree']=
$lng->txt(
'scplayer_expandtree');
 
  140                $langstrings[
'linkcollapseTree']=
$lng->txt(
'scplayer_collapsetree');
 
  141                $langstrings[
'contCreditOff']=
$lng->txt(
'cont_credit_off');
 
  148                $player2004 = 
new ilTemplate(
'tpl.player2004.html', 
true, 
true, 
'Modules/ScormAicc');
 
  150                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
  153                $player2004->setVariable(
'JSON_LANGSTRINGS', json_encode($langstrings));
 
  154                $player2004->setVariable(
'TREE_JS', 
"./Modules/Scorm2004/scripts/ilNestedList.js");
 
  155                $player2004->setVariable($langstrings);
 
  156                $player2004->setVariable(
"DOC_TITLE", 
"ILIAS SCORM 2004 Offline Player");
 
  159                $player2004->setVariable(
'TIMESTAMP', 
sprintf(
'%d%03d', $tsint, 1000*(
float) $tsfrac));
 
  160                $player2004->setVariable(
'BASE_DIR', 
'./Modules/Scorm2004/');
 
  162                include_once 
"./Modules/Scorm2004/classes/ilSCORM13Player.php";
 
  163                $player2004->setVariable(
'INLINE_CSS', ilSCORM13Player::getInlineCss());
 
  165                include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
  168                $player2004->setVariable(
'JS_SCRIPTS', 
'./Modules/Scorm2004/scripts/buildrte/rte.js');
 
  177                $this->
sendHtml($player2004->get());
 
  180            case 'offlineMode_som':
 
  181                $log->write(
"offlineMode_som");
 
  182                $som = 
new ilTemplate(
'tpl.som.html', 
true, 
true, 
'Modules/ScormAicc');
 
  183                $som->setVariable(
"SOM_TITLE", 
"ILIAS SCORM Offline Manager"); 
 
  184                $som->setVariable(
"PLAYER12_URL", $this->offlineMode->player12_url);
 
  185                $som->setVariable(
"PLAYER2004_URL", $this->offlineMode->player2004_url);
 
  190                $this->
view($this->offlineMode->getOfflineMode(), $cmd);
 
  199        $tpl->addJavascript(
'./Modules/ScormAicc/scripts/ilsop.js');
 
  200        $tpl->addJavascript(
'./libs/bower/bower_components/pouchdb/dist/pouchdb.min.js');
 
  201        $tpl->addCss(
'./Modules/ScormAicc/templates/sop/sop.css', 
"screen");
 
  202        $tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.scorm_offline_mode.html", 
"Modules/ScormAicc");
 
  203        $tpl->setCurrentBlock(
'offline_content');
 
  204        $tpl->setVariable(
"Command", $cmd);
 
  205        $tpl->setVariable(
"CHECK_SYSTEM_REQUIREMENTS", $this->lng->txt(
'sop_check_system_requirements'));
 
  206        $tpl->setVariable(
"SOP_SYSTEM_CHECK_HTTPS", $this->lng->txt(
'sop_system_check_https'));
 
  207        $tpl->setVariable(
"SOP_SYSTEM_CHECK_ERROR", $this->lng->txt(
'sop_system_check_error'));
 
  208        $tpl->setVariable(
"LM_NOT_EXISTS", $this->lng->txt(
'sop_lm_not_exists'));
 
  209        $tpl->setVariable(
"EXPORT", $this->lng->txt(
'sop_export'));
 
  210        $tpl->setVariable(
"DESC_EXPORT", $this->lng->txt(
'sop_desc_export'));
 
  211        $tpl->setVariable(
"TEXT_START_OFFLINE", $this->lng->txt(
'sop_text_start_offline'));
 
  212        $tpl->setVariable(
"START_SOP", $this->lng->txt(
'sop_start_sop')); 
 
  213        $tpl->setVariable(
"TEXT_START_SOM", $this->lng->txt(
'sop_text_start_som'));
 
  214        $tpl->setVariable(
"START_SOM", $this->lng->txt(
'sop_start_som'));
 
  215        $tpl->setVariable(
"TEXT_PUSH_TRACKING", $this->lng->txt(
'sop_text_push_tracking'));
 
  216        $tpl->setVariable(
"PUSH_TRACKING", $this->lng->txt(
'sop_push_tracking'));
 
  217        $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
 
  218        $tpl->setVariable(
"CLIENT_ID_SOP", $this->clientIdSop);
 
  219        $tpl->setVariable(
"REF_ID", 
$_GET[
'ref_id']);
 
  220        $tpl->setVariable(
"LM_ID", $this->lmId);
 
  222        $tpl->setVariable(
"PURGE_CACHE", $this->lng->txt(
'sop_purge_cache')); 
 
  223        $tpl->setVariable(
"CMD_URL", $this->cmd_url);
 
  224        $tpl->setVariable(
"LM_CMD_URL", $this->offlineMode->lm_cmd_url);
 
  225        $tpl->setVariable(
"SOP_FRM_URL", $this->sop_frm_url);
 
  226        $tpl->setVariable(
"LM_FRM_URL", $this->lm_frm_url);
 
  227        $tpl->setVariable(
"PLAYER12_URL", $this->offlineMode->player12_url);
 
  228        $tpl->setVariable(
"PLAYER2004_URL", $this->offlineMode->player2004_url);
 
  229        $tpl->setVariable(
"SOM_URL", $this->offlineMode->som_url);
 
  230        $tpl->setVariable(
"TRACKING_URL", $this->tracking_url);
 
  231        $tpl->parseCurrentBlock();
 
  237        global $ilTabs, $ilLocator,
$tpl,
$log;
 
  238        $icon = (
$offline_mode == 
"online") ? 
"icon_sahs.svg" : 
"icon_sahs_offline.svg";
 
  239        $tabTitle = $this->lng->txt(
"offline_mode");
 
  240        $thisurl =$this->ctrl->getLinkTarget($this, $a_active);
 
  241        $ilTabs->addTab($a_active, $tabTitle, $thisurl);
 
  242        $ilTabs->activateTab($a_active);
 
  243        $tpl->getStandardTemplate();
 
  246        $ilLocator->addRepositoryItems();
 
  253        header(
'Content-Type: text/html');
 
  254        header(
"Cache-Control: no-cache, must-revalidate"); 
 
  255        header(
"Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 
 
  261        header(
'Content-Type: text/cache-manifest');
 
  262        header(
"Cache-Control: no-cache, must-revalidate"); 
 
  263        header(
"Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
GUI class ilSCORMOfflineModeGUI.
view($offline_mode, $cmd)
sendManifest($manifest_str)
setOfflineModeTabs($offline_mode)
Class ilSCORMOfflineMode.
special template class to simplify handling of ITX/PEAR
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getLocaljQueryPath()
redirection script todo: (a better solution should control the processing via a xml file)