5require_once
"./Services/Object/classes/class.ilObjectGUI.php";
6require_once(
"./Services/FileSystem/classes/class.ilFileSystemGUI.php");
7require_once(
"Services/User/classes/class.ilObjUser.php");
9require_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
10require_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
42 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
46 $lng->loadLanguageModule(
"content");
47 $lng->loadLanguageModule(
"search");
50 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
59 if ($this->call_by_reference) {
74 $lng->loadLanguageModule(
"style");
77 $ilTabs->setSubTabActive(
'cont_settings');
80 $ilToolbar->addButtonInstance($this->object->getViewButton());
82 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
84 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
85 $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
88 $this->
object->checkMasteryScoreValues();
91 $ti =
new ilTextInputGUI($this->lng->txt(
"title"),
"Fobject_title");
92 $ti->setMaxLength(200);
93 $ti->setValue($this->object->getTitle());
94 $this->form->addItem($ti);
98 $ti->setValue($this->object->getDescription());
99 $this->form->addItem($ti);
104 $this->form->addItem($ne);
108 $ne->setValue($this->object->getModuleVersion());
109 $ne->setInfo($this->lng->txt(
"cont_sc_version_info"));
110 $this->form->addItem($ne);
116 $sh->setTitle($this->lng->txt(
"activation"));
117 $this->form->addItem($sh);
122 if ($this->object->getOnline()) {
123 $cb->setChecked(
true);
125 $cb->setInfo($this->lng->txt(
"cont_online_info"));
126 $this->form->addItem($cb);
129 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_offline_mode_allow"),
"cobj_offline_mode");
131 $cb->setChecked($this->object->getOfflineMode());
132 include_once(
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
134 $cb->setDisabled(
true);
135 $cb->setInfo($this->lng->txt(
"cont_offline_mode_disable_not_allowed_info"));
137 $cb->setInfo($this->lng->txt(
"cont_offline_mode_allow_info"));
139 $this->form->addItem($cb);
145 $sh->setTitle($this->lng->txt(
"cont_presentation"));
146 $this->form->addItem($sh);
149 $op0 =
new ilRadioOption($this->lng->txt(
"cont_open_normal"),
"0");
150 $radg->addOption($op0);
151 $op1 =
new ilRadioOption($this->lng->txt(
"cont_open_iframe"),
"1");
152 $radg->addOption($op1);
153 $op2 =
new ilRadioOption($this->lng->txt(
"cont_open_window"),
"5");
154 $radg->addOption($op2);
155 $radg->setValue($this->object->getOpenMode());
159 $ni->setMaxLength(4);
161 $ni->setValue($this->object->getWidth());
162 $op1->addSubItem($ni);
164 $ni->setMaxLength(4);
166 $ni->setValue($this->object->getWidth());
167 $op2->addSubItem($ni);
170 $ni->setMaxLength(4);
172 $ni->setValue($this->object->getHeight());
173 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
174 $op1->addSubItem($ni);
176 $ni->setMaxLength(4);
178 $ni->setValue($this->object->getHeight());
179 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
180 $op2->addSubItem($ni);
182 $this->form->addItem($radg);
185 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_last_visited"),
"cobj_auto_last_visited");
187 $cb->setChecked($this->object->getAuto_last_visited());
188 $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
189 $this->form->addItem($cb);
192 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_sc_auto_continue"),
"auto_continue");
194 $cb->setChecked($this->object->getAutoContinue());
195 $cb->setInfo($this->lng->txt(
"cont_sc_auto_continue_info"));
196 $this->form->addItem($cb);
202 $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
203 $this->form->addItem($sh);
206 $options = array(
"normal" => $this->lng->txt(
"cont_sc_less_mode_normal"),
207 "browse" => $this->lng->txt(
"cont_sc_less_mode_browse"));
210 $si->setValue($this->object->getDefaultLessonMode());
211 $this->form->addItem(
$si);
214 $options = array(
"credit" => $this->lng->txt(
"cont_credit_on"),
215 "no_credit" => $this->lng->txt(
"cont_credit_off"));
218 $si->setValue($this->object->getCreditMode());
219 $si->setInfo($this->lng->txt(
"cont_credit_mode_info"));
220 $this->form->addItem(
$si);
224 "n" => $this->lng->txt(
"cont_sc_auto_review_no"),
230 "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
234 $si->setValue($this->object->getAutoReviewChar());
236 $this->form->addItem(
$si);
239 if ($this->object->getMasteryScoreValues() !=
"") {
240 $ni =
new ilNumberInputGUI($this->lng->txt(
"cont_mastery_score_12"),
"mastery_score");
241 $ni->setMaxLength(3);
243 $ni->setValue($this->object->getMasteryScore());
244 $ni->setInfo($this->lng->txt(
"cont_mastery_score_12_info") . $this->object->getMasteryScoreValues());
245 $this->form->addItem($ni);
252 $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
253 $this->form->addItem($sh);
258 $cb->setChecked($this->object->getSession());
259 $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
260 $this->form->addItem($cb);
263 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"),
"cobj_interactions");
265 $cb->setChecked($this->object->getInteractions());
266 $cb->setInfo($this->lng->txt(
"cont_interactions_info_12"));
267 $this->form->addItem($cb);
272 $cb->setChecked($this->object->getObjectives());
273 $cb->setInfo($this->lng->txt(
"cont_objectives_info"));
274 $this->form->addItem($cb);
277 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"),
"cobj_time_from_lms");
279 $cb->setChecked($this->object->getTime_from_lms());
280 $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
281 $this->form->addItem($cb);
284 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"),
"cobj_check_values");
286 $cb->setChecked($this->object->getCheck_values());
287 $cb->setInfo($this->lng->txt(
"cont_check_values_info"));
288 $this->form->addItem($cb);
291 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_suspend"),
"cobj_auto_suspend");
293 $cb->setChecked($this->object->getAutoSuspend());
294 $cb->setInfo($this->lng->txt(
"cont_auto_suspend_info"));
295 $this->form->addItem($cb);
299 0 => $this->lng->txt(
"cont_sc_id_setting_user_id"),
300 1 => $this->lng->txt(
"cont_sc_id_setting_user_login"),
301 2 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_ref_id"),
302 3 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_ref_id"),
303 4 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_obj_id"),
304 5 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_obj_id")
308 $si->setValue($this->object->getIdSetting());
309 $si->setInfo($this->lng->txt(
"cont_sc_id_setting_info"));
310 $this->form->addItem(
$si);
314 0 => $this->lng->txt(
"cont_sc_name_setting_last_firstname"),
315 1 => $this->lng->txt(
"cont_sc_name_setting_first_lastname"),
316 2 => $this->lng->txt(
"cont_sc_name_setting_fullname"),
317 3 => $this->lng->txt(
"cont_sc_name_setting_salutation_lastname"),
318 4 => $this->lng->txt(
"cont_sc_name_setting_first_name"),
319 9 => $this->lng->txt(
"cont_sc_name_setting_no_name")
323 $si->setValue($this->object->getNameSetting());
324 $si->setInfo($this->lng->txt(
"cont_sc_name_setting_info"));
325 $this->form->addItem(
$si);
331 $sh->setTitle($this->lng->txt(
"cont_debugging"));
332 $this->form->addItem($sh);
337 $cb->setChecked($this->object->getDebug());
338 if ($this->object->getDebugActivated() ==
false) {
339 $cb->setDisabled(
true);
340 $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
342 $cb->setInfo($this->lng->txt(
"cont_debug_deactivate12"));
344 $this->form->addItem($cb);
345 $this->form->addCommandButton(
"saveProperties",
$lng->txt(
"save"));
347 $tpl->setContent($this->form->getHTML());
357 $ilTabs->setSubTabActive(
'cont_sc_new_version');
363 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.scorm_new_version_import.html",
"Modules/ScormAicc");
366 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
"obj_sahs"));
368 $this->ctrl->setParameter($this,
"new_type",
"sahs");
369 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
371 $this->tpl->setVariable(
"BTN_NAME",
"newModuleVersionUpload");
372 $this->tpl->setVariable(
"TARGET",
' target="' .
375 $this->tpl->setVariable(
"TXT_SELECT_LMTYPE", $this->lng->txt(
"type"));
377 if (
$type ==
"scorm2004") {
378 $this->tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"lm_type_scorm2004"));
380 $this->tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"lm_type_scorm"));
383 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
387 $file = htmlspecialchars(
$file, ENT_QUOTES,
"utf-8");
388 $this->tpl->setCurrentBlock(
"option_uploaded_file");
389 $this->tpl->setVariable(
"UPLOADED_FILENAME",
$file);
390 $this->tpl->setVariable(
"TXT_UPLOADED_FILENAME",
$file);
391 $this->tpl->parseCurrentBlock();
393 $this->tpl->setCurrentBlock(
"select_uploaded_file");
394 $this->tpl->setVariable(
"TXT_SELECT_FROM_UPLOAD_DIR", $this->lng->txt(
"cont_select_from_upload_dir"));
395 $this->tpl->setVariable(
"TXT_UPLOADED_FILE", $this->lng->txt(
"cont_uploaded_file"));
396 $this->tpl->parseCurrentBlock();
399 $this->tpl->setVariable(
"TXT_UPLOAD", $this->lng->txt(
"upload"));
400 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
401 $this->tpl->setVariable(
"TXT_IMPORT_LM", $this->lng->txt(
"import_sahs"));
402 $this->tpl->setVariable(
"TXT_SELECT_FILE", $this->lng->txt(
"select_file"));
405 $this->tpl->setVariable(
"TXT_FILE_INFO", $this->lng->txt(
"file_notice") .
" " . $this->getMaxFileSize());
412 $umf=get_cfg_var(
"upload_max_filesize");
414 $pms=get_cfg_var(
"post_max_size");
417 $multiplier_a=array(
"K"=>1024,
"M"=>1024*1024,
"G"=>1024*1024*1024);
422 if (count($umf_parts) == 2) {
423 $umf = $umf_parts[0]*$multiplier_a[$umf_parts[1]];
425 if (count($pms_parts) == 2) {
426 $pms = $pms_parts[0]*$multiplier_a[$pms_parts[1]];
430 $max_filesize=min($umf, $pms);
432 if (!$max_filesize) {
433 $max_filesize=max($umf, $pms);
437 return $max_filesize=
sprintf(
"%.1f MB", $max_filesize/1024/1024);
445 $unzip = PATH_TO_UNZIP;
446 $tocheck =
"imsmanifest.xml";
448 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
452 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->WARNING);
453 } elseif ($_FILES[
"scormfile"][
"name"]) {
455 $source = $_FILES[
"scormfile"][
"tmp_name"];
461 } elseif (
$_POST[
"uploaded_file"]) {
464 $this->
ilias->raiseError($this->lng->txt(
"upload_error_file_not_found"), $this->ilias->error_obj->MESSAGE);
470 $source_is_copy =
true;
480 $dir = $pathinfo[
"dirname"];
481 $file = $pathinfo[
"basename"];
489 $tmp_file = $dir .
"/" .
$_GET[
"ref_id"] .
"." . $tocheck;
492 $new_manifest = file_get_contents($tmp_file);
498 $old_manifest = file_get_contents($this->object->getDataDirectory() .
"/" . $tocheck);
501 $check =
'/xmlns="http:\/\/www.imsglobal.org\/xsd\/imscp_v1p1"/';
502 $replace=
"xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1p2\"";
503 $reload_manifest = preg_replace($check, $replace, $new_manifest);
506 if (strcmp($new_manifest, $old_manifest) == 0 || strcmp(utf8_encode($new_manifest), $old_manifest) == 0 ||
507 strcmp($reload_manifest, $old_manifest) == 0 || strcmp(utf8_encode($reload_manifest), $old_manifest) == 0) {
510 $module_version = $this->
object->getModuleVersion();
512 if ($_FILES[
"scormfile"][
"name"]) {
514 $file_path = $this->
object->getDataDirectory() .
"/" . $_FILES[
"scormfile"][
"name"] .
"." . $module_version;
515 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
517 ilUtil::moveUploadedFile($_FILES[
"scormfile"][
"tmp_name"], $_FILES[
"scormfile"][
"name"], $file_path);
520 $file_path = $this->
object->getDataDirectory() .
"/" .
$_POST[
"uploaded_file"] .
"." . $module_version;
521 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
531 $this->
object->setModuleVersion($module_version+1);
532 $this->
object->update();
539 if ($source_is_copy) {
553 $this->
object->setTitle(
$_POST[
"Fobject_title"]);
554 $this->
object->setDescription(
$_POST[
"Fobject_description"]);
558 if ($tmpOfflineMode ==
true) {
559 if ($this->object->getOfflineMode() ==
false) {
560 $this->
object->zipLmForOfflineMode();
563 if (isset(
$_POST[
"mastery_score"])) {
564 $this->
object->setMasteryScore(
$_POST[
"mastery_score"]);
568 $t_height = $this->
object->getHeight();
569 if (
$_POST[
"height_0"] != $this->object->getHeight()) {
570 $t_height =
$_POST[
"height_0"];
572 if (
$_POST[
"height_1"] != $this->object->getHeight()) {
573 $t_height =
$_POST[
"height_1"];
576 $t_width = $this->
object->getWidth();
577 if (
$_POST[
"width_0"] != $this->object->getWidth()) {
578 $t_width =
$_POST[
"width_0"];
580 if (
$_POST[
"width_1"] != $this->object->getWidth()) {
581 $t_width =
$_POST[
"width_1"];
585 $this->
object->setOfflineMode($tmpOfflineMode);
586 $this->
object->setOpenMode(
$_POST[
"open_mode"]);
587 $this->
object->setWidth($t_width);
588 $this->
object->setHeight($t_height);
591 $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
592 $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
593 $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
602 $this->
object->setIdSetting(
$_POST[
"id_setting"]);
603 $this->
object->setNameSetting(
$_POST[
"name_setting"]);
604 $this->
object->update();
606 $this->ctrl->redirect($this,
"properties");
617 $ilTabs->setTabActive(
"cont_tracking_data");
618 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
620 $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
621 $scoSelected =
"all";
622 if (isset(
$_GET[
"scoSelected"])) {
625 if (isset(
$_POST[
"scoSelected"])) {
628 $this->ctrl->setParameter($this,
'scoSelected', $scoSelected);
631 if (isset(
$_GET[
"report"])) {
634 if (isset(
$_POST[
"report"])) {
637 $this->ctrl->setParameter($this,
'report', $report);
639 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
641 $filter->parse($scoSelected, $report, $reports);
642 if ($report ==
"choose") {
643 $this->tpl->setContent($filter->form->getHTML());
645 $scosSelected = array();
646 if ($scoSelected !=
"all") {
647 $scosSelected[] = $scoSelected;
649 $scos=$this->
object->getTrackedItems();
650 foreach ($scos as
$row) {
651 $scosSelected[]=(int)
$row->getId();
655 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
658 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
660 $this->tpl->setContent($filter->form->getHTML() .
$tbl->getHTML());
673 global $ilTabs, $ilAccess;
675 $ilTabs->setTabActive(
'cont_tracking_data');
677 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
679 $ilTabs->setSubTabActive(
'cont_tracking_byuser');
681 $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
683 $userSelected =
"all";
684 if (isset(
$_GET[
"userSelected"])) {
687 if (isset(
$_POST[
"userSelected"])) {
690 $this->ctrl->setParameter($this,
'userSelected', $userSelected);
693 if (isset(
$_GET[
"report"])) {
696 if (isset(
$_POST[
"report"])) {
699 $this->ctrl->setParameter($this,
'report', $report);
701 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
703 $filter->parse($userSelected, $report, $reports);
704 if ($report ==
"choose") {
705 $this->tpl->setContent($filter->form->getHTML());
707 $usersSelected = array();
708 if ($userSelected !=
"all") {
709 $usersSelected[] = $userSelected;
711 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
715 $usersSelected[] =
$user;
719 $scosSelected = array();
720 $scos=$this->
object->getTrackedItems();
721 foreach ($scos as
$row) {
722 $scosSelected[]=(int)
$row->getId();
729 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
731 $this->tpl->setContent($filter->form->getHTML() .
$tbl->getHTML());
733 } elseif ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
741 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
742 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
744 if (!$privacy->enabledSahsProtocolData()) {
745 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
748 global $ilTabs, $ilToolbar;
750 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
751 $ilToolbar->addButton(
752 $this->lng->txt(
'import'),
753 $this->ctrl->getLinkTarget($this,
'importForm')
755 $ilToolbar->addButton(
756 $this->lng->txt(
'cont_export_all'),
757 $this->ctrl->getLinkTarget($this,
'exportAll')
761 $ilTabs->setTabActive(
'cont_tracking_data');
762 $ilTabs->setSubTabActive(
'cont_tracking_modify');
764 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
767 $this->tpl->setContent(
$tbl->getHTML());
777 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
779 $tbl->writeFilterToSession();
789 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
801 if (!isset(
$_POST[
"user"])) {
802 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->ilias->error_obj->MESSAGE);
806 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
808 $cgui->setFormAction($this->ctrl->getFormAction($this));
809 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
810 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteTracking");
811 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDeleteTracking");
818 " " . $this->lng->txt(
"cont_tracking_data") .
819 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
822 $cgui->addItem(
"user[]",
$id, $caption);
826 $this->tpl->setContent($cgui->getHTML());
835 $this->ctrl->redirect($this,
"modifyTrackingItems");
840 $this->
object->deleteTrackingDataOfUsers(
$_POST[
"user"]);
841 $this->ctrl->redirect($this,
"modifyTrackingItems");
850 $this->ctrl->redirect($this,
"properties");
856 protected function import()
859 if (
$form->checkInput()) {
861 $error = $this->
object->importTrackingData(
$source[
'tmp_name']);
865 $this->ctrl->redirect($this,
"showTrackingItems");
874 $form->setValuesByPost();
885 $ilTabs->clearTargets();
886 $ilTabs->setBackTarget($this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'showTrackingItems'));
889 $this->tpl->setContent(
$form->getHTML());
897 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
899 $form->setFormAction($this->ctrl->getFormAction($this));
900 $form->setTitle($this->lng->txt(
'cont_import_tracking'));
901 $form->addCommandButton(
'import', $this->lng->txt(
'import'));
902 $form->addCommandButton(
'showTrackingItems', $this->lng->txt(
'cancel'));
905 $csv->setRequired(
true);
906 $csv->setSuffixes(array(
'csv'));
907 $form->addItem($csv);
917 $this->
object->exportSelected(1);
925 if (!count((array)
$_POST[
'user'])) {
928 $this->ctrl->redirect($this,
'modifyTrackingItems');
930 $this->
object->exportSelected(0, $_POST[
"user"]);
937 if (!isset(
$_POST[
"user"])) {
940 $this->
object->decreaseAttemptsForUser(
$_POST[
"user"]);
941 $this->ctrl->redirect($this,
"modifyTrackingItems");
952 include_once
"./Services/Table/classes/class.ilTableGUI.php";
955 $ilTabs->setTabActive(
"cont_tracking_data");
956 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
958 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
960 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
962 $this->tpl->setContent(
$tbl->getHTML());
973 include_once
"./Services/Table/classes/class.ilTableGUI.php";
976 $ilTabs->setTabActive(
"cont_tracking_data");
977 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
979 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
983 $this->tpl->setContent(
$tbl->getHTML());
994 include_once
"./Services/Table/classes/class.ilTableGUI.php";
997 $ilTabs->setTabActive(
"cont_tracking_data");
998 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
1000 $this->ctrl->setParameter($this,
'obj_id', (
int) $_REQUEST[
'obj_id']);
1001 $this->ctrl->setParameter($this,
'user_id', (
int) $_REQUEST[
'user_id']);
1003 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1005 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
1006 $tbl->setScoId((
int) $_REQUEST[
'obj_id']);
1008 $this->tpl->setContent(
$tbl->getHTML());
1017 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
1018 $ilTabs->addSubTabTarget(
1019 "cont_tracking_byuser",
1020 $this->ctrl->getLinkTarget($this,
"showTrackingItems"),
1025 $ilTabs->addSubTabTarget(
1026 "cont_tracking_bysco",
1027 $this->ctrl->getLinkTarget($this,
"showTrackingItemsBySco"),
1032 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
1033 $ilTabs->addSubTabTarget(
1034 "cont_tracking_modify",
1035 $this->ctrl->getLinkTarget($this,
"modifyTrackingItems"),
1052 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
1054 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
1057 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1060 $this->tpl->setContent(
$tbl->getHTML());
1067 if (!count((array)
$_POST[
'user'])) {
1069 $this->ctrl->redirect($this,
'offlineModeManager');
1072 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1074 $cgui->setFormAction($this->ctrl->getFormAction($this));
1075 $cgui->setHeaderText($this->lng->txt(
"info_stop_offline_mode_sure"));
1076 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelStopUserOfflineMode");
1077 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedStopUserOfflineMode");
1082 " " . $this->lng->txt(
"stop_user_offline_mode_for_user") .
1083 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
1084 $cgui->addItem(
"user[]",
$id, $caption);
1087 $this->tpl->setContent($cgui->getHTML());
1093 $this->ctrl->redirect($this,
"offlineModeManager");
1098 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static rename($a_source, $a_target)
Rename a file.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
This class represents a non editable value in a property form.
setSettingsSubTabs()
set Tabs for settings
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
resetUserTableFilter()
Reset table filter.
const EXPORT_TYPE_SUCCESS
showTrackingItemsBySco()
show tracking data
cancelStopUserOfflineMode()
offlineModeManager()
Manage offline mode for users @global ilTabs $ilTabs $global ilToolbar $ilToolbar.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
importForm()
Show import form.
exportAll()
Show export section for all users.
initImportForm($a_new_type)
Init import form.
stopUserOfflineMode()
Stop offline mode for selected users.
exportSelectionUsers()
Export selection for selected users.
assignObject()
assign scorm object to scorm gui object
showTrackingItem()
show tracking data of item
saveProperties()
save properties
showTrackingItemSco()
show tracking data of item
properties()
scorm module properties
applyUserTableFilter()
Apply table filter.
deleteTrackingForUser()
display deletion confirmation screen
showTrackingItemPerUser()
show tracking data of item per user
cancel()
overwrite..jump back to trackingdata not parent
newModuleVersion()
upload new version of module
showTrackingItems()
Show tracking table @global ilTabs $ilTabs $global ilToolbar $ilToolbar.
confirmedStopUserOfflineMode()
confirmedDeleteTracking()
cancelDeleteTracking()
cancel deletion of export files
Class ilObjSCORMLearningModule.
static _lookupObjectId($a_ref_id)
lookup object id
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _getInstance()
Get instance of ilPrivacySettings.
This class represents an option in a radio group.
GUI class ilSCORMOfflineModeUsersTableGUI.
static stopOfflineModeForUser($obj_id, $user_id)
static checkIfAnyoneIsInOfflineMode($obj_id)
Class ilSCORMTrackingItemsPerScoFilterGUI.
Class ilSCORMTrackingItemsPerUserFilterGUI.
Class ilSCORMTrackingItemsTableGUI.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
static _getUploadFiles()
Get a list of readable files in the upload directory.
static _copyUploadFile($a_file, $a_target, $a_raise_errors=true)
copy an uploaded file to the target directory (including virus check)
static _checkUploadFile($a_file)
Check if a file exists in the upload directory and is readable.
static _getUploadDirectory()
Get the directory with uploaded files.
static escapeShellArg($a_arg)
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
if(!array_key_exists('StateId', $_REQUEST)) $id
redirection script todo: (a better solution should control the processing via a xml file)
if(isset($_POST['submit'])) $form
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
echo;exit;}function LogoutNotification($SessionID){ global $ilDB;$q="SELECT session_id, data FROM usr_session WHERE expires > (\w+)\|/" PREG_SPLIT_NO_EMPTY PREG_SPLIT_DELIM_CAPTURE