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());
102 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
105 $this->form->setTitle($this->lng->txt(
"cont_lm_properties"));
108 $this->
object->checkMasteryScoreValues();
111 $ti =
new ilTextInputGUI($this->lng->txt(
"title"),
"Fobject_title");
112 $ti->setMaxLength(200);
113 $this->form->addItem($ti);
117 $this->form->addItem($ti);
122 $this->form->addItem($ne);
126 $ne->setValue($this->object->getModuleVersion());
127 $ne->setInfo($this->lng->txt(
"cont_sc_version_info"));
128 $this->form->addItem($ne);
134 $sh->setTitle($this->lng->txt(
"activation"));
135 $this->form->addItem($sh);
139 $cb->setInfo($this->lng->txt(
"cont_online_info"));
140 $this->form->addItem($cb);
143 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_offline_mode_allow"),
"cobj_offline_mode");
145 include_once(
"./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
147 $cb->setDisabled(
true);
148 $cb->setInfo($this->lng->txt(
"cont_offline_mode_disable_not_allowed_info"));
150 $cb->setInfo($this->lng->txt(
"cont_offline_mode_allow_info"));
152 $this->form->addItem($cb);
158 $sh->setTitle($this->lng->txt(
"cont_presentation"));
159 $this->form->addItem($sh);
162 $op0 =
new ilRadioOption($this->lng->txt(
"cont_open_normal"),
"0");
163 $radg->addOption($op0);
164 $op1 =
new ilRadioOption($this->lng->txt(
"cont_open_iframe"),
"1");
165 $radg->addOption($op1);
166 $op2 =
new ilRadioOption($this->lng->txt(
"cont_open_window"),
"5");
167 $radg->addOption($op2);
171 $ni->setMaxLength(4);
173 $op1->addSubItem($ni);
175 $ni->setMaxLength(4);
177 $op2->addSubItem($ni);
180 $ni->setMaxLength(4);
182 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
183 $op1->addSubItem($ni);
185 $ni->setMaxLength(4);
187 $ni->setInfo($this->lng->txt(
"cont_width_height_info"));
188 $op2->addSubItem($ni);
190 $this->form->addItem($radg);
193 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_auto_last_visited"),
"cobj_auto_last_visited");
195 $cb->setInfo($this->lng->txt(
"cont_auto_last_visited_info"));
196 $this->form->addItem($cb);
199 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_sc_auto_continue"),
"auto_continue");
201 $cb->setInfo($this->lng->txt(
"cont_sc_auto_continue_info"));
202 $this->form->addItem($cb);
205 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
211 $sh->setTitle($this->lng->txt(
"cont_scorm_options"));
212 $this->form->addItem($sh);
215 $options = array(
"normal" => $this->lng->txt(
"cont_sc_less_mode_normal"),
216 "browse" => $this->lng->txt(
"cont_sc_less_mode_browse"));
218 $si->setOptions($options);
219 $this->form->addItem(
$si);
222 $options = array(
"credit" => $this->lng->txt(
"cont_credit_on"),
223 "no_credit" => $this->lng->txt(
"cont_credit_off"));
225 $si->setOptions($options);
226 $si->setInfo($this->lng->txt(
"cont_credit_mode_info"));
227 $this->form->addItem(
$si);
231 "n" => $this->lng->txt(
"cont_sc_auto_review_no"),
237 "y" => $this->lng->txt(
"cont_sc_auto_review_completed_or_passed"),
240 $si->setOptions($options);
242 $this->form->addItem(
$si);
245 if ($this->object->getMasteryScoreValues() !=
"") {
246 $ni =
new ilNumberInputGUI($this->lng->txt(
"cont_mastery_score_12"),
"mastery_score");
247 $ni->setMaxLength(3);
249 $ni->setInfo($this->lng->txt(
"cont_mastery_score_12_info") . $this->object->getMasteryScoreValues());
250 $this->form->addItem($ni);
257 $sh->setTitle($this->lng->txt(
"cont_rte_settings"));
258 $this->form->addItem($sh);
263 $cb->setInfo($this->lng->txt(
"cont_sc_usession_info"));
264 $this->form->addItem($cb);
267 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_interactions"),
"cobj_interactions");
269 $cb->setInfo($this->lng->txt(
"cont_interactions_info_12"));
270 $this->form->addItem($cb);
275 $cb->setInfo($this->lng->txt(
"cont_objectives_info"));
276 $this->form->addItem($cb);
279 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_time_from_lms"),
"cobj_time_from_lms");
281 $cb->setInfo($this->lng->txt(
"cont_time_from_lms_info"));
282 $this->form->addItem($cb);
285 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_check_values"),
"cobj_check_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->setInfo($this->lng->txt(
"cont_auto_suspend_info"));
294 $this->form->addItem($cb);
298 0 => $this->lng->txt(
"cont_sc_id_setting_user_id"),
299 1 => $this->lng->txt(
"cont_sc_id_setting_user_login"),
300 2 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_ref_id"),
301 3 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_ref_id"),
302 4 => $this->lng->txt(
"cont_sc_id_setting_user_id_plus_obj_id"),
303 5 => $this->lng->txt(
"cont_sc_id_setting_user_login_plus_obj_id")
306 $si->setOptions($options);
307 $si->setInfo($this->lng->txt(
"cont_sc_id_setting_info"));
308 $this->form->addItem(
$si);
312 0 => $this->lng->txt(
"cont_sc_name_setting_last_firstname"),
313 1 => $this->lng->txt(
"cont_sc_name_setting_first_lastname"),
314 2 => $this->lng->txt(
"cont_sc_name_setting_fullname"),
315 3 => $this->lng->txt(
"cont_sc_name_setting_salutation_lastname"),
316 4 => $this->lng->txt(
"cont_sc_name_setting_first_name"),
317 9 => $this->lng->txt(
"cont_sc_name_setting_no_name")
320 $si->setOptions($options);
321 $si->setInfo($this->lng->txt(
"cont_sc_name_setting_info"));
322 $this->form->addItem(
$si);
328 $sh->setTitle($this->lng->txt(
"cont_debugging"));
329 $this->form->addItem($sh);
334 if ($this->object->getDebugActivated() ==
false) {
335 $cb->setDisabled(
true);
336 $cb->setInfo($this->lng->txt(
"cont_debug_deactivated"));
338 $cb->setInfo($this->lng->txt(
"cont_debug_deactivate12"));
340 $this->form->addItem($cb);
341 $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
342 $this->form->setFormAction($this->ctrl->getFormAction($this));
352 $values[
"Fobject_title"] = $this->
object->getTitle();
353 $values[
"Fobject_description"] = $this->
object->getLongDescription();
354 if (!$this->object->getOfflineStatus()) {
355 $values[
"cobj_online"] =
true;
357 $values[
"cobj_offline_mode"] = $this->
object->getOfflineMode();
358 $values[
"open_mode"] = $this->
object->getOpenMode();
359 $values[
"width_0"] = $this->
object->getWidth();
360 $values[
"width_1"] = $this->
object->getWidth();
361 $values[
"height_0"] = $this->
object->getHeight();
362 $values[
"height_1"] = $this->
object->getHeight();
363 $values[
"cobj_auto_last_visited"] = $this->
object->getAuto_last_visited();
364 $values[
"auto_continue"] = $this->
object->getAutoContinue();
365 $values[
"lesson_mode"] = $this->
object->getDefaultLessonMode();
366 $values[
"credit_mode"] = $this->
object->getCreditMode();
367 $values[
"auto_review"] = $this->
object->getAutoReviewChar();
368 $values[
"mastery_score"] = $this->
object->getMasteryScore();
369 $values[
"cobj_session"] = $this->
object->getSession();
370 $values[
"cobj_interactions"] = $this->
object->getInteractions();
371 $values[
"cobj_objectives"] = $this->
object->getObjectives();
372 $values[
"cobj_time_from_lms"] = $this->
object->getTime_from_lms();
373 $values[
"cobj_check_values"] = $this->
object->getCheck_values();
374 $values[
"cobj_auto_suspend"] = $this->
object->getAutoSuspend();
375 $values[
"id_setting"] = $this->
object->getIdSetting();
376 $values[
"name_setting"] = $this->
object->getNameSetting();
377 $values[
"cobj_debug"] = $this->
object->getDebug();
378 $this->form->setValuesByArray($values);
387 $ilTabs =
$DIC[
'ilTabs'];
389 $ilTabs->setSubTabActive(
'cont_sc_new_version');
394 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
397 $this->form->setTitle($this->lng->txt(
"import_sahs"));
402 $this->form->addItem($ne);
405 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
407 $options[
""] = $this->lng->txt(
"cont_select_from_upload_dir");
409 foreach ($files as $file) {
410 $file = htmlspecialchars($file, ENT_QUOTES,
"utf-8");
411 $options[$file] = $file;
414 if (count($options) > 1) {
417 $op0 =
new ilRadioOption($this->lng->txt(
"cont_choose_local"),
"local");
418 $radg->addOption($op0);
419 $op1 =
new ilRadioOption($this->lng->txt(
"cont_choose_upload_dir"),
"upload_dir");
420 $radg->addOption($op1);
421 $radg->setValue(
"local");
423 $fi =
new ilFileInputGUI($this->lng->txt(
"select_file"),
"scormfile");
424 $fi->setRequired(
true);
425 $op0->addSubItem($fi);
428 $si->setOptions($options);
429 $op1->addSubItem(
$si);
431 $this->form->addItem($radg);
433 $fi =
new ilFileInputGUI($this->lng->txt(
"select_file"),
"scormfile");
434 $fi->setRequired(
true);
435 $this->form->addItem($fi);
437 $this->form->addCommandButton(
"newModuleVersionUpload", $this->lng->txt(
"upload"));
438 $this->form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
439 $this->form->setFormAction(
$DIC[
'ilCtrl']->
getFormAction($this,
"newModuleVersionUpload"));
440 $DIC[
'tpl']->setContent($this->form->getHTML());
447 $umf = get_cfg_var(
"upload_max_filesize");
449 $pms = get_cfg_var(
"post_max_size");
452 $multiplier_a = array(
"K" => 1024,
"M" => 1024 * 1024,
"G" => 1024 * 1024 * 1024);
454 $umf_parts = preg_split(
"/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
455 $pms_parts = preg_split(
"/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
457 if (count($umf_parts) == 2) {
458 $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
460 if (count($pms_parts) == 2) {
461 $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
465 $max_filesize = min($umf, $pms);
467 if (!$max_filesize) {
468 $max_filesize = max($umf, $pms);
472 return $max_filesize = sprintf(
"%.1f MB", $max_filesize / 1024 / 1024);
481 $unzip = PATH_TO_UNZIP;
482 $tocheck =
"imsmanifest.xml";
484 include_once
'Services/FileSystem/classes/class.ilUploadFiles.php';
488 $this->
ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->WARNING);
489 } elseif ($_FILES[
"scormfile"][
"name"]) {
491 $source = $_FILES[
"scormfile"][
"tmp_name"];
497 } elseif (
$_POST[
"uploaded_file"]) {
500 $this->
ilias->raiseError($this->lng->txt(
"upload_error_file_not_found"), $this->ilias->error_obj->MESSAGE);
506 $source_is_copy =
true;
516 $dir = $pathinfo[
"dirname"];
517 $file = $pathinfo[
"basename"];
525 $tmp_file = $dir .
"/" .
$_GET[
"ref_id"] .
"." . $tocheck;
528 $new_manifest = file_get_contents($tmp_file);
534 $old_manifest = file_get_contents($this->object->getDataDirectory() .
"/" . $tocheck);
537 $check =
'/xmlns="http:\/\/www.imsglobal.org\/xsd\/imscp_v1p1"/';
538 $replace =
"xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1p2\"";
539 $reload_manifest = preg_replace($check, $replace, $new_manifest);
542 if (strcmp($new_manifest, $old_manifest) == 0 || strcmp(utf8_encode($new_manifest), $old_manifest) == 0 ||
543 strcmp($reload_manifest, $old_manifest) == 0 || strcmp(utf8_encode($reload_manifest), $old_manifest) == 0) {
546 $module_version = $this->
object->getModuleVersion() + 1;
548 if ($_FILES[
"scormfile"][
"name"]) {
550 $file_path = $this->
object->getDataDirectory() .
"/" . $_FILES[
"scormfile"][
"name"] .
"." . $module_version;
551 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
556 $file_path = $this->
object->getDataDirectory() .
"/" .
$_POST[
"uploaded_file"] .
"." . $module_version;
557 $file_path = str_replace(
".zip." . $module_version,
"." . $module_version .
".zip", $file_path);
567 $this->
object->setModuleVersion($module_version);
568 $this->
object->update();
575 if ($source_is_copy) {
591 if ($this->form->checkInput()) {
592 $this->
object->setTitle(
$_POST[
"Fobject_title"]);
593 $this->
object->setDescription(
$_POST[
"Fobject_description"]);
597 if ($tmpOfflineMode ==
true) {
598 if ($this->object->getOfflineMode() ==
false) {
599 $this->
object->zipLmForOfflineMode();
602 if (isset(
$_POST[
"mastery_score"])) {
603 $this->
object->setMasteryScore(
$_POST[
"mastery_score"]);
607 $t_height = $this->
object->getHeight();
608 if (
$_POST[
"height_0"] != $this->object->getHeight()) {
609 $t_height =
$_POST[
"height_0"];
611 if (
$_POST[
"height_1"] != $this->object->getHeight()) {
612 $t_height =
$_POST[
"height_1"];
615 $t_width = $this->
object->getWidth();
616 if (
$_POST[
"width_0"] != $this->object->getWidth()) {
617 $t_width =
$_POST[
"width_0"];
619 if (
$_POST[
"width_1"] != $this->object->getWidth()) {
620 $t_width =
$_POST[
"width_1"];
622 $this->
object->setOfflineStatus(!(
$_POST[
'cobj_online']));
623 $this->
object->setOfflineMode($tmpOfflineMode);
624 $this->
object->setOpenMode(
$_POST[
"open_mode"]);
625 $this->
object->setWidth($t_width);
626 $this->
object->setHeight($t_height);
629 $this->
object->setMaxAttempt(
$_POST[
"max_attempt"]);
630 $this->
object->setDefaultLessonMode(
$_POST[
"lesson_mode"]);
631 $this->
object->setCreditMode(
$_POST[
"credit_mode"]);
640 $this->
object->setIdSetting(
$_POST[
"id_setting"]);
641 $this->
object->setNameSetting(
$_POST[
"name_setting"]);
642 $this->
object->update();
645 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
648 $this->ctrl->redirect($this,
"properties");
657 $ilTabs =
$DIC[
'ilTabs'];
660 $ilTabs->setTabActive(
"cont_tracking_data");
661 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
663 $reports = array(
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
664 $scoSelected =
"all";
665 if (isset(
$_GET[
"scoSelected"])) {
668 if (isset(
$_POST[
"scoSelected"])) {
671 $this->ctrl->setParameter($this,
'scoSelected', $scoSelected);
674 if (isset(
$_GET[
"report"])) {
677 if (isset(
$_POST[
"report"])) {
680 $this->ctrl->setParameter($this,
'report', $report);
682 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
684 $filter->parse($scoSelected, $report, $reports);
685 if ($report ==
"choose") {
686 $this->tpl->setContent($filter->form->getHTML());
688 $scosSelected = array();
689 if ($scoSelected !=
"all") {
690 $scosSelected[] = $scoSelected;
692 $scos = $this->
object->getTrackedItems();
693 foreach ($scos as $row) {
694 $scosSelected[] = (int) $row->getId();
698 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
701 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
703 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
717 $ilTabs =
$DIC[
'ilTabs'];
718 $ilAccess =
$DIC[
'ilAccess'];
720 $ilTabs->setTabActive(
'cont_tracking_data');
722 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
724 $ilTabs->setSubTabActive(
'cont_tracking_byuser');
726 $reports = array(
'exportSelectedSuccess',
'exportSelectedCore',
'exportSelectedInteractions',
'exportSelectedObjectives',
'exportSelectedRaw');
728 $userSelected =
"all";
729 if (isset(
$_GET[
"userSelected"])) {
732 if (isset(
$_POST[
"userSelected"])) {
735 $this->ctrl->setParameter($this,
'userSelected', $userSelected);
738 if (isset(
$_GET[
"report"])) {
741 if (isset(
$_POST[
"report"])) {
744 $this->ctrl->setParameter($this,
'report', $report);
746 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
748 $filter->parse($userSelected, $report, $reports);
749 if ($report ==
"choose") {
750 $this->tpl->setContent($filter->form->getHTML());
752 $usersSelected = array();
753 if ($userSelected !=
"all") {
754 $usersSelected[] = $userSelected;
756 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
758 foreach ($users as
$user) {
760 $usersSelected[] =
$user;
764 $scosSelected = array();
765 $scos = $this->
object->getTrackedItems();
766 foreach ($scos as $row) {
767 $scosSelected[] = (int) $row->getId();
774 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
776 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
778 } elseif ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
786 $ilAccess =
$DIC[
'ilAccess'];
787 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
788 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
790 if (!$privacy->enabledSahsProtocolData()) {
791 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
795 $ilTabs =
$DIC[
'ilTabs'];
796 $ilToolbar =
$DIC[
'ilToolbar'];
798 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
799 $ilToolbar->addButton(
800 $this->lng->txt(
'import'),
801 $this->ctrl->getLinkTarget($this,
'importForm')
803 $ilToolbar->addButton(
804 $this->lng->txt(
'cont_export_all'),
805 $this->ctrl->getLinkTarget($this,
'exportAll')
809 $ilTabs->setTabActive(
'cont_tracking_data');
810 $ilTabs->setSubTabActive(
'cont_tracking_modify');
812 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
815 $this->tpl->setContent($tbl->getHTML());
825 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
827 $tbl->writeFilterToSession();
837 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
849 if (!isset(
$_POST[
"user"])) {
850 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"), $this->ilias->error_obj->MESSAGE);
854 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
856 $cgui->setFormAction($this->ctrl->getFormAction($this));
857 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
858 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteTracking");
859 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedDeleteTracking");
861 foreach (
$_POST[
"user"] as $id) {
866 " " . $this->lng->txt(
"cont_tracking_data") .
867 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
870 $cgui->addItem(
"user[]", $id, $caption);
874 $this->tpl->setContent($cgui->getHTML());
883 $this->ctrl->redirect($this,
"modifyTrackingItems");
888 $this->
object->deleteTrackingDataOfUsers(
$_POST[
"user"]);
889 $this->ctrl->redirect($this,
"modifyTrackingItems");
898 $this->ctrl->redirect($this,
"properties");
904 protected function import()
907 if ($form->checkInput()) {
908 $source = $form->getInput(
'csv');
909 $error = $this->
object->importTrackingData(
$source[
'tmp_name']);
913 $this->ctrl->redirect($this,
"showTrackingItems");
922 $form->setValuesByPost();
932 $ilTabs =
$DIC[
'ilTabs'];
934 $ilTabs->clearTargets();
935 $ilTabs->setBackTarget($this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'showTrackingItems'));
938 $this->tpl->setContent($form->getHTML());
946 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
948 $form->setFormAction($this->ctrl->getFormAction($this));
949 $form->setTitle($this->lng->txt(
'cont_import_tracking'));
950 $form->addCommandButton(
'import', $this->lng->txt(
'import'));
951 $form->addCommandButton(
'showTrackingItems', $this->lng->txt(
'cancel'));
954 $csv->setRequired(
true);
955 $csv->setSuffixes(array(
'csv'));
956 $form->addItem($csv);
966 $this->
object->exportSelected(1);
974 if (!count((array)
$_POST[
'user'])) {
977 $this->ctrl->redirect($this,
'modifyTrackingItems');
979 $this->
object->exportSelected(0, $_POST[
"user"]);
991 $ilTabs =
$DIC[
'ilTabs'];
993 include_once
"./Services/Table/classes/class.ilTableGUI.php";
996 $ilTabs->setTabActive(
"cont_tracking_data");
997 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
999 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
1001 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
1003 $this->tpl->setContent($tbl->getHTML());
1013 $ilTabs =
$DIC[
'ilTabs'];
1015 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1018 $ilTabs->setTabActive(
"cont_tracking_data");
1019 $ilTabs->setSubTabActive(
"cont_tracking_bysco");
1021 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
1023 $tbl->setScoId((
int)
$_GET[
'obj_id']);
1025 $this->tpl->setContent($tbl->getHTML());
1035 $ilTabs =
$DIC[
'ilTabs'];
1037 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1040 $ilTabs->setTabActive(
"cont_tracking_data");
1041 $ilTabs->setSubTabActive(
"cont_tracking_byuser");
1043 $this->ctrl->setParameter($this,
'obj_id', (
int) $_REQUEST[
'obj_id']);
1044 $this->ctrl->setParameter($this,
'user_id', (
int) $_REQUEST[
'user_id']);
1046 include_once
'./Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1048 $tbl->setUserId((
int) $_REQUEST[
'user_id']);
1049 $tbl->setScoId((
int) $_REQUEST[
'obj_id']);
1051 $this->tpl->setContent($tbl->getHTML());
1060 $ilTabs =
$DIC[
'ilTabs'];
1061 $ilCtrl =
$DIC[
'ilCtrl'];
1062 $ilAccess =
$DIC[
'ilAccess'];
1064 if ($ilAccess->checkAccess(
"read_learning_progress",
"",
$_GET[
"ref_id"])) {
1065 $ilTabs->addSubTabTarget(
1066 "cont_tracking_byuser",
1067 $this->ctrl->getLinkTarget($this,
"showTrackingItems"),
1072 $ilTabs->addSubTabTarget(
1073 "cont_tracking_bysco",
1074 $this->ctrl->getLinkTarget($this,
"showTrackingItemsBySco"),
1079 if ($ilAccess->checkAccess(
"edit_learning_progress",
"",
$_GET[
"ref_id"])) {
1080 $ilTabs->addSubTabTarget(
1081 "cont_tracking_modify",
1082 $this->ctrl->getLinkTarget($this,
"modifyTrackingItems"),
1102 $ilToolbar =
$DIC[
'ilToolbar'];
1103 $ilCtrl =
$DIC[
'ilCtrl'];
1106 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
1108 $this->
ilias->raiseError($this->lng->txt(
'permission_denied'), $this->ilias->error_obj->MESSAGE);
1111 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1114 $this->tpl->setContent($tbl->getHTML());
1121 if (!count((array)
$_POST[
'user'])) {
1123 $this->ctrl->redirect($this,
'offlineModeManager');
1126 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1128 $cgui->setFormAction($this->ctrl->getFormAction($this));
1129 $cgui->setHeaderText($this->lng->txt(
"info_stop_offline_mode_sure"));
1130 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelStopUserOfflineMode");
1131 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmedStopUserOfflineMode");
1132 foreach (
$_POST[
"user"] as $id) {
1136 " " . $this->lng->txt(
"stop_user_offline_mode_for_user") .
1137 ": " .
$user->getLastname() .
", " .
$user->getFirstname();
1138 $cgui->addItem(
"user[]", $id, $caption);
1141 $this->tpl->setContent($cgui->getHTML());
1147 $this->ctrl->redirect($this,
"offlineModeManager");
1152 include_once
'./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
1153 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(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
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)