5 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
6 require_once(
"./Services/FileSystem/classes/class.ilFileSystemGUI.php");
7 require_once(
"Services/User/classes/class.ilObjUser.php");
9 require_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
10 require_once(
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
41 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) {
73 $rbacsystem = $DIC[
'rbacsystem'];
77 $ilToolbar = $DIC[
'ilToolbar'];
80 $ilTabs = $DIC[
'ilTabs'];
84 $lng->loadLanguageModule(
"style");
87 $ilTabs->setSubTabActive(
'cont_settings');
90 $ilToolbar->addButtonInstance($this->object->getViewButton());
92 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
94 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
95 $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
98 $this->
object->checkMasteryScoreValues();
101 $ti =
new ilTextInputGUI($this->lng->txt(
"title"),
"Fobject_title");
103 $ti->setValue($this->object->getTitle());
104 $this->form->addItem($ti);
108 $ti->
setValue($this->object->getDescription());
109 $this->form->addItem($ti);
114 $this->form->addItem($ne);
118 $ne->
setValue($this->object->getModuleVersion());
119 $ne->setInfo($this->lng->txt(
"cont_sc_version_info"));
120 $this->form->addItem($ne);
126 $sh->setTitle($this->lng->txt(
"activation"));
127 $this->form->addItem($sh);
131 if (!$this->object->getOfflineStatus()) {
134 $cb->setInfo($this->lng->txt(
"cont_online_info"));
135 $this->form->addItem($cb);
138 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_offline_mode_allow"),
"cobj_offline_mode");
140 $cb->setChecked($this->object->getOfflineMode());
141 include_once(
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
143 $cb->setDisabled(
true);
144 $cb->setInfo($this->lng->txt(
"cont_offline_mode_disable_not_allowed_info"));
146 $cb->setInfo($this->lng->txt(
"cont_offline_mode_allow_info"));
148 $this->form->addItem($cb);
154 $sh->setTitle($this->lng->txt(
"cont_presentation"));
155 $this->form->addItem($sh);
158 $op0 =
new ilRadioOption($this->lng->txt(
"cont_open_normal"),
"0");
159 $radg->addOption($op0);
160 $op1 =
new ilRadioOption($this->lng->txt(
"cont_open_iframe"),
"1");
161 $radg->addOption($op1);
162 $op2 =
new ilRadioOption($this->lng->txt(
"cont_open_window"),
"5");
163 $radg->addOption($op2);
164 $radg->
setValue($this->object->getOpenMode());
170 $ni->setValue($this->object->getWidth());
171 $op1->addSubItem($ni);
175 $ni->setValue($this->object->getWidth());
176 $op2->addSubItem($ni);
181 $ni->setValue($this->object->getHeight());
182 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
183 $op1->addSubItem($ni);
187 $ni->setValue($this->object->getHeight());
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->setChecked($this->object->getAuto_last_visited());
197 $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
198 $this->form->addItem($cb);
201 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_sc_auto_continue"),
"auto_continue");
203 $cb->setChecked($this->object->getAutoContinue());
204 $cb->setInfo($this->lng->txt(
"cont_sc_auto_continue_info"));
205 $this->form->addItem($cb);
208 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
214 $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
215 $this->form->addItem($sh);
218 $options = array(
"normal" => $this->lng->txt(
"cont_sc_less_mode_normal"),
219 "browse" => $this->lng->txt(
"cont_sc_less_mode_browse"));
222 $si->setValue($this->object->getDefaultLessonMode());
223 $this->form->addItem($si);
226 $options = array(
"credit" => $this->lng->txt(
"cont_credit_on"),
227 "no_credit" => $this->lng->txt(
"cont_credit_off"));
228 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_credit_mode"),
"credit_mode");
230 $si->setValue($this->object->getCreditMode());
231 $si->setInfo($this->lng->txt(
"cont_credit_mode_info"));
232 $this->form->addItem($si);
236 "n" => $this->lng->txt(
"cont_sc_auto_review_no"),
242 "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
244 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_sc_auto_review_2004"),
"auto_review");
246 $si->setValue($this->object->getAutoReviewChar());
248 $this->form->addItem($si);
251 if ($this->object->getMasteryScoreValues() !=
"") {
252 $ni =
new ilNumberInputGUI($this->lng->txt(
"cont_mastery_score_12"),
"mastery_score");
255 $ni->setValue($this->object->getMasteryScore());
256 $ni->setInfo($this->lng->txt(
"cont_mastery_score_12_info") . $this->
object->getMasteryScoreValues());
257 $this->form->addItem($ni);
264 $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
265 $this->form->addItem($sh);
270 $cb->setChecked($this->object->getSession());
271 $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
272 $this->form->addItem($cb);
275 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"),
"cobj_interactions");
277 $cb->setChecked($this->object->getInteractions());
278 $cb->setInfo($this->lng->txt(
"cont_interactions_info_12"));
279 $this->form->addItem($cb);
284 $cb->setChecked($this->object->getObjectives());
285 $cb->setInfo($this->lng->txt(
"cont_objectives_info"));
286 $this->form->addItem($cb);
289 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"),
"cobj_time_from_lms");
291 $cb->setChecked($this->object->getTime_from_lms());
292 $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
293 $this->form->addItem($cb);
296 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"),
"cobj_check_values");
298 $cb->setChecked($this->object->getCheck_values());
299 $cb->setInfo($this->lng->txt(
"cont_check_values_info"));
300 $this->form->addItem($cb);
303 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_suspend"),
"cobj_auto_suspend");
305 $cb->setChecked($this->object->getAutoSuspend());
306 $cb->setInfo($this->lng->txt(
"cont_auto_suspend_info"));
307 $this->form->addItem($cb);
311 0 => $this->lng->txt(
"cont_sc_id_setting_user_id"),
312 1 => $this->lng->txt(
"cont_sc_id_setting_user_login"),
313 2 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_ref_id"),
314 3 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_ref_id"),
315 4 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_obj_id"),
316 5 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_obj_id")
318 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_sc_id_setting"),
"id_setting");
320 $si->setValue($this->object->getIdSetting());
321 $si->setInfo($this->lng->txt(
"cont_sc_id_setting_info"));
322 $this->form->addItem($si);
326 0 => $this->lng->txt(
"cont_sc_name_setting_last_firstname"),
327 1 => $this->lng->txt(
"cont_sc_name_setting_first_lastname"),
328 2 => $this->lng->txt(
"cont_sc_name_setting_fullname"),
329 3 => $this->lng->txt(
"cont_sc_name_setting_salutation_lastname"),
330 4 => $this->lng->txt(
"cont_sc_name_setting_first_name"),
331 9 => $this->lng->txt(
"cont_sc_name_setting_no_name")
333 $si =
new ilSelectInputGUI($this->lng->txt(
"cont_sc_name_setting"),
"name_setting");
335 $si->setValue($this->object->getNameSetting());
336 $si->setInfo($this->lng->txt(
"cont_sc_name_setting_info"));
337 $this->form->addItem($si);
343 $sh->setTitle($this->lng->txt(
"cont_debugging"));
344 $this->form->addItem($sh);
349 $cb->setChecked($this->object->getDebug());
350 if ($this->object->getDebugActivated() ==
false) {
351 $cb->setDisabled(
true);
352 $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
354 $cb->setInfo($this->lng->txt(
"cont_debug_deactivate12"));
356 $this->form->addItem($cb);
357 $this->form->addCommandButton(
"saveProperties",
$lng->txt(
"save"));
359 $tpl->setContent($this->form->getHTML());
368 $ilTabs = $DIC[
'ilTabs'];
370 $ilTabs->setSubTabActive(
'cont_sc_new_version');
375 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
378 $this->form->setTitle($this->lng->txt(
"import_sahs"));
383 $this->form->addItem($ne);
386 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
388 $options[
""] = $this->lng->txt(
"cont_select_from_upload_dir");
390 foreach (
$files as $file) {
391 $file = htmlspecialchars($file, ENT_QUOTES,
"utf-8");
398 $op0 =
new ilRadioOption($this->lng->txt(
"cont_choose_local"),
"local");
399 $radg->addOption($op0);
400 $op1 =
new ilRadioOption($this->lng->txt(
"cont_choose_upload_dir"),
"upload_dir");
401 $radg->addOption($op1);
404 $fi =
new ilFileInputGUI($this->lng->txt(
"select_file"),
"scormfile");
410 $op1->addSubItem(
$si);
412 $this->form->addItem($radg);
414 $fi =
new ilFileInputGUI($this->lng->txt(
"select_file"),
"scormfile");
416 $this->form->addItem($fi);
418 $this->form->addCommandButton(
"newModuleVersionUpload", $this->lng->txt(
"upload"));
419 $this->form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
420 $this->form->setFormAction($DIC[
'ilCtrl']->
getFormAction($this,
"newModuleVersionUpload"));
421 $DIC[
'tpl']->setContent($this->form->getHTML());
428 $umf = get_cfg_var(
"upload_max_filesize");
430 $pms = get_cfg_var(
"post_max_size");
433 $multiplier_a = array(
"K" => 1024,
"M" => 1024 * 1024,
"G" => 1024 * 1024 * 1024);
435 $umf_parts = preg_split(
"/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
436 $pms_parts = preg_split(
"/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
438 if (count($umf_parts) == 2) {
439 $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
441 if (count($pms_parts) == 2) {
442 $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
446 $max_filesize = min($umf, $pms);
448 if (!$max_filesize) {
449 $max_filesize = max($umf, $pms);
453 return $max_filesize = sprintf(
"%.1f MB", $max_filesize / 1024 / 1024);
460 $rbacsystem = $DIC[
'rbacsystem'];
462 $unzip = PATH_TO_UNZIP;
463 $tocheck =
"imsmanifest.xml";
465 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
468 if (!$rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"])) {
469 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->
ilias->error_obj->WARNING);
470 } elseif ($_FILES[
"scormfile"][
"name"]) {
472 $source = $_FILES[
"scormfile"][
"tmp_name"];
478 } elseif (
$_POST[
"uploaded_file"]) {
481 $this->
ilias->raiseError($this->lng->txt(
"upload_error_file_not_found"), $this->
ilias->error_obj->MESSAGE);
487 $source_is_copy =
true;
497 $dir = $pathinfo[
"dirname"];
498 $file = $pathinfo[
"basename"];
506 $tmp_file = $dir .
"/" .
$_GET[
"ref_id"] .
"." . $tocheck;
509 $new_manifest = file_get_contents($tmp_file);
515 $old_manifest = file_get_contents($this->object->getDataDirectory() .
"/" . $tocheck);
518 $check =
'/xmlns="http:\/\/www.imsglobal.org\/xsd\/imscp_v1p1"/';
519 $replace =
"xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1p2\"";
520 $reload_manifest = preg_replace($check, $replace, $new_manifest);
523 if (strcmp($new_manifest, $old_manifest) == 0 || strcmp(utf8_encode($new_manifest), $old_manifest) == 0 ||
524 strcmp($reload_manifest, $old_manifest) == 0 || strcmp(utf8_encode($reload_manifest), $old_manifest) == 0) {
527 $module_version = $this->
object->getModuleVersion() + 1;
529 if ($_FILES[
"scormfile"][
"name"]) {
531 $file_path = $this->
object->getDataDirectory() .
"/" . $_FILES[
"scormfile"][
"name"] .
"." . $module_version;
532 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
534 ilUtil::moveUploadedFile($_FILES[
"scormfile"][
"tmp_name"], $_FILES[
"scormfile"][
"name"], $file_path);
537 $file_path = $this->
object->getDataDirectory() .
"/" .
$_POST[
"uploaded_file"] .
"." . $module_version;
538 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
548 $this->
object->setModuleVersion($module_version);
549 $this->
object->update();
556 if ($source_is_copy) {
570 $this->
object->setTitle(
$_POST[
"Fobject_title"]);
571 $this->
object->setDescription(
$_POST[
"Fobject_description"]);
575 $this->form->checkInput();
579 if ($tmpOfflineMode ==
true) {
580 if ($this->object->getOfflineMode() ==
false) {
581 $this->
object->zipLmForOfflineMode();
584 if (isset(
$_POST[
"mastery_score"])) {
585 $this->
object->setMasteryScore(
$_POST[
"mastery_score"]);
589 $t_height = $this->
object->getHeight();
590 if (
$_POST[
"height_0"] != $this->object->getHeight()) {
591 $t_height =
$_POST[
"height_0"];
593 if (
$_POST[
"height_1"] != $this->object->getHeight()) {
594 $t_height =
$_POST[
"height_1"];
597 $t_width = $this->
object->getWidth();
598 if (
$_POST[
"width_0"] != $this->object->getWidth()) {
599 $t_width =
$_POST[
"width_0"];
601 if (
$_POST[
"width_1"] != $this->object->getWidth()) {
602 $t_width =
$_POST[
"width_1"];
604 $this->
object->setOfflineStatus(!(
$_POST[
'cobj_online']));
605 $this->
object->setOfflineMode($tmpOfflineMode);
606 $this->
object->setOpenMode(
$_POST[
"open_mode"]);
607 $this->
object->setWidth($t_width);
608 $this->
object->setHeight($t_height);
611 $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
612 $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
613 $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
622 $this->
object->setIdSetting(
$_POST[
"id_setting"]);
623 $this->
object->setNameSetting(
$_POST[
"name_setting"]);
624 $this->
object->update();
627 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
630 $this->ctrl->redirect($this,
"properties");
639 $ilTabs = $DIC[
'ilTabs'];
642 $ilTabs->setTabActive(
"cont_tracking_data");
643 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
645 $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
646 $scoSelected =
"all";
647 if (isset(
$_GET[
"scoSelected"])) {
650 if (isset(
$_POST[
"scoSelected"])) {
653 $this->ctrl->setParameter($this,
'scoSelected', $scoSelected);
656 if (isset(
$_GET[
"report"])) {
659 if (isset(
$_POST[
"report"])) {
662 $this->ctrl->setParameter($this,
'report', $report);
664 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
666 $filter->parse($scoSelected, $report, $reports);
667 if ($report ==
"choose") {
668 $this->tpl->setContent($filter->form->getHTML());
670 $scosSelected = array();
671 if ($scoSelected !=
"all") {
672 $scosSelected[] = $scoSelected;
674 $scos = $this->
object->getTrackedItems();
675 foreach ($scos as
$row) {
676 $scosSelected[] = (int) $row->getId();
680 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
683 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
685 $this->tpl->setContent($filter->form->getHTML() .
$tbl->getHTML());
699 $ilTabs = $DIC[
'ilTabs'];
700 $ilAccess = $DIC[
'ilAccess'];
702 $ilTabs->setTabActive(
'cont_tracking_data');
704 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
706 $ilTabs->setSubTabActive(
'cont_tracking_byuser');
708 $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
710 $userSelected =
"all";
711 if (isset(
$_GET[
"userSelected"])) {
714 if (isset(
$_POST[
"userSelected"])) {
717 $this->ctrl->setParameter($this,
'userSelected', $userSelected);
720 if (isset(
$_GET[
"report"])) {
723 if (isset(
$_POST[
"report"])) {
726 $this->ctrl->setParameter($this,
'report', $report);
728 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
730 $filter->parse($userSelected, $report, $reports);
731 if ($report ==
"choose") {
732 $this->tpl->setContent($filter->form->getHTML());
734 $usersSelected = array();
735 if ($userSelected !=
"all") {
736 $usersSelected[] = $userSelected;
738 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
742 $usersSelected[] =
$user;
746 $scosSelected = array();
747 $scos = $this->
object->getTrackedItems();
748 foreach ($scos as
$row) {
749 $scosSelected[] = (int) $row->getId();
756 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
758 $this->tpl->setContent($filter->form->getHTML() .
$tbl->getHTML());
760 } elseif ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
768 $ilAccess = $DIC[
'ilAccess'];
769 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
770 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
772 if (!$privacy->enabledSahsProtocolData()) {
773 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->
ilias->error_obj->MESSAGE);
777 $ilTabs = $DIC[
'ilTabs'];
778 $ilToolbar = $DIC[
'ilToolbar'];
780 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
781 $ilToolbar->addButton(
782 $this->lng->txt(
'import'),
783 $this->ctrl->getLinkTarget($this,
'importForm')
785 $ilToolbar->addButton(
786 $this->lng->txt(
'cont_export_all'),
787 $this->ctrl->getLinkTarget($this,
'exportAll')
791 $ilTabs->setTabActive(
'cont_tracking_data');
792 $ilTabs->setSubTabActive(
'cont_tracking_modify');
794 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
797 $this->tpl->setContent(
$tbl->getHTML());
807 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
809 $tbl->writeFilterToSession();
819 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
831 if (!isset(
$_POST[
"user"])) {
832 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->
ilias->error_obj->MESSAGE);
836 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
838 $cgui->setFormAction($this->ctrl->getFormAction($this));
839 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
840 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteTracking");
841 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDeleteTracking");
848 " " . $this->lng->txt(
"cont_tracking_data") .
849 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
852 $cgui->addItem(
"user[]", $id, $caption);
856 $this->tpl->setContent($cgui->getHTML());
865 $this->ctrl->redirect($this,
"modifyTrackingItems");
870 $this->
object->deleteTrackingDataOfUsers(
$_POST[
"user"]);
871 $this->ctrl->redirect($this,
"modifyTrackingItems");
880 $this->ctrl->redirect($this,
"properties");
886 protected function import()
889 if (
$form->checkInput()) {
891 $error = $this->
object->importTrackingData(
$source[
'tmp_name']);
895 $this->ctrl->redirect($this,
"showTrackingItems");
904 $form->setValuesByPost();
914 $ilTabs = $DIC[
'ilTabs'];
916 $ilTabs->clearTargets();
917 $ilTabs->setBackTarget($this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'showTrackingItems'));
920 $this->tpl->setContent(
$form->getHTML());
928 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
930 $form->setFormAction($this->ctrl->getFormAction($this));
931 $form->setTitle($this->lng->txt(
'cont_import_tracking'));
932 $form->addCommandButton(
'import', $this->lng->txt(
'import'));
933 $form->addCommandButton(
'showTrackingItems', $this->lng->txt(
'cancel'));
937 $csv->setSuffixes(array(
'csv'));
938 $form->addItem($csv);
948 $this->
object->exportSelected(1);
956 if (!count((array)
$_POST[
'user'])) {
959 $this->ctrl->redirect($this,
'modifyTrackingItems');
961 $this->
object->exportSelected(0, $_POST[
"user"]);
968 if (!isset(
$_POST[
"user"])) {
971 $this->
object->decreaseAttemptsForUser(
$_POST[
"user"]);
972 $this->ctrl->redirect($this,
"modifyTrackingItems");
982 $ilTabs = $DIC[
'ilTabs'];
984 include_once
"./Services/Table/classes/class.ilTableGUI.php";
987 $ilTabs->setTabActive(
"cont_tracking_data");
988 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
990 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
992 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
994 $this->tpl->setContent(
$tbl->getHTML());
1004 $ilTabs = $DIC[
'ilTabs'];
1006 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1009 $ilTabs->setTabActive(
"cont_tracking_data");
1010 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
1012 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
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_byuser");
1034 $this->ctrl->setParameter($this,
'obj_id', (
int) $_REQUEST[
'obj_id']);
1035 $this->ctrl->setParameter($this,
'user_id', (
int) $_REQUEST[
'user_id']);
1037 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1039 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
1040 $tbl->setScoId((
int) $_REQUEST[
'obj_id']);
1042 $this->tpl->setContent(
$tbl->getHTML());
1051 $ilTabs = $DIC[
'ilTabs'];
1053 $ilAccess = $DIC[
'ilAccess'];
1055 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
1056 $ilTabs->addSubTabTarget(
1057 "cont_tracking_byuser",
1058 $this->ctrl->getLinkTarget($this,
"showTrackingItems"),
1063 $ilTabs->addSubTabTarget(
1064 "cont_tracking_bysco",
1065 $this->ctrl->getLinkTarget($this,
"showTrackingItemsBySco"),
1070 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
1071 $ilTabs->addSubTabTarget(
1072 "cont_tracking_modify",
1073 $this->ctrl->getLinkTarget($this,
"modifyTrackingItems"),
1089 $rbacsystem = $DIC[
'rbacsystem'];
1090 $tree = $DIC[
'tree'];
1093 $ilToolbar = $DIC[
'ilToolbar'];
1097 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
1099 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->
ilias->error_obj->MESSAGE);
1102 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1105 $this->tpl->setContent(
$tbl->getHTML());
1112 if (!count((array)
$_POST[
'user'])) {
1114 $this->ctrl->redirect($this,
'offlineModeManager');
1117 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1119 $cgui->setFormAction($this->ctrl->getFormAction($this));
1120 $cgui->setHeaderText($this->lng->txt(
"info_stop_offline_mode_sure"));
1121 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelStopUserOfflineMode");
1122 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedStopUserOfflineMode");
1123 foreach ($_POST[
"user"] as
$id) {
1127 " " . $this->lng->txt(
"stop_user_offline_mode_for_user") .
1128 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
1129 $cgui->addItem(
"user[]", $id, $caption);
1132 $this->tpl->setContent($cgui->getHTML());
1138 $this->ctrl->redirect($this,
"offlineModeManager");
1143 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
resetUserTableFilter()
Reset table filter.
Class ilSCORMTrackingItemsTableGUI.
This class represents an option in a radio group.
showTrackingItems()
Show tracking table ilTabs $ilTabs $global ilToolbar $ilToolbar.
Class ilObjSCORMLearningModuleGUI.
exportAll()
Show export section for all users.
static stopOfflineModeForUser($obj_id, $user_id)
setValue($a_value)
Set Value.
cancelDeleteTracking()
cancel deletion of export files
importForm()
Show import form.
Class ilSCORMTrackingItemsPerScoFilterGUI.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
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...
assignObject()
assign scorm object to scorm gui object
if(!array_key_exists('StateId', $_REQUEST)) $id
setValue($a_value)
Set Value.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static _getUploadDirectory()
Get the directory with uploaded files.
static _getUploadFiles()
Get a list of readable files in the upload directory.
applyUserTableFilter()
Apply table filter.
setSettingsSubTabs()
set Tabs for settings
static checkIfAnyoneIsInOfflineMode($obj_id)
confirmedDeleteTracking()
stopUserOfflineMode()
Stop offline mode for selected users.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
cancelStopUserOfflineMode()
static _lookupObjectId($a_ref_id)
lookup object id
exportSelectionUsers()
Export selection for selected users.
static rename($a_source, $a_target)
Rename a file.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
deleteTrackingForUser()
display deletion confirmation screen
setValue($a_value)
Set Value.
if(isset($_POST['submit'])) $form
showTrackingItemSco()
show tracking data of item
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
setMaxLength($a_maxlength)
Set Max Length.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
offlineModeManager()
Manage offline mode for users ilTabs $ilTabs $global ilToolbar $ilToolbar.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
newModuleVersion()
upload new version of module
GUI class ilSCORMOfflineModeUsersTableGUI.
saveProperties()
save properties
confirmedStopUserOfflineMode()
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
This class represents a non editable value in a property form.
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
static escapeShellArg($a_arg)
This class represents a text area property in a property form.
Class ilSCORMTrackingItemsPerUserFilterGUI.
static _getInstance()
Get instance of ilPrivacySettings.
static _checkUploadFile($a_file)
Check if a file exists in the upload directory and is readable.
getObjectService()
Get object service.
const EXPORT_TYPE_SUCCESS
static yn2tf($a_yn)
convert "y"/"n" to true/false
showTrackingItem()
show tracking data of item
static redirect($a_script)
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
static _copyUploadFile($a_file, $a_target, $a_raise_errors=true)
copy an uploaded file to the target directory (including virus check)
Class ilObjSCORMLearningModule.
showTrackingItemsBySco()
show tracking data
properties()
scorm module properties
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
showTrackingItemPerUser()
show tracking data of item per user
cancel()
overwrite..jump back to trackingdata not parent
Confirmation screen class.
initImportForm($a_new_type)
Init import form.