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");
46 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
49 $this->lng =
$DIC[
'lng'];
50 $this->ctrl =
$DIC->ctrl();
51 $this->tpl =
$DIC[
"tpl"];
53 $this->lng->loadLanguageModule(
"content");
54 $this->lng->loadLanguageModule(
"search");
66 if ($this->call_by_reference) {
80 $ilToolbar =
$DIC[
'ilToolbar'];
81 $ilTabs =
$DIC[
'ilTabs'];
86 $ilTabs->setSubTabActive(
'cont_settings');
89 $ilToolbar->addButtonInstance($this->object->getViewButton());
94 $this->tpl->setContent($this->form->getHTML());
103 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
106 $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
109 $this->
object->checkMasteryScoreValues();
112 $ti =
new ilTextInputGUI($this->lng->txt(
"title"),
"Fobject_title");
113 $ti->setMaxLength(200);
114 $this->form->addItem($ti);
118 $this->form->addItem($ti);
123 $this->form->addItem($ne);
127 $ne->setValue($this->object->getModuleVersion());
128 $ne->setInfo($this->lng->txt(
"cont_sc_version_info"));
129 $this->form->addItem($ne);
135 $sh->setTitle($this->lng->txt(
"activation"));
136 $this->form->addItem($sh);
140 $cb->setInfo($this->lng->txt(
"cont_online_info"));
141 $this->form->addItem($cb);
144 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_offline_mode_allow"),
"cobj_offline_mode");
146 include_once(
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
148 $cb->setDisabled(
true);
149 $cb->setInfo($this->lng->txt(
"cont_offline_mode_disable_not_allowed_info"));
151 $cb->setInfo($this->lng->txt(
"cont_offline_mode_allow_info"));
153 $this->form->addItem($cb);
159 $sh->setTitle($this->lng->txt(
"cont_presentation"));
160 $this->form->addItem($sh);
163 $op0 =
new ilRadioOption($this->lng->txt(
"cont_open_normal"),
"0");
164 $radg->addOption($op0);
165 $op1 =
new ilRadioOption($this->lng->txt(
"cont_open_iframe"),
"1");
166 $radg->addOption($op1);
167 $op2 =
new ilRadioOption($this->lng->txt(
"cont_open_window"),
"5");
168 $radg->addOption($op2);
172 $ni->setMaxLength(4);
174 $op1->addSubItem($ni);
176 $ni->setMaxLength(4);
178 $op2->addSubItem($ni);
181 $ni->setMaxLength(4);
183 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
184 $op1->addSubItem($ni);
186 $ni->setMaxLength(4);
188 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
189 $op2->addSubItem($ni);
191 $this->form->addItem($radg);
194 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_last_visited"),
"cobj_auto_last_visited");
196 $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
197 $this->form->addItem($cb);
200 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_sc_auto_continue"),
"auto_continue");
202 $cb->setInfo($this->lng->txt(
"cont_sc_auto_continue_info"));
203 $this->form->addItem($cb);
206 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
212 $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
213 $this->form->addItem($sh);
216 $options = array(
"normal" => $this->lng->txt(
"cont_sc_less_mode_normal"),
217 "browse" => $this->lng->txt(
"cont_sc_less_mode_browse"));
219 $si->setOptions($options);
220 $this->form->addItem(
$si);
223 $options = array(
"credit" => $this->lng->txt(
"cont_credit_on"),
224 "no_credit" => $this->lng->txt(
"cont_credit_off"));
226 $si->setOptions($options);
227 $si->setInfo($this->lng->txt(
"cont_credit_mode_info"));
228 $this->form->addItem(
$si);
232 "n" => $this->lng->txt(
"cont_sc_auto_review_no"),
238 "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
241 $si->setOptions($options);
243 $this->form->addItem(
$si);
246 if ($this->object->getMasteryScoreValues() !=
"") {
247 $ni =
new ilNumberInputGUI($this->lng->txt(
"cont_mastery_score_12"),
"mastery_score");
248 $ni->setMaxLength(3);
250 $ni->setInfo($this->lng->txt(
"cont_mastery_score_12_info") . $this->object->getMasteryScoreValues());
251 $this->form->addItem($ni);
258 $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
259 $this->form->addItem($sh);
264 $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
265 $this->form->addItem($cb);
268 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"),
"cobj_interactions");
270 $cb->setInfo($this->lng->txt(
"cont_interactions_info_12"));
271 $this->form->addItem($cb);
276 $cb->setInfo($this->lng->txt(
"cont_objectives_info"));
277 $this->form->addItem($cb);
280 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"),
"cobj_time_from_lms");
282 $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
283 $this->form->addItem($cb);
286 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"),
"cobj_check_values");
288 $cb->setInfo($this->lng->txt(
"cont_check_values_info"));
289 $this->form->addItem($cb);
292 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_suspend"),
"cobj_auto_suspend");
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")
307 $si->setOptions($options);
308 $si->setInfo($this->lng->txt(
"cont_sc_id_setting_info"));
309 $this->form->addItem(
$si);
313 0 => $this->lng->txt(
"cont_sc_name_setting_last_firstname"),
314 1 => $this->lng->txt(
"cont_sc_name_setting_first_lastname"),
315 2 => $this->lng->txt(
"cont_sc_name_setting_fullname"),
316 3 => $this->lng->txt(
"cont_sc_name_setting_salutation_lastname"),
317 4 => $this->lng->txt(
"cont_sc_name_setting_first_name"),
318 9 => $this->lng->txt(
"cont_sc_name_setting_no_name")
321 $si->setOptions($options);
322 $si->setInfo($this->lng->txt(
"cont_sc_name_setting_info"));
323 $this->form->addItem(
$si);
329 $sh->setTitle($this->lng->txt(
"cont_debugging"));
330 $this->form->addItem($sh);
335 if ($this->object->getDebugActivated() ==
false) {
336 $cb->setDisabled(
true);
337 $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
339 $cb->setInfo($this->lng->txt(
"cont_debug_deactivate12"));
341 $this->form->addItem($cb);
342 $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
343 $this->form->setFormAction($this->ctrl->getFormAction($this));
355 $values[
"Fobject_title"] = $this->
object->getTitle();
356 $values[
"Fobject_description"] = $this->
object->getDescription();
357 if (!$this->object->getOfflineStatus()) {
358 $values[
"cobj_online"] =
true;
360 $values[
"cobj_offline_mode"] = $this->
object->getOfflineMode();
361 $values[
"open_mode"] = $this->
object->getOpenMode();
362 $values[
"width_0"] = $this->
object->getWidth();
363 $values[
"width_1"] = $this->
object->getWidth();
364 $values[
"height_0"] = $this->
object->getHeight();
365 $values[
"height_1"] = $this->
object->getHeight();
366 $values[
"cobj_auto_last_visited"] = $this->
object->getAuto_last_visited();
367 $values[
"auto_continue"] = $this->
object->getAutoContinue();
368 $values[
"lesson_mode"] = $this->
object->getDefaultLessonMode();
369 $values[
"credit_mode"] = $this->
object->getCreditMode();
370 $values[
"auto_review"] = $this->
object->getAutoReviewChar();
371 $values[
"mastery_score"] = $this->
object->getMasteryScore();
372 $values[
"cobj_session"] = $this->
object->getSession();
373 $values[
"cobj_interactions"] = $this->
object->getInteractions();
374 $values[
"cobj_objectives"] = $this->
object->getObjectives();
375 $values[
"cobj_time_from_lms"] = $this->
object->getTime_from_lms();
376 $values[
"cobj_check_values"] = $this->
object->getCheck_values();
377 $values[
"cobj_auto_suspend"] = $this->
object->getAutoSuspend();
378 $values[
"id_setting"] = $this->
object->getIdSetting();
379 $values[
"name_setting"] = $this->
object->getNameSetting();
380 $values[
"cobj_debug"] = $this->
object->getDebug();
381 $this->form->setValuesByArray($values);
390 $ilTabs =
$DIC[
'ilTabs'];
392 $ilTabs->setSubTabActive(
'cont_sc_new_version');
397 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
400 $this->form->setTitle($this->lng->txt(
"import_sahs"));
405 $this->form->addItem($ne);
408 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
410 $options[
""] = $this->lng->txt(
"cont_select_from_upload_dir");
412 foreach ($files as $file) {
413 $file = htmlspecialchars($file, ENT_QUOTES,
"utf-8");
414 $options[$file] = $file;
417 if (count($options) > 1) {
420 $op0 =
new ilRadioOption($this->lng->txt(
"cont_choose_local"),
"local");
421 $radg->addOption($op0);
422 $op1 =
new ilRadioOption($this->lng->txt(
"cont_choose_upload_dir"),
"upload_dir");
423 $radg->addOption($op1);
424 $radg->setValue(
"local");
426 $fi =
new ilFileInputGUI($this->lng->txt(
"select_file"),
"scormfile");
427 $fi->setRequired(
true);
428 $op0->addSubItem($fi);
431 $si->setOptions($options);
432 $op1->addSubItem(
$si);
434 $this->form->addItem($radg);
436 $fi =
new ilFileInputGUI($this->lng->txt(
"select_file"),
"scormfile");
437 $fi->setRequired(
true);
438 $this->form->addItem($fi);
440 $this->form->addCommandButton(
"newModuleVersionUpload", $this->lng->txt(
"upload"));
441 $this->form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
442 $this->form->setFormAction(
$DIC[
'ilCtrl']->
getFormAction($this,
"newModuleVersionUpload"));
443 $DIC[
'tpl']->setContent($this->form->getHTML());
450 $umf = get_cfg_var(
"upload_max_filesize");
452 $pms = get_cfg_var(
"post_max_size");
455 $multiplier_a = array(
"K" => 1024,
"M" => 1024 * 1024,
"G" => 1024 * 1024 * 1024);
457 $umf_parts = preg_split(
"/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
458 $pms_parts = preg_split(
"/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
460 if (count($umf_parts) == 2) {
461 $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
463 if (count($pms_parts) == 2) {
464 $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
468 $max_filesize = min($umf, $pms);
470 if (!$max_filesize) {
471 $max_filesize = max($umf, $pms);
475 return $max_filesize = sprintf(
"%.1f MB", $max_filesize / 1024 / 1024);
484 $unzip = PATH_TO_UNZIP;
485 $tocheck =
"imsmanifest.xml";
487 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
491 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->WARNING);
492 } elseif ($_FILES[
"scormfile"][
"name"]) {
494 $source = $_FILES[
"scormfile"][
"tmp_name"];
500 } elseif (
$_POST[
"uploaded_file"]) {
503 $this->
ilias->raiseError($this->lng->txt(
"upload_error_file_not_found"), $this->ilias->error_obj->MESSAGE);
509 $source_is_copy =
true;
519 $dir = $pathinfo[
"dirname"];
520 $file = $pathinfo[
"basename"];
528 $tmp_file = $dir .
"/" .
$_GET[
"ref_id"] .
"." . $tocheck;
531 $new_manifest = file_get_contents($tmp_file);
537 $old_manifest = file_get_contents($this->object->getDataDirectory() .
"/" . $tocheck);
540 $check =
'/xmlns="http:\/\/www.imsglobal.org\/xsd\/imscp_v1p1"/';
541 $replace =
"xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1p2\"";
542 $reload_manifest = preg_replace($check, $replace, $new_manifest);
545 if (strcmp($new_manifest, $old_manifest) == 0 || strcmp(utf8_encode($new_manifest), $old_manifest) == 0 ||
546 strcmp($reload_manifest, $old_manifest) == 0 || strcmp(utf8_encode($reload_manifest), $old_manifest) == 0) {
549 $module_version = $this->
object->getModuleVersion() + 1;
551 if ($_FILES[
"scormfile"][
"name"]) {
553 $file_path = $this->
object->getDataDirectory() .
"/" . $_FILES[
"scormfile"][
"name"] .
"." . $module_version;
554 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
559 $file_path = $this->
object->getDataDirectory() .
"/" .
$_POST[
"uploaded_file"] .
"." . $module_version;
560 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
570 $this->
object->setModuleVersion($module_version);
571 $this->
object->update();
578 if ($source_is_copy) {
594 if ($this->form->checkInput()) {
596 $this->
object->setTitle(
$_POST[
"Fobject_title"]);
597 $this->
object->setDescription(
$_POST[
"Fobject_description"]);
601 if ($tmpOfflineMode ==
true) {
602 if ($this->object->getOfflineMode() ==
false) {
603 $this->
object->zipLmForOfflineMode();
606 if (isset(
$_POST[
"mastery_score"])) {
607 $this->
object->setMasteryScore(
$_POST[
"mastery_score"]);
611 $t_height = $this->
object->getHeight();
612 if (
$_POST[
"height_0"] != $this->object->getHeight()) {
613 $t_height =
$_POST[
"height_0"];
615 if (
$_POST[
"height_1"] != $this->object->getHeight()) {
616 $t_height =
$_POST[
"height_1"];
619 $t_width = $this->
object->getWidth();
620 if (
$_POST[
"width_0"] != $this->object->getWidth()) {
621 $t_width =
$_POST[
"width_0"];
623 if (
$_POST[
"width_1"] != $this->object->getWidth()) {
624 $t_width =
$_POST[
"width_1"];
626 $this->
object->setOfflineStatus(!(
$_POST[
'cobj_online']));
627 $this->
object->setOfflineMode($tmpOfflineMode);
628 $this->
object->setOpenMode(
$_POST[
"open_mode"]);
629 $this->
object->setWidth($t_width);
630 $this->
object->setHeight($t_height);
633 $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
634 $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
635 $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
644 $this->
object->setIdSetting(
$_POST[
"id_setting"]);
645 $this->
object->setNameSetting(
$_POST[
"name_setting"]);
646 $this->
object->update();
649 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
652 $this->ctrl->redirect($this,
"properties");
661 $ilTabs =
$DIC[
'ilTabs'];
664 $ilTabs->setTabActive(
"cont_tracking_data");
665 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
667 $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
668 $scoSelected =
"all";
669 if (isset(
$_GET[
"scoSelected"])) {
672 if (isset(
$_POST[
"scoSelected"])) {
675 $this->ctrl->setParameter($this,
'scoSelected', $scoSelected);
678 if (isset(
$_GET[
"report"])) {
681 if (isset(
$_POST[
"report"])) {
684 $this->ctrl->setParameter($this,
'report', $report);
686 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
688 $filter->parse($scoSelected, $report, $reports);
689 if ($report ==
"choose") {
690 $this->tpl->setContent($filter->form->getHTML());
692 $scosSelected = array();
693 if ($scoSelected !=
"all") {
694 $scosSelected[] = $scoSelected;
696 $scos = $this->
object->getTrackedItems();
697 foreach ($scos as $row) {
698 $scosSelected[] = (int) $row->getId();
702 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
705 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
707 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
721 $ilTabs =
$DIC[
'ilTabs'];
722 $ilAccess =
$DIC[
'ilAccess'];
724 $ilTabs->setTabActive(
'cont_tracking_data');
726 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
728 $ilTabs->setSubTabActive(
'cont_tracking_byuser');
730 $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
732 $userSelected =
"all";
733 if (isset(
$_GET[
"userSelected"])) {
736 if (isset(
$_POST[
"userSelected"])) {
739 $this->ctrl->setParameter($this,
'userSelected', $userSelected);
742 if (isset(
$_GET[
"report"])) {
745 if (isset(
$_POST[
"report"])) {
748 $this->ctrl->setParameter($this,
'report', $report);
750 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
752 $filter->parse($userSelected, $report, $reports);
753 if ($report ==
"choose") {
754 $this->tpl->setContent($filter->form->getHTML());
756 $usersSelected = array();
757 if ($userSelected !=
"all") {
758 $usersSelected[] = $userSelected;
760 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
762 foreach ($users as
$user) {
764 $usersSelected[] =
$user;
768 $scosSelected = array();
769 $scos = $this->
object->getTrackedItems();
770 foreach ($scos as $row) {
771 $scosSelected[] = (int) $row->getId();
778 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
780 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
782 } elseif ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
790 $ilAccess =
$DIC[
'ilAccess'];
791 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
792 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
794 if (!$privacy->enabledSahsProtocolData()) {
795 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
799 $ilTabs =
$DIC[
'ilTabs'];
800 $ilToolbar =
$DIC[
'ilToolbar'];
802 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
803 $ilToolbar->addButton(
804 $this->lng->txt(
'import'),
805 $this->ctrl->getLinkTarget($this,
'importForm')
807 $ilToolbar->addButton(
808 $this->lng->txt(
'cont_export_all'),
809 $this->ctrl->getLinkTarget($this,
'exportAll')
813 $ilTabs->setTabActive(
'cont_tracking_data');
814 $ilTabs->setSubTabActive(
'cont_tracking_modify');
816 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
819 $this->tpl->setContent($tbl->getHTML());
829 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
831 $tbl->writeFilterToSession();
841 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
853 if (!isset(
$_POST[
"user"])) {
854 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->ilias->error_obj->MESSAGE);
858 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
860 $cgui->setFormAction($this->ctrl->getFormAction($this));
861 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
862 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteTracking");
863 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDeleteTracking");
865 foreach (
$_POST[
"user"] as $id) {
870 " " . $this->lng->txt(
"cont_tracking_data") .
871 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
874 $cgui->addItem(
"user[]", $id, $caption);
878 $this->tpl->setContent($cgui->getHTML());
887 $this->ctrl->redirect($this,
"modifyTrackingItems");
892 $this->
object->deleteTrackingDataOfUsers(
$_POST[
"user"]);
893 $this->ctrl->redirect($this,
"modifyTrackingItems");
902 $this->ctrl->redirect($this,
"properties");
908 protected function import()
911 if ($form->checkInput()) {
912 $source = $form->getInput(
'csv');
913 $error = $this->
object->importTrackingData(
$source[
'tmp_name']);
917 $this->ctrl->redirect($this,
"showTrackingItems");
926 $form->setValuesByPost();
936 $ilTabs =
$DIC[
'ilTabs'];
938 $ilTabs->clearTargets();
939 $ilTabs->setBackTarget($this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'showTrackingItems'));
942 $this->tpl->setContent($form->getHTML());
950 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
952 $form->setFormAction($this->ctrl->getFormAction($this));
953 $form->setTitle($this->lng->txt(
'cont_import_tracking'));
954 $form->addCommandButton(
'import', $this->lng->txt(
'import'));
955 $form->addCommandButton(
'showTrackingItems', $this->lng->txt(
'cancel'));
958 $csv->setRequired(
true);
959 $csv->setSuffixes(array(
'csv'));
960 $form->addItem($csv);
970 $this->
object->exportSelected(1);
978 if (!count((array)
$_POST[
'user'])) {
981 $this->ctrl->redirect($this,
'modifyTrackingItems');
983 $this->
object->exportSelected(0, $_POST[
"user"]);
990 if (!isset(
$_POST[
"user"])) {
993 $this->
object->decreaseAttemptsForUser(
$_POST[
"user"]);
994 $this->ctrl->redirect($this,
"modifyTrackingItems");
1004 $ilTabs =
$DIC[
'ilTabs'];
1006 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1009 $ilTabs->setTabActive(
"cont_tracking_data");
1010 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
1012 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
1014 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
1016 $this->tpl->setContent($tbl->getHTML());
1026 $ilTabs =
$DIC[
'ilTabs'];
1028 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1031 $ilTabs->setTabActive(
"cont_tracking_data");
1032 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
1034 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
1036 $tbl->setScoId((
int)
$_GET[
'obj_id']);
1038 $this->tpl->setContent($tbl->getHTML());
1048 $ilTabs =
$DIC[
'ilTabs'];
1050 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1053 $ilTabs->setTabActive(
"cont_tracking_data");
1054 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
1056 $this->ctrl->setParameter($this,
'obj_id', (
int) $_REQUEST[
'obj_id']);
1057 $this->ctrl->setParameter($this,
'user_id', (
int) $_REQUEST[
'user_id']);
1059 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1061 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
1062 $tbl->setScoId((
int) $_REQUEST[
'obj_id']);
1064 $this->tpl->setContent($tbl->getHTML());
1073 $ilTabs =
$DIC[
'ilTabs'];
1075 $ilAccess =
$DIC[
'ilAccess'];
1077 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
1078 $ilTabs->addSubTabTarget(
1079 "cont_tracking_byuser",
1080 $this->ctrl->getLinkTarget($this,
"showTrackingItems"),
1085 $ilTabs->addSubTabTarget(
1086 "cont_tracking_bysco",
1087 $this->ctrl->getLinkTarget($this,
"showTrackingItemsBySco"),
1092 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
1093 $ilTabs->addSubTabTarget(
1094 "cont_tracking_modify",
1095 $this->ctrl->getLinkTarget($this,
"modifyTrackingItems"),
1115 $ilToolbar =
$DIC[
'ilToolbar'];
1119 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
1121 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
1124 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1127 $this->tpl->setContent($tbl->getHTML());
1134 if (!count((array)
$_POST[
'user'])) {
1136 $this->ctrl->redirect($this,
'offlineModeManager');
1139 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1141 $cgui->setFormAction($this->ctrl->getFormAction($this));
1142 $cgui->setHeaderText($this->lng->txt(
"info_stop_offline_mode_sure"));
1143 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelStopUserOfflineMode");
1144 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedStopUserOfflineMode");
1145 foreach (
$_POST[
"user"] as $id) {
1149 " " . $this->lng->txt(
"stop_user_offline_mode_for_user") .
1150 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
1151 $cgui->addItem(
"user[]", $id, $caption);
1154 $this->tpl->setContent($cgui->getHTML());
1160 $this->ctrl->redirect($this,
"offlineModeManager");
1165 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
1166 foreach (
$_POST[
"user"] as $id) {
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
initPropertiesForm()
Init properties form.
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
getPropertiesFormValues()
Get values for properties form.
Class ilObjSCORMLearningModule.
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
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 moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
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 renameExecutables($a_dir)
Rename uploaded executables for security reasons.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)