GUI class ilSCORMOfflineModeGUI.
More...
◆ __construct()
ilSCORMOfflineModeGUI::__construct |
( |
|
$type | ) |
|
Definition at line 23 of file class.ilSCORMOfflineModeGUI.php.
References $ilCtrl, $lng, $online_icon, and $tpl.
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_lm.svg';
34 $this->offline_icon =
'icon_slm_offline.svg';
redirection script todo: (a better solution should control the processing via a xml file) ...
Class ilSCORMOfflineMode.
◆ executeCommand()
ilSCORMOfflineModeGUI::executeCommand |
( |
| ) |
|
Definition at line 38 of file class.ilSCORMOfflineModeGUI.php.
References $_GET, $cmd, $ilCtrl, $tpl, ilObject\_lookupObjectId(), ilUtil\deliverFile(), ilUtil\getDataDir(), setOfflineModeTabs(), and view().
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());
view($offline_mode, $message="")
static _lookupObjectId($a_ref_id)
lookup object id
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)
◆ importStop()
ilSCORMOfflineModeGUI::importStop |
( |
| ) |
|
◆ setOfflineModeTabs()
ilSCORMOfflineModeGUI::setOfflineModeTabs |
( |
|
$a_active | ) |
|
Definition at line 135 of file class.ilSCORMOfflineModeGUI.php.
References $tpl, ilObject\_lookupTitle(), and ilUtil\getImagePath().
Referenced by executeCommand().
137 global $ilTabs, $ilLocator,
$tpl;
138 $icon = ($this->offlineMode->getOfflineMode() ==
"online") ?
"icon_lm.svg" :
"icon_slm_offline.svg";
139 $tabTitle = $this->lng->txt(
"offline_mode");
140 $thisurl =$this->ctrl->getLinkTarget($this, $a_active);
141 $ilTabs->addTab($a_active, $tabTitle, $thisurl);
142 $ilTabs->activateTab($a_active);
143 $tpl->getStandardTemplate();
146 $ilLocator->addRepositoryItems();
static _lookupTitle($a_id)
lookup object title
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
◆ view()
ilSCORMOfflineModeGUI::view |
( |
|
$offline_mode, |
|
|
|
$message = "" |
|
) |
| |
Definition at line 78 of file class.ilSCORMOfflineModeGUI.php.
References $_GET, $tpl, and ilUtil\getImagePath().
Referenced by executeCommand().
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(
"MSG_YOUR_BROWSER",$this->lng->txt(
'sop_msg_your_browser'));
94 $tpl->setVariable(
"MSG_FIREFOX_NOT_PORTABLE",$this->lng->txt(
'sop_msg_firefox_not_portable'));
95 $tpl->setVariable(
"MSG_FIREFOX_VERSION_NOT_SUPPORTED",$this->lng->txt(
'sop_msg_firefox_version_not_supported'));
96 $tpl->setVariable(
"MSG_FIREFOX_DOWNLOAD_WIN",$this->lng->txt(
'sop_msg_firefox_download_win'));
97 $tpl->setVariable(
"MSG_FIREFOX_DOWNLOAD_LINUX",$this->lng->txt(
'sop_msg_firefox_download_linux'));
98 $tpl->setVariable(
"MSG_FIREFOX_DOWNLOAD_MAC",$this->lng->txt(
'sop_msg_firefox_download_mac'));
99 $tpl->setVariable(
"MSG_FIREFOX_AFTER_DOWNLOAD",$this->lng->txt(
'sop_msg_firefox_after_download'));
100 $tpl->setVariable(
"MSG_FIREFOX_CONFIG",$this->lng->txt(
'sop_msg_firefox_config'));
101 $tpl->setVariable(
"MSG_FIREFOX_HTML5",$this->lng->txt(
'sop_msg_firefox_html5'));
102 $tpl->setVariable(
"ALREADY_EXPORTED",$this->lng->txt(
'sop_already_exported'));
103 $tpl->setVariable(
"XPI_INSTALL",sprintf($this->lng->txt(
'sop_xpi_install'),
"<a href='./Modules/ScormAicc/sop/sop.xpi'>sop.xpi</a>",
false));
104 $tpl->setVariable(
"RELOAD_PAGE",$this->lng->txt(
'sop_reload_page'));
105 $tpl->setVariable(
"TEXT_EXPORT",$this->lng->txt(
'sop_text_export'));
106 $tpl->setVariable(
"EXPORT",$this->lng->txt(
'sop_export'));
107 $tpl->setVariable(
"DESC_EXPORT",$this->lng->txt(
'sop_desc_export'));
108 $tpl->setVariable(
"TEXT_START_OFFLINE",$this->lng->txt(
'sop_text_start_offline'));
109 $tpl->setVariable(
"START_OFFLINE",$this->lng->txt(
'sop_start_offline'));
110 $tpl->setVariable(
"TEXT_START_SOM",$this->lng->txt(
'sop_text_start_som'));
111 $tpl->setVariable(
"START_SOM",$this->lng->txt(
'sop_start_som'));
112 $tpl->setVariable(
"TEXT_PUSH_TRACKING",$this->lng->txt(
'sop_text_push_tracking'));
113 $tpl->setVariable(
"PUSH_TRACKING",$this->lng->txt(
'sop_push_tracking'));
114 $tpl->setVariable(
"MSG_LM_NOT_EXISTS",$this->lng->txt(
'sop_msg_lm_not_exists'));
115 $tpl->setVariable(
"MSG_CLOSE_LM",$this->lng->txt(
'sop_msg_close_lm'));
116 $tpl->setVariable(
"MSG_EXPORT_CONTENT",$this->lng->txt(
'sop_msg_export_content'));
117 $tpl->setVariable(
"MSG_EXPORT_TRACKING",$this->lng->txt(
'sop_msg_export_tracking'));
118 $tpl->setVariable(
"MSG_PUSH_TRACKING",$this->lng->txt(
'sop_msg_push_tracking'));
119 $tpl->setVariable(
"MSG_PUSH_TRACKING_OK",$this->lng->txt(
'sop_msg_push_tracking_ok'));
121 $tpl->setVariable(
"CLIENT_ID",CLIENT_ID);
122 $tpl->setVariable(
"CLIENT_ID_SOP",$this->clientIdSop);
123 $tpl->setVariable(
"REF_ID",
$_GET[
'ref_id']);
124 $tpl->setVariable(
"LM_ID",$this->lmId);
125 $tpl->setVariable(
"OFFLINE_MODE",$offline_mode);
126 if ($message !=
"") $tpl->setVariable(
"MESSAGE_RESULT",$this->lng->txt(
'sop_'.$message));
129 $tpl->parseCurrentBlock();
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
◆ $clientIdSop
ilSCORMOfflineModeGUI::$clientIdSop |
◆ $icon
ilSCORMOfflineModeGUI::$icon |
◆ $lmId
ilSCORMOfflineModeGUI::$lmId |
◆ $offline_icon
ilSCORMOfflineModeGUI::$offline_icon |
◆ $offlineMode
ilSCORMOfflineModeGUI::$offlineMode |
◆ $online_icon
ilSCORMOfflineModeGUI::$online_icon |
The documentation for this class was generated from the following file: