ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjSCORMLearningModuleGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
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");
8 
9 require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
10 require_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
11 
28 {
29  const EXPORT_UNDEF = 0;
30  const EXPORT_ALL = 1;
31  const EXPORT_SELECTED = 2;
32 
33  const EXPORT_TYPE_RAW = 1;
35 
41  public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = true)
42  {
43  global $DIC;
44  $lng = $DIC['lng'];
45 
46  $lng->loadLanguageModule("content");
47  $lng->loadLanguageModule("search");
48 
49  $this->type = "sahs";
50  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
51  }
52 
56  public function assignObject()
57  {
58  if ($this->id != 0) {
59  if ($this->call_by_reference) {
60  $this->object = new ilObjSCORMLearningModule($this->id, true);
61  } else {
62  $this->object = new ilObjSCORMLearningModule($this->id, false);
63  }
64  }
65  }
66 
70  public function properties()
71  {
72  global $DIC;
73  $rbacsystem = $DIC['rbacsystem'];
74  $tree = $DIC['tree'];
75  $tpl = $DIC['tpl'];
76  $lng = $DIC['lng'];
77  $ilToolbar = $DIC['ilToolbar'];
78  $ilCtrl = $DIC['ilCtrl'];
79  $ilSetting = $DIC['ilSetting'];
80  $ilTabs = $DIC['ilTabs'];
81 
82  $obj_service = $this->getObjectService();
83 
84  $lng->loadLanguageModule("style");
85 
87  $ilTabs->setSubTabActive('cont_settings');
88 
89  // view
90  $ilToolbar->addButtonInstance($this->object->getViewButton());
91 
92  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
93  $this->form = new ilPropertyFormGUI();
94  $this->form->setFormAction($ilCtrl->getFormAction($this));
95  $this->form->setTitle($this->lng->txt("cont_lm_properties"));
96 
97  //check/select only once
98  $this->object->checkMasteryScoreValues();
99 
100  //title
101  $ti = new ilTextInputGUI($this->lng->txt("title"), "Fobject_title");
102  $ti->setMaxLength(200);
103  $ti->setValue($this->object->getTitle());
104  $this->form->addItem($ti);
105 
106  //description
107  $ti = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject_description");
108  $ti->setValue($this->object->getDescription());
109  $this->form->addItem($ti);
110 
111  // SCORM-type
112  $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
113  $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
114  $this->form->addItem($ne);
115 
116  // version
117  $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
118  $ne->setValue($this->object->getModuleVersion());
119  $ne->setInfo($this->lng->txt("cont_sc_version_info"));
120  $this->form->addItem($ne);
121 
122  //
123  // activation
124  //
125  $sh = new ilFormSectionHeaderGUI();
126  $sh->setTitle($this->lng->txt("activation"));
127  $this->form->addItem($sh);
128 
129  // online
130  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
131  if (!$this->object->getOfflineStatus()) {
132  $cb->setChecked(true);
133  }
134  $cb->setInfo($this->lng->txt("cont_online_info"));
135  $this->form->addItem($cb);
136 
137  // offline Mode
138  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
139  $cb->setValue("y");
140  $cb->setChecked($this->object->getOfflineMode());
141  include_once("./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
142  if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
143  $cb->setDisabled(true);
144  $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
145  } else {
146  $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
147  }
148  $this->form->addItem($cb);
149 
150  //
151  // presentation
152  //
153  $sh = new ilFormSectionHeaderGUI();
154  $sh->setTitle($this->lng->txt("cont_presentation"));
155  $this->form->addItem($sh);
156 
157  $radg = new ilRadioGroupInputGUI($lng->txt("cont_open"), "open_mode");
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());
165 
166  // width
167  $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_0");
168  $ni->setMaxLength(4);
169  $ni->setSize(4);
170  $ni->setValue($this->object->getWidth());
171  $op1->addSubItem($ni);
172  $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_1");
173  $ni->setMaxLength(4);
174  $ni->setSize(4);
175  $ni->setValue($this->object->getWidth());
176  $op2->addSubItem($ni);
177  // height
178  $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_0");
179  $ni->setMaxLength(4);
180  $ni->setSize(4);
181  $ni->setValue($this->object->getHeight());
182  $ni->setInfo($this->lng->txt("cont_width_height_info"));
183  $op1->addSubItem($ni);
184  $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_1");
185  $ni->setMaxLength(4);
186  $ni->setSize(4);
187  $ni->setValue($this->object->getHeight());
188  $ni->setInfo($this->lng->txt("cont_width_height_info"));
189  $op2->addSubItem($ni);
190 
191  $this->form->addItem($radg);
192 
193  // auto navigation to last visited item
194  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
195  $cb->setValue("y");
196  $cb->setChecked($this->object->getAuto_last_visited());
197  $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
198  $this->form->addItem($cb);
199 
200  // auto continue
201  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_auto_continue"), "auto_continue");
202  $cb->setValue("y");
203  $cb->setChecked($this->object->getAutoContinue());
204  $cb->setInfo($this->lng->txt("cont_sc_auto_continue_info"));
205  $this->form->addItem($cb);
206 
207  // tile image
208  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
209 
210  //
211  // scorm options
212  //
213  $sh = new ilFormSectionHeaderGUI();
214  $sh->setTitle($this->lng->txt("cont_scorm_options"));
215  $this->form->addItem($sh);
216 
217  // lesson mode
218  $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"),
219  "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
220  $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
221  $si->setOptions($options);
222  $si->setValue($this->object->getDefaultLessonMode());
223  $this->form->addItem($si);
224 
225  // credit mode
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");
229  $si->setOptions($options);
230  $si->setValue($this->object->getCreditMode());
231  $si->setInfo($this->lng->txt("cont_credit_mode_info"));
232  $this->form->addItem($si);
233 
234  // set lesson mode review when completed
235  $options = array(
236  "n" => $this->lng->txt("cont_sc_auto_review_no"),
237 // "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
238 // "p" => $this->lng->txt("cont_sc_auto_review_passed"),
239 // "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
240 // "c" => $this->lng->txt("cont_sc_auto_review_completed"),
241 // "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
242  "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
243  );
244  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
245  $si->setOptions($options);
246  $si->setValue($this->object->getAutoReviewChar());
247  // $si->setInfo($this->lng->txt("cont_sc_auto_review_info_12"));
248  $this->form->addItem($si);
249 
250  // mastery_score
251  if ($this->object->getMasteryScoreValues() != "") {
252  $ni = new ilNumberInputGUI($this->lng->txt("cont_mastery_score_12"), "mastery_score");
253  $ni->setMaxLength(3);
254  $ni->setSize(3);
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);
258  }
259 
260  //
261  // rte settings
262  //
263  $sh = new ilFormSectionHeaderGUI();
264  $sh->setTitle($this->lng->txt("cont_rte_settings"));
265  $this->form->addItem($sh);
266 
267  // unlimited session timeout
268  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
269  $cb->setValue("y");
270  $cb->setChecked($this->object->getSession());
271  $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
272  $this->form->addItem($cb);
273 
274  // storage of interactions
275  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
276  $cb->setValue("y");
277  $cb->setChecked($this->object->getInteractions());
278  $cb->setInfo($this->lng->txt("cont_interactions_info_12"));
279  $this->form->addItem($cb);
280 
281  // objectives
282  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
283  $cb->setValue("y");
284  $cb->setChecked($this->object->getObjectives());
285  $cb->setInfo($this->lng->txt("cont_objectives_info"));
286  $this->form->addItem($cb);
287 
288  // time from lms
289  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
290  $cb->setValue("y");
291  $cb->setChecked($this->object->getTime_from_lms());
292  $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
293  $this->form->addItem($cb);
294 
295  // check values
296  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
297  $cb->setValue("y");
298  $cb->setChecked($this->object->getCheck_values());
299  $cb->setInfo($this->lng->txt("cont_check_values_info"));
300  $this->form->addItem($cb);
301 
302  // auto cmi.core.exit to suspend
303  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
304  $cb->setValue("y");
305  $cb->setChecked($this->object->getAutoSuspend());
306  $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
307  $this->form->addItem($cb);
308 
309  // settings for student_id
310  $options = array(
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")
317  );
318  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_id_setting"), "id_setting");
319  $si->setOptions($options);
320  $si->setValue($this->object->getIdSetting());
321  $si->setInfo($this->lng->txt("cont_sc_id_setting_info"));
322  $this->form->addItem($si);
323 
324  // settings for student_name
325  $options = array(
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")
332  );
333  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_name_setting"), "name_setting");
334  $si->setOptions($options);
335  $si->setValue($this->object->getNameSetting());
336  $si->setInfo($this->lng->txt("cont_sc_name_setting_info"));
337  $this->form->addItem($si);
338 
339  //
340  // debugging
341  //
342  $sh = new ilFormSectionHeaderGUI();
343  $sh->setTitle($this->lng->txt("cont_debugging"));
344  $this->form->addItem($sh);
345 
346  // test tool
347  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
348  $cb->setValue("y");
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"));
353  } else {
354  $cb->setInfo($this->lng->txt("cont_debug_deactivate12"));
355  }
356  $this->form->addItem($cb);
357  $this->form->addCommandButton("saveProperties", $lng->txt("save"));
358 
359  $tpl->setContent($this->form->getHTML());
360  }
361 
365  public function newModuleVersion()
366  {
367  global $DIC;
368  $ilTabs = $DIC['ilTabs'];
370  $ilTabs->setSubTabActive('cont_sc_new_version');
371 
374 
375  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
376  $this->form = new ilPropertyFormGUI();
377  //title
378  $this->form->setTitle($this->lng->txt("import_sahs"));
379 
380  // SCORM-type
381  $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
382  $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
383  $this->form->addItem($ne);
384 
385  $options = array();
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");
392  $options[$file] = $file;
393  }
394  }
395  if (count($options) > 1) {
396  // choose upload directory
397  $radg = new ilRadioGroupInputGUI($this->lng->txt("cont_choose_file_source"), "file_source");
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);
402  $radg->setValue("local");
403 
404  $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
405  $fi->setRequired(true);
406  $op0->addSubItem($fi);
407 
408  $si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), "uploaded_file");
409  $si->setOptions($options);
410  $op1->addSubItem($si);
411 
412  $this->form->addItem($radg);
413  } else {
414  $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
415  $fi->setRequired(true);
416  $this->form->addItem($fi);
417  }
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());
422  }
423 
424 
425  public function getMaxFileSize()
426  {
427  // get the value for the maximal uploadable filesize from the php.ini (if available)
428  $umf = get_cfg_var("upload_max_filesize");
429  // get the value for the maximal post data from the php.ini (if available)
430  $pms = get_cfg_var("post_max_size");
431 
432  //convert from short-string representation to "real" bytes
433  $multiplier_a = array("K" => 1024, "M" => 1024 * 1024, "G" => 1024 * 1024 * 1024);
434 
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);
437 
438  if (count($umf_parts) == 2) {
439  $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
440  }
441  if (count($pms_parts) == 2) {
442  $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
443  }
444 
445  // use the smaller one as limit
446  $max_filesize = min($umf, $pms);
447 
448  if (!$max_filesize) {
449  $max_filesize = max($umf, $pms);
450  }
451 
452  //format for display in mega-bytes
453  return $max_filesize = sprintf("%.1f MB", $max_filesize / 1024 / 1024);
454  }
455 
456 
457  public function newModuleVersionUpload()
458  {
459  global $DIC;
460  $rbacsystem = $DIC['rbacsystem'];
461 
462  $unzip = PATH_TO_UNZIP;
463  $tocheck = "imsmanifest.xml";
464 
465  include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
466 
467  // check create permission before because the uploaded file will be copied
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"]) {
471  // check if file was uploaded
472  $source = $_FILES["scormfile"]["tmp_name"];
473  if (($source == 'none') || (!$source)) {
474  ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"), true);
475  $this->newModuleVersion();
476  return;
477  }
478  } elseif ($_POST["uploaded_file"]) {
479  // check if the file is in the ftp directory and readable
480  if (!ilUploadFiles::_checkUploadFile($_POST["uploaded_file"])) {
481  $this->ilias->raiseError($this->lng->txt("upload_error_file_not_found"), $this->ilias->error_obj->MESSAGE);
482  }
483  // copy the uploaded file to the client web dir to analyze the imsmanifest
484  // the copy will be moved to the lm directory or deleted
485  $source = CLIENT_WEB_DIR . "/" . $_POST["uploaded_file"];
486  ilUploadFiles::_copyUploadFile($_POST["uploaded_file"], $source);
487  $source_is_copy = true;
488  } else {
489  ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"), true);
490  $this->newModuleVersion();
491  return;
492  }
493  // fim.
494 
495  //unzip the imsmanifest-file from new uploaded file
496  $pathinfo = pathinfo($source);
497  $dir = $pathinfo["dirname"];
498  $file = $pathinfo["basename"];
499  $cdir = getcwd();
500  chdir($dir);
501 
502  //we need more flexible unzip here than ILIAS standard classes allow
503  $unzipcmd = $unzip . " -o " . ilUtil::escapeShellArg($source) . " " . $tocheck;
504  exec($unzipcmd);
505  chdir($cdir);
506  $tmp_file = $dir . "/" . $_GET["ref_id"] . "." . $tocheck;
507 
508  ilFileUtils::rename($dir . "/" . $tocheck, $tmp_file);
509  $new_manifest = file_get_contents($tmp_file);
510 
511  //remove temp file
512  unlink($tmp_file);
513 
514  //get old manifest file
515  $old_manifest = file_get_contents($this->object->getDataDirectory() . "/" . $tocheck);
516 
517  //reload fixed version of file
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);
521 
522  //do testing for converted versions as well as earlier ILIAS version messed up utf8 conversion
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) {
525 
526  //get exisiting module version
527  $module_version = $this->object->getModuleVersion() + 1;
528 
529  if ($_FILES["scormfile"]["name"]) {
530  //build targetdir in lm_data
531  $file_path = $this->object->getDataDirectory() . "/" . $_FILES["scormfile"]["name"] . "." . $module_version;
532  $file_path = str_replace(".zip." . $module_version, "." . $module_version . ".zip", $file_path);
533  //move to data directory and add subfix for versioning
534  ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"], $_FILES["scormfile"]["name"], $file_path);
535  } else {
536  //build targetdir in lm_data
537  $file_path = $this->object->getDataDirectory() . "/" . $_POST["uploaded_file"] . "." . $module_version;
538  $file_path = str_replace(".zip." . $module_version, "." . $module_version . ".zip", $file_path);
539  // move the already copied file to the lm_data directory
540  ilFileUtils::rename($source, $file_path);
541  }
542 
543  //unzip and replace old extracted files
544  ilUtil::unzip($file_path, true);
545  ilUtil::renameExecutables($this->object->getDataDirectory()); //(security)
546 
547  //increase module version
548  $this->object->setModuleVersion($module_version);
549  $this->object->update();
550 
551  //redirect to properties and display success
552  ilUtil::sendInfo($this->lng->txt("cont_new_module_added"), true);
553  ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=" . $_GET["ref_id"]);
554  exit;
555  } else {
556  if ($source_is_copy) {
557  unlink($source);
558  }
559 
560  ilUtil::sendInfo($this->lng->txt("cont_invalid_new_module"), true);
561  $this->newModuleVersion();
562  }
563  }
564 
568  public function saveProperties()
569  {
570  $this->object->setTitle($_POST["Fobject_title"]);
571  $this->object->setDescription($_POST["Fobject_description"]);
572 
573  $obj_service = $this->getObjectService();
574  $this->properties();
575  $this->form->checkInput();
576 
577  //check if OfflineMode-Zip has to be created
578  $tmpOfflineMode = ilUtil::yn2tf($_POST["cobj_offline_mode"]);
579  if ($tmpOfflineMode == true) {
580  if ($this->object->getOfflineMode() == false) {
581  $this->object->zipLmForOfflineMode();
582  }
583  }
584  if (isset($_POST["mastery_score"])) {
585  $this->object->setMasteryScore($_POST["mastery_score"]);
586  // $this->object->updateMasteryScoreValues();
587  }
588 
589  $t_height = $this->object->getHeight();
590  if ($_POST["height_0"] != $this->object->getHeight()) {
591  $t_height = $_POST["height_0"];
592  }
593  if ($_POST["height_1"] != $this->object->getHeight()) {
594  $t_height = $_POST["height_1"];
595  }
596 
597  $t_width = $this->object->getWidth();
598  if ($_POST["width_0"] != $this->object->getWidth()) {
599  $t_width = $_POST["width_0"];
600  }
601  if ($_POST["width_1"] != $this->object->getWidth()) {
602  $t_width = $_POST["width_1"];
603  }
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);
609  $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
610  $this->object->setAutoContinue(ilUtil::yn2tf($_POST["auto_continue"]));
611  $this->object->setMaxAttempt($_POST["max_attempt"]);
612  $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
613  $this->object->setCreditMode($_POST["credit_mode"]);
614  $this->object->setAutoReview(ilUtil::yn2tf($_POST["auto_review"]));
615  $this->object->setSession(ilUtil::yn2tf($_POST["cobj_session"]));
616  $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
617  $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
618  $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
619  $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
620  $this->object->setAutoSuspend(ilUtil::yn2tf($_POST["cobj_auto_suspend"]));
621  $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
622  $this->object->setIdSetting($_POST["id_setting"]);
623  $this->object->setNameSetting($_POST["name_setting"]);
624  $this->object->update();
625 
626  // tile image
627  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
628 
629  ilUtil::sendInfo($this->lng->txt("msg_obj_modified"), true);
630  $this->ctrl->redirect($this, "properties");
631  }
632 
636  protected function showTrackingItemsBySco()
637  {
638  global $DIC;
639  $ilTabs = $DIC['ilTabs'];
640 
642  $ilTabs->setTabActive("cont_tracking_data");
643  $ilTabs->setSubTabActive("cont_tracking_bysco");
644 
645  $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');//,'tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers'
646  $scoSelected = "all";
647  if (isset($_GET["scoSelected"])) {
648  $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
649  }
650  if (isset($_POST["scoSelected"])) {
651  $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
652  }
653  $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
654 
655  $report = "choose";
656  if (isset($_GET["report"])) {
657  $report = ilUtil::stripSlashes($_GET["report"]);
658  }
659  if (isset($_POST["report"])) {
660  $report = ilUtil::stripSlashes($_POST["report"]);
661  }
662  $this->ctrl->setParameter($this, 'report', $report);
663 
664  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
665  $filter = new ilSCORMTrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
666  $filter->parse($scoSelected, $report, $reports);
667  if ($report == "choose") {
668  $this->tpl->setContent($filter->form->getHTML());
669  } else {
670  $scosSelected = array();
671  if ($scoSelected != "all") {
672  $scosSelected[] = $scoSelected;
673  } else {
674  $scos = $this->object->getTrackedItems();
675  foreach ($scos as $row) {
676  $scosSelected[] = (int) $row->getId();
677  }
678  }
679  //with check for course ...
680  include_once "Services/Tracking/classes/class.ilTrQuery.php";
681  $a_users = ilTrQuery::getParticipantsForObject($this->ref_id);
682  // var_dump($this->object->getTrackedUsers(""));
683  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
684  $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
685  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
686  }
687  return true;
688  }
689 
690 
696  public function showTrackingItems()
697  {
698  global $DIC;
699  $ilTabs = $DIC['ilTabs'];
700  $ilAccess = $DIC['ilAccess'];
701 
702  $ilTabs->setTabActive('cont_tracking_data');
703 
704  if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
706  $ilTabs->setSubTabActive('cont_tracking_byuser');
707 
708  $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');
709 
710  $userSelected = "all";
711  if (isset($_GET["userSelected"])) {
712  $userSelected = ilUtil::stripSlashes($_GET["userSelected"]);
713  }
714  if (isset($_POST["userSelected"])) {
715  $userSelected = ilUtil::stripSlashes($_POST["userSelected"]);
716  }
717  $this->ctrl->setParameter($this, 'userSelected', $userSelected);
718 
719  $report = "choose";
720  if (isset($_GET["report"])) {
721  $report = ilUtil::stripSlashes($_GET["report"]);
722  }
723  if (isset($_POST["report"])) {
724  $report = ilUtil::stripSlashes($_POST["report"]);
725  }
726  $this->ctrl->setParameter($this, 'report', $report);
727 
728  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
729  $filter = new ilSCORMTrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
730  $filter->parse($userSelected, $report, $reports);
731  if ($report == "choose") {
732  $this->tpl->setContent($filter->form->getHTML());
733  } else {
734  $usersSelected = array();
735  if ($userSelected != "all") {
736  $usersSelected[] = $userSelected;
737  } else {
738  include_once "Services/Tracking/classes/class.ilTrQuery.php";
740  foreach ($users as $user) {
741  if (ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr') {
742  $usersSelected[] = $user;
743  }
744  }
745  }
746  $scosSelected = array();
747  $scos = $this->object->getTrackedItems();
748  foreach ($scos as $row) {
749  $scosSelected[] = (int) $row->getId();
750  }
751 
752  //with check for course ...
753  // include_once "Services/Tracking/classes/class.ilTrQuery.php";
754  // $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
755  // var_dump($this->object->getTrackedUsers(""));
756  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
757  $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
758  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
759  }
760  } elseif ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
761  $this->modifyTrackingItems();
762  }
763  return true;
764  }
765  protected function modifyTrackingItems()
766  {
767  global $DIC;
768  $ilAccess = $DIC['ilAccess'];
769  if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
770  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
771  $privacy = ilPrivacySettings::_getInstance();
772  if (!$privacy->enabledSahsProtocolData()) {
773  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
774  }
775 
776  global $DIC;
777  $ilTabs = $DIC['ilTabs'];
778  $ilToolbar = $DIC['ilToolbar'];
779 
780  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
781  $ilToolbar->addButton(
782  $this->lng->txt('import'),
783  $this->ctrl->getLinkTarget($this, 'importForm')
784  );
785  $ilToolbar->addButton(
786  $this->lng->txt('cont_export_all'),
787  $this->ctrl->getLinkTarget($this, 'exportAll')
788  );
789 
791  $ilTabs->setTabActive('cont_tracking_data');
792  $ilTabs->setSubTabActive('cont_tracking_modify');
793 
794  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
795  $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
796  $tbl->parse();
797  $this->tpl->setContent($tbl->getHTML());
798  }
799  }
800 
801 
805  protected function applyUserTableFilter()
806  {
807  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
808  $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
809  $tbl->writeFilterToSession();
810  $tbl->resetOffset();
811  $this->modifyTrackingItems();
812  }
813 
817  protected function resetUserTableFilter()
818  {
819  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
820  $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
821  $tbl->resetFilter();
822  $tbl->resetOffset();
823  $this->modifyTrackingItems();
824  }
825 
829  public function deleteTrackingForUser()
830  {
831  if (!isset($_POST["user"])) {
832  $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
833  }
834 
835  // display confirmation message
836  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
837  $cgui = new ilConfirmationGUI();
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");
842 
843  foreach ($_POST["user"] as $id) {
844  if (ilObject::_exists($id) && ilObject::_lookUpType($id) == "usr") {
845  $user = new ilObjUser($id);
846 
847  $caption = ilUtil::getImageTagByType("sahs", $this->tpl->tplPath) .
848  " " . $this->lng->txt("cont_tracking_data") .
849  ": " . $user->getLastname() . ", " . $user->getFirstname();
850 
851 
852  $cgui->addItem("user[]", $id, $caption);
853  }
854  }
855 
856  $this->tpl->setContent($cgui->getHTML());
857  }
858 
862  public function cancelDeleteTracking()
863  {
864  ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
865  $this->ctrl->redirect($this, "modifyTrackingItems");
866  }
867 
868  public function confirmedDeleteTracking()
869  {
870  $this->object->deleteTrackingDataOfUsers($_POST["user"]);
871  $this->ctrl->redirect($this, "modifyTrackingItems");
872  }
873 
877  public function cancel()
878  {
879  ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
880  $this->ctrl->redirect($this, "properties");
881  }
882 
886  protected function import()
887  {
888  $form = $this->initImportForm("");
889  if ($form->checkInput()) {
890  $source = $form->getInput('csv');
891  $error = $this->object->importTrackingData($source['tmp_name']);
892  switch ($error) {
893  case 0:
894  ilUtil::sendInfo('Tracking data imported', true);
895  $this->ctrl->redirect($this, "showTrackingItems");
896  break;
897  case -1:
898  ilUtil::sendInfo($this->lng->txt('err_check_input'));
899  $this->importForm();
900  break;
901  }
902  }
903  ilUtil::sendInfo($this->lng->txt('err_check_input'));
904  $form->setValuesByPost();
905  $this->importForm();
906  }
907 
911  protected function importForm()
912  {
913  global $DIC;
914  $ilTabs = $DIC['ilTabs'];
915 
916  $ilTabs->clearTargets();
917  $ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'showTrackingItems'));
918 
919  $form = $this->initImportForm("");
920  $this->tpl->setContent($form->getHTML());
921  }
922 
926  protected function initImportForm($a_new_type)
927  {
928  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
929  $form = new ilPropertyFormGUI();
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'));
934 
935  $csv = new ilFileInputGUI($this->lng->txt('select_file'), 'csv');
936  $csv->setRequired(true);
937  $csv->setSuffixes(array('csv'));
938  $form->addItem($csv);
939 
940  return $form;
941  }
942 
946  protected function exportAll()
947  {
948  $this->object->exportSelected(1);
949  }
950 
954  protected function exportSelectionUsers()
955  {
956  if (!count((array) $_POST['user'])) {
957  //ilUtil::sendFailure($this->lng->txt('select_one'),true);
958  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
959  $this->ctrl->redirect($this, 'modifyTrackingItems');
960  } else {
961  $this->object->exportSelected(0, $_POST["user"]);
962  }
963  }
964 
965 
966  public function decreaseAttempts()
967  {
968  if (!isset($_POST["user"])) {
969  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
970  }
971  $this->object->decreaseAttemptsForUser($_POST["user"]);
972  $this->ctrl->redirect($this, "modifyTrackingItems");
973  }
974 
975 
979  protected function showTrackingItem()
980  {
981  global $DIC;
982  $ilTabs = $DIC['ilTabs'];
983 
984  include_once "./Services/Table/classes/class.ilTableGUI.php";
985 
986  $this->setSubTabs();
987  $ilTabs->setTabActive("cont_tracking_data");
988  $ilTabs->setSubTabActive("cont_tracking_byuser");
989 
990  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
991  $tbl = new ilSCORMTrackingItemsPerUserTableGUI($this->object->getId(), $this, 'showTrackingItem');
992  $tbl->setUserId((int) $_REQUEST['user_id']);
993  $tbl->parse();
994  $this->tpl->setContent($tbl->getHTML());
995  return true;
996  }
997 
1001  protected function showTrackingItemSco()
1002  {
1003  global $DIC;
1004  $ilTabs = $DIC['ilTabs'];
1005 
1006  include_once "./Services/Table/classes/class.ilTableGUI.php";
1007 
1008  $this->setSubTabs();
1009  $ilTabs->setTabActive("cont_tracking_data");
1010  $ilTabs->setSubTabActive("cont_tracking_bysco");
1011 
1012  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
1013  $tbl = new ilSCORMTrackingItemsScoTableGUI($this->object->getId(), $this, 'showTrackingItemSco');
1014  $tbl->setScoId((int) $_GET['obj_id']);
1015  $tbl->parse();
1016  $this->tpl->setContent($tbl->getHTML());
1017  return true;
1018  }
1019 
1023  protected function showTrackingItemPerUser()
1024  {
1025  global $DIC;
1026  $ilTabs = $DIC['ilTabs'];
1027 
1028  include_once "./Services/Table/classes/class.ilTableGUI.php";
1029 
1030  $this->setSubTabs();
1031  $ilTabs->setTabActive("cont_tracking_data");
1032  $ilTabs->setSubTabActive("cont_tracking_byuser");
1033 
1034  $this->ctrl->setParameter($this, 'obj_id', (int) $_REQUEST['obj_id']);
1035  $this->ctrl->setParameter($this, 'user_id', (int) $_REQUEST['user_id']);
1036 
1037  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1038  $tbl = new ilSCORMTrackingItemPerUserTableGUI($this->object->getId(), $this, 'showTrackingItemPerUser');
1039  $tbl->setUserId((int) $_REQUEST['user_id']);
1040  $tbl->setScoId((int) $_REQUEST['obj_id']);
1041  $tbl->parse();
1042  $this->tpl->setContent($tbl->getHTML());
1043  return true;
1044  }
1045 
1046  //setTabs
1047  public function setSubTabs()
1048  {
1049  global $DIC;
1050  $lng = $DIC['lng'];
1051  $ilTabs = $DIC['ilTabs'];
1052  $ilCtrl = $DIC['ilCtrl'];
1053  $ilAccess = $DIC['ilAccess'];
1054 
1055  if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
1056  $ilTabs->addSubTabTarget(
1057  "cont_tracking_byuser",
1058  $this->ctrl->getLinkTarget($this, "showTrackingItems"),
1059  array("edit", ""),
1060  get_class($this)
1061  );
1062 
1063  $ilTabs->addSubTabTarget(
1064  "cont_tracking_bysco",
1065  $this->ctrl->getLinkTarget($this, "showTrackingItemsBySco"),
1066  array("edit", ""),
1067  get_class($this)
1068  );
1069  }
1070  if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
1071  $ilTabs->addSubTabTarget(
1072  "cont_tracking_modify",
1073  $this->ctrl->getLinkTarget($this, "modifyTrackingItems"),
1074  array("edit", ""),
1075  get_class($this)
1076  );
1077  }
1078  }
1079 
1080 
1086  protected function offlineModeManager()
1087  {
1088  global $DIC;
1089  $rbacsystem = $DIC['rbacsystem'];
1090  $tree = $DIC['tree'];
1091  $tpl = $DIC['tpl'];
1092  $lng = $DIC['lng'];
1093  $ilToolbar = $DIC['ilToolbar'];
1094  $ilCtrl = $DIC['ilCtrl'];
1095  $ilSetting = $DIC['ilSetting'];
1096 
1097  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1098  if (!ilLearningProgressAccess::checkAccess($this->object->getRefId()) && !$rbacsystem->checkAccess("edit_permission", "", $this->object->getRefId())) {
1099  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
1100  }
1101 
1102  include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1103  $tbl = new ilSCORMOfflineModeUsersTableGUI($this->object->getId(), $this, 'offlineModeManager');
1104  $tbl->parse();
1105  $this->tpl->setContent($tbl->getHTML());
1106  }
1110  protected function stopUserOfflineMode()
1111  {
1112  if (!count((array) $_POST['user'])) {
1113  ilUtil::sendFailure($this->lng->txt('select_one'), true);
1114  $this->ctrl->redirect($this, 'offlineModeManager');
1115  }
1116  // display confirmation message
1117  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1118  $cgui = new ilConfirmationGUI();
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) {
1124  if (ilObject::_exists($id) && ilObject::_lookUpType($id) == "usr") {
1125  $user = new ilObjUser($id);
1126  $caption = ilUtil::getImageTagByType("sahs_offline", $this->tpl->tplPath) .
1127  " " . $this->lng->txt("stop_user_offline_mode_for_user") .
1128  ": " . $user->getLastname() . ", " . $user->getFirstname();
1129  $cgui->addItem("user[]", $id, $caption);
1130  }
1131  }
1132  $this->tpl->setContent($cgui->getHTML());
1133  }
1134 
1135  public function cancelStopUserOfflineMode()
1136  {
1137  ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
1138  $this->ctrl->redirect($this, "offlineModeManager");
1139  }
1140 
1142  {
1143  include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
1144  foreach ($_POST["user"] as $id) {
1145  ilSCORMOfflineMode::stopOfflineModeForUser($this->object->getId(), $id);
1146  }
1147 
1148  $this->offlineModeManager();
1149  }
1150 }
1151 // END class.ilObjSCORMLearningModule
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)
$files
Definition: metarefresh.php:49
cancelDeleteTracking()
cancel deletion of export files
This class represents a selection list property in a property form.
This class represents a property form user interface.
$type
global $DIC
Definition: saml.php:7
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
$_GET["client_id"]
$tbl
Definition: example_048.php:81
This class represents a section header in a property form.
This class represents a file property in a property form.
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
This class represents a checkbox property in a property form.
static _getUploadDirectory()
Get the directory with uploaded files.
static _getUploadFiles()
Get a list of readable files in the upload directory.
static checkIfAnyoneIsInOfflineMode($obj_id)
stopUserOfflineMode()
Stop offline mode for selected users.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
static _lookupObjectId($a_ref_id)
lookup object id
global $ilCtrl
Definition: ilias.php:18
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.
setChecked($a_checked)
Set Checked.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
deleteTrackingForUser()
display deletion confirmation screen
This class represents a property in a property form.
setValue($a_value)
Set Value.
if(isset($_POST['submit'])) $form
This class represents a number property in a property form.
setValue($a_value)
Set Value.
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
setOptions($a_options)
Set Options.
offlineModeManager()
Manage offline mode for users ilTabs $ilTabs $global ilToolbar $ilToolbar.
$users
Definition: authpage.php:44
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
newModuleVersion()
upload new version of module
$row
exit
Definition: backend.php:16
GUI class ilSCORMOfflineModeUsersTableGUI.
setMaxLength($a_maxlength)
Set Max Length.
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.
global $ilSetting
Definition: privfeed.php:17
static escapeShellArg($a_arg)
This class represents a text area property in a property form.
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.
$source
Definition: linkback.php:22
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.
$_POST["username"]
setRequired($a_required)
Set Required.
__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.