25 include_once
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php";
26 $this->
ilias =& $ilias;
28 $lng->loadLanguageModule(
"sop");
31 $this->ctrl->saveParameter($this,
"ref_id");
33 $this->online_icon =
'icon_slm_b.png';
34 $this->offline_icon =
'icon_slm_b_offline.png';
42 $this->clientIdSop = $this->offlineMode->getClientIdSop();
43 $cmd = $ilCtrl->getCmd();
46 case 'offlineMode_il2sopContent':
49 case 'offlineMode_il2sop':
50 $this->offlineMode->il2sop();
52 case 'offlineMode_il2sopStop':
53 $this->offlineMode->setOfflineMode(
"online");
54 $this->
view($this->offlineMode->getOfflineMode(),
"msg_export_failure");
56 case 'offlineMode_il2sopOk':
57 $this->offlineMode->setOfflineMode(
"offline");
58 $this->
view($this->offlineMode->getOfflineMode(),
"msg_export_ok");
60 case 'offlineMode_sop2il':
61 $this->offlineMode->sop2il();
63 case 'offlineMode_sop2ilStop':
64 $this->offlineMode->setOfflineMode(
"offline");
65 $this->
view($this->offlineMode->getOfflineMode(),
"msg_push_tracking_failure");
67 case 'offlineMode_sop2ilOk':
68 $this->offlineMode->setOfflineMode(
"online");
69 $this->
view($this->offlineMode->getOfflineMode(),
"msg_push_tracking_ok");
72 if ($this->offlineMode->getOfflineMode() ==
"il2sop") $this->offlineMode->setOfflineMode(
"online");
73 $this->
view($this->offlineMode->getOfflineMode());
78 function view($offline_mode,$message=
"") {
80 $this->icon = ($offline_mode ==
"offline") ? $this->offline_icon : $this->online_icon;
82 $tpl->setCurrentBlock(
'mh_meta_item');
83 $tpl->setVariable(
'MH_META_NAME',
'require-sop-version');
84 $tpl->setVariable(
'MH_META_CONTENT',
"0.1");
85 $tpl->parseCurrentBlock();
87 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scorm_offline_mode.html",
"Modules/ScormAicc");
88 $tpl->setCurrentBlock(
'offline_content');
91 $tpl->setVariable(
"CHECK_SYSTEM_REQUIREMENTS",$this->lng->txt(
'sop_check_system_requirements'));
92 $tpl->setVariable(
"FIREFOX_REQUIRED",$this->lng->txt(
'sop_firefox_required'));
93 $tpl->setVariable(
"ALREADY_EXPORTED",$this->lng->txt(
'sop_already_exported'));
94 $tpl->setVariable(
"XPI_INSTALL",sprintf($this->lng->txt(
'sop_xpi_install'),
"<a href='./Modules/ScormAicc/sop/sop.xpi'>sop.xpi</a>",
false));
95 $tpl->setVariable(
"RELOAD_PAGE",$this->lng->txt(
'sop_reload_page'));
96 $tpl->setVariable(
"TEXT_EXPORT",$this->lng->txt(
'sop_text_export'));
97 $tpl->setVariable(
"EXPORT",$this->lng->txt(
'sop_export'));
98 $tpl->setVariable(
"DESC_EXPORT",$this->lng->txt(
'sop_desc_export'));
99 $tpl->setVariable(
"TEXT_START_OFFLINE",$this->lng->txt(
'sop_text_start_offline'));
100 $tpl->setVariable(
"START_OFFLINE",$this->lng->txt(
'sop_start_offline'));
101 $tpl->setVariable(
"TEXT_START_SOM",$this->lng->txt(
'sop_text_start_som'));
102 $tpl->setVariable(
"START_SOM",$this->lng->txt(
'sop_start_som'));
103 $tpl->setVariable(
"TEXT_PUSH_TRACKING",$this->lng->txt(
'sop_text_push_tracking'));
104 $tpl->setVariable(
"PUSH_TRACKING",$this->lng->txt(
'sop_push_tracking'));
105 $tpl->setVariable(
"MSG_LM_NOT_EXISTS",$this->lng->txt(
'sop_msg_lm_not_exists'));
106 $tpl->setVariable(
"MSG_CLOSE_LM",$this->lng->txt(
'sop_msg_close_lm'));
107 $tpl->setVariable(
"MSG_EXPORT_CONTENT",$this->lng->txt(
'sop_msg_export_content'));
108 $tpl->setVariable(
"MSG_EXPORT_TRACKING",$this->lng->txt(
'sop_msg_export_tracking'));
109 $tpl->setVariable(
"MSG_PUSH_TRACKING",$this->lng->txt(
'sop_msg_push_tracking'));
110 $tpl->setVariable(
"MSG_PUSH_TRACKING_OK",$this->lng->txt(
'sop_msg_push_tracking_ok'));
112 $tpl->setVariable(
"CLIENT_ID",CLIENT_ID);
113 $tpl->setVariable(
"CLIENT_ID_SOP",$this->clientIdSop);
114 $tpl->setVariable(
"REF_ID",
$_GET[
'ref_id']);
115 $tpl->setVariable(
"LM_ID",$this->lmId);
116 $tpl->setVariable(
"OFFLINE_MODE",$offline_mode);
117 if ($message !=
"") $tpl->setVariable(
"MESSAGE_RESULT",$this->lng->txt(
'sop_'.$message));
120 $tpl->parseCurrentBlock();
128 global $ilTabs, $ilLocator,
$tpl;
129 $icon = ($this->offlineMode->getOfflineMode() ==
"online") ?
"icon_slm_b.png" :
"icon_slm_b_offline.png";
130 $tabTitle = $this->lng->txt(
"offline_mode");
131 $thisurl =$this->ctrl->getLinkTarget($this, $a_active);
132 $ilTabs->addTab($a_active, $tabTitle, $thisurl);
133 $ilTabs->activateTab($a_active);
134 $tpl->getStandardTemplate();
137 $ilLocator->addRepositoryItems();
ilSCORMOfflineModeGUI($type)
GUI class ilSCORMOfflineModeGUI.
static _lookupTitle($a_id)
lookup object title
view($offline_mode, $message="")
static _lookupObjectId($a_ref_id)
lookup object id
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
redirection script todo: (a better solution should control the processing via a xml file) ...
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
setOfflineModeTabs($a_active)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static getDataDir()
get data directory (outside webspace)
Class ilSCORMOfflineMode.