ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
39  protected $ctrl;
40 
46  public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = true)
47  {
48  global $DIC;
49  $this->lng = $DIC['lng'];
50  $this->ctrl = $DIC->ctrl();
51  $this->tpl = $DIC["tpl"];
52 
53  $this->lng->loadLanguageModule("content");
54  $this->lng->loadLanguageModule("search");
55 
56  $this->type = "sahs";
57  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
58  }
59 
63  public function assignObject()
64  {
65  if ($this->id != 0) {
66  if ($this->call_by_reference) {
67  $this->object = new ilObjSCORMLearningModule($this->id, true);
68  } else {
69  $this->object = new ilObjSCORMLearningModule($this->id, false);
70  }
71  }
72  }
73 
77  public function properties()
78  {
79  global $DIC;
80  $ilToolbar = $DIC['ilToolbar'];
81  $ilTabs = $DIC['ilTabs'];
82 
83 // $lng->loadLanguageModule("style");
84 
86  $ilTabs->setSubTabActive('cont_settings');
87 
88  // view
89  $ilToolbar->addButtonInstance($this->object->getViewButton());
90 
91  // lm properties
92  $this->initPropertiesForm();
93  $this->getPropertiesFormValues();
94  $this->tpl->setContent($this->form->getHTML());
95  }
96 
100  public function initPropertiesForm()
101  {
102  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
103  $obj_service = $this->object_service;
104  $this->form = new ilPropertyFormGUI();
105  $this->form->setTitle($this->lng->txt("cont_lm_properties"));
106 
107  //check/select only once
108  $this->object->checkMasteryScoreValues();
109 
110  //title
111  $ti = new ilTextInputGUI($this->lng->txt("title"), "Fobject_title");
112  $ti->setMaxLength(200);
113  $this->form->addItem($ti);
114 
115  //description
116  $ti = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject_description");
117  $this->form->addItem($ti);
118 
119  // SCORM-type
120  $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
121  $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
122  $this->form->addItem($ne);
123 
124  // version
125  $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
126  $ne->setValue($this->object->getModuleVersion());
127  $ne->setInfo($this->lng->txt("cont_sc_version_info"));
128  $this->form->addItem($ne);
129 
130  //
131  // activation
132  //
133  $sh = new ilFormSectionHeaderGUI();
134  $sh->setTitle($this->lng->txt("activation"));
135  $this->form->addItem($sh);
136 
137  // online
138  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
139  $cb->setInfo($this->lng->txt("cont_online_info"));
140  $this->form->addItem($cb);
141 
142  // offline Mode
143  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
144  $cb->setValue("y");
145  include_once("./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
146  if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
147  $cb->setDisabled(true);
148  $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
149  } else {
150  $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
151  }
152  $this->form->addItem($cb);
153 
154  //
155  // presentation
156  //
157  $sh = new ilFormSectionHeaderGUI();
158  $sh->setTitle($this->lng->txt("cont_presentation"));
159  $this->form->addItem($sh);
160 
161  $radg = new ilRadioGroupInputGUI($this->lng->txt("cont_open"), "open_mode");
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);
168 
169  // width
170  $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_0");
171  $ni->setMaxLength(4);
172  $ni->setSize(4);
173  $op1->addSubItem($ni);
174  $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_1");
175  $ni->setMaxLength(4);
176  $ni->setSize(4);
177  $op2->addSubItem($ni);
178  // height
179  $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_0");
180  $ni->setMaxLength(4);
181  $ni->setSize(4);
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->setInfo($this->lng->txt("cont_width_height_info"));
188  $op2->addSubItem($ni);
189 
190  $this->form->addItem($radg);
191 
192  // auto navigation to last visited item
193  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
194  $cb->setValue("y");
195  $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
196  $this->form->addItem($cb);
197 
198  // auto continue
199  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_auto_continue"), "auto_continue");
200  $cb->setValue("y");
201  $cb->setInfo($this->lng->txt("cont_sc_auto_continue_info"));
202  $this->form->addItem($cb);
203 
204  // tile image
205  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
206 
207  //
208  // scorm options
209  //
210  $sh = new ilFormSectionHeaderGUI();
211  $sh->setTitle($this->lng->txt("cont_scorm_options"));
212  $this->form->addItem($sh);
213 
214  // lesson mode
215  $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"),
216  "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
217  $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
218  $si->setOptions($options);
219  $this->form->addItem($si);
220 
221  // credit mode
222  $options = array("credit" => $this->lng->txt("cont_credit_on"),
223  "no_credit" => $this->lng->txt("cont_credit_off"));
224  $si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
225  $si->setOptions($options);
226  $si->setInfo($this->lng->txt("cont_credit_mode_info"));
227  $this->form->addItem($si);
228 
229  // set lesson mode review when completed
230  $options = array(
231  "n" => $this->lng->txt("cont_sc_auto_review_no"),
232 // "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
233 // "p" => $this->lng->txt("cont_sc_auto_review_passed"),
234 // "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
235 // "c" => $this->lng->txt("cont_sc_auto_review_completed"),
236 // "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
237  "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
238  );
239  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
240  $si->setOptions($options);
241  // $si->setInfo($this->lng->txt("cont_sc_auto_review_info_12"));
242  $this->form->addItem($si);
243 
244  // mastery_score
245  if ($this->object->getMasteryScoreValues() != "") {
246  $ni = new ilNumberInputGUI($this->lng->txt("cont_mastery_score_12"), "mastery_score");
247  $ni->setMaxLength(3);
248  $ni->setSize(3);
249  $ni->setInfo($this->lng->txt("cont_mastery_score_12_info") . $this->object->getMasteryScoreValues());
250  $this->form->addItem($ni);
251  }
252 
253  //
254  // rte settings
255  //
256  $sh = new ilFormSectionHeaderGUI();
257  $sh->setTitle($this->lng->txt("cont_rte_settings"));
258  $this->form->addItem($sh);
259 
260  // unlimited session timeout
261  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
262  $cb->setValue("y");
263  $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
264  $this->form->addItem($cb);
265 
266  // storage of interactions
267  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
268  $cb->setValue("y");
269  $cb->setInfo($this->lng->txt("cont_interactions_info_12"));
270  $this->form->addItem($cb);
271 
272  // objectives
273  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
274  $cb->setValue("y");
275  $cb->setInfo($this->lng->txt("cont_objectives_info"));
276  $this->form->addItem($cb);
277 
278  // time from lms
279  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
280  $cb->setValue("y");
281  $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
282  $this->form->addItem($cb);
283 
284  // check values
285  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
286  $cb->setValue("y");
287  $cb->setInfo($this->lng->txt("cont_check_values_info"));
288  $this->form->addItem($cb);
289 
290  // auto cmi.core.exit to suspend
291  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
292  $cb->setValue("y");
293  $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
294  $this->form->addItem($cb);
295 
296  // settings for student_id
297  $options = array(
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")
304  );
305  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_id_setting"), "id_setting");
306  $si->setOptions($options);
307  $si->setInfo($this->lng->txt("cont_sc_id_setting_info"));
308  $this->form->addItem($si);
309 
310  // settings for student_name
311  $options = array(
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")
318  );
319  $si = new ilSelectInputGUI($this->lng->txt("cont_sc_name_setting"), "name_setting");
320  $si->setOptions($options);
321  $si->setInfo($this->lng->txt("cont_sc_name_setting_info"));
322  $this->form->addItem($si);
323 
324  //
325  // debugging
326  //
327  $sh = new ilFormSectionHeaderGUI();
328  $sh->setTitle($this->lng->txt("cont_debugging"));
329  $this->form->addItem($sh);
330 
331  // test tool
332  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
333  $cb->setValue("y");
334  if ($this->object->getDebugActivated() == false) {
335  $cb->setDisabled(true);
336  $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
337  } else {
338  $cb->setInfo($this->lng->txt("cont_debug_deactivate12"));
339  }
340  $this->form->addItem($cb);
341  $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
342  $this->form->setFormAction($this->ctrl->getFormAction($this));
343  }
344 
345 
349  public function getPropertiesFormValues()
350  {
351  $values = array();
352  $values["Fobject_title"] = $this->object->getTitle();
353  $values["Fobject_description"] = $this->object->getLongDescription();
354  if (!$this->object->getOfflineStatus()) {
355  $values["cobj_online"] = true;
356  }
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);
379  }
380 
384  public function newModuleVersion()
385  {
386  global $DIC;
387  $ilTabs = $DIC['ilTabs'];
389  $ilTabs->setSubTabActive('cont_sc_new_version');
390 
393 
394  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
395  $this->form = new ilPropertyFormGUI();
396  //title
397  $this->form->setTitle($this->lng->txt("import_sahs"));
398 
399  // SCORM-type
400  $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
401  $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
402  $this->form->addItem($ne);
403 
404  $options = array();
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;
412  }
413  }
414  if (count($options) > 1) {
415  // choose upload directory
416  $radg = new ilRadioGroupInputGUI($this->lng->txt("cont_choose_file_source"), "file_source");
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");
422 
423  $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
424  $fi->setRequired(true);
425  $op0->addSubItem($fi);
426 
427  $si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), "uploaded_file");
428  $si->setOptions($options);
429  $op1->addSubItem($si);
430 
431  $this->form->addItem($radg);
432  } else {
433  $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
434  $fi->setRequired(true);
435  $this->form->addItem($fi);
436  }
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());
441  }
442 
443 
444  public function getMaxFileSize()
445  {
446  // get the value for the maximal uploadable filesize from the php.ini (if available)
447  $umf = get_cfg_var("upload_max_filesize");
448  // get the value for the maximal post data from the php.ini (if available)
449  $pms = get_cfg_var("post_max_size");
450 
451  //convert from short-string representation to "real" bytes
452  $multiplier_a = array("K" => 1024, "M" => 1024 * 1024, "G" => 1024 * 1024 * 1024);
453 
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);
456 
457  if (count($umf_parts) == 2) {
458  $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
459  }
460  if (count($pms_parts) == 2) {
461  $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
462  }
463 
464  // use the smaller one as limit
465  $max_filesize = min($umf, $pms);
466 
467  if (!$max_filesize) {
468  $max_filesize = max($umf, $pms);
469  }
470 
471  //format for display in mega-bytes
472  return $max_filesize = sprintf("%.1f MB", $max_filesize / 1024 / 1024);
473  }
474 
475 
476  public function newModuleVersionUpload()
477  {
478  global $DIC;
479  $rbacsystem = $DIC['rbacsystem'];
480 
481  $unzip = PATH_TO_UNZIP;
482  $tocheck = "imsmanifest.xml";
483 
484  include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
485 
486  // check create permission before because the uploaded file will be copied
487  if (!$rbacsystem->checkAccess("write", $_GET["ref_id"])) {
488  $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
489  } elseif ($_FILES["scormfile"]["name"]) {
490  // check if file was uploaded
491  $source = $_FILES["scormfile"]["tmp_name"];
492  if (($source == 'none') || (!$source)) {
493  ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"), true);
494  $this->newModuleVersion();
495  return;
496  }
497  } elseif ($_POST["uploaded_file"]) {
498  // check if the file is in the ftp directory and readable
499  if (!ilUploadFiles::_checkUploadFile($_POST["uploaded_file"])) {
500  $this->ilias->raiseError($this->lng->txt("upload_error_file_not_found"), $this->ilias->error_obj->MESSAGE);
501  }
502  // copy the uploaded file to the client web dir to analyze the imsmanifest
503  // the copy will be moved to the lm directory or deleted
504  $source = CLIENT_WEB_DIR . "/" . $_POST["uploaded_file"];
505  ilUploadFiles::_copyUploadFile($_POST["uploaded_file"], $source);
506  $source_is_copy = true;
507  } else {
508  ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"), true);
509  $this->newModuleVersion();
510  return;
511  }
512  // fim.
513 
514  //unzip the imsmanifest-file from new uploaded file
515  $pathinfo = pathinfo($source);
516  $dir = $pathinfo["dirname"];
517  $file = $pathinfo["basename"];
518  $cdir = getcwd();
519  chdir($dir);
520 
521  //we need more flexible unzip here than ILIAS standard classes allow
522  $unzipcmd = $unzip . " -o " . ilUtil::escapeShellArg($source) . " " . $tocheck;
523  exec($unzipcmd);
524  chdir($cdir);
525  $tmp_file = $dir . "/" . $_GET["ref_id"] . "." . $tocheck;
526 
527  ilFileUtils::rename($dir . "/" . $tocheck, $tmp_file);
528  $new_manifest = file_get_contents($tmp_file);
529 
530  //remove temp file
531  unlink($tmp_file);
532 
533  //get old manifest file
534  $old_manifest = file_get_contents($this->object->getDataDirectory() . "/" . $tocheck);
535 
536  //reload fixed version of file
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);
540 
541  //do testing for converted versions as well as earlier ILIAS version messed up utf8 conversion
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) {
544 
545  //get exisiting module version
546  $module_version = $this->object->getModuleVersion() + 1;
547 
548  if ($_FILES["scormfile"]["name"]) {
549  //build targetdir in lm_data
550  $file_path = $this->object->getDataDirectory() . "/" . $_FILES["scormfile"]["name"] . "." . $module_version;
551  $file_path = str_replace(".zip." . $module_version, "." . $module_version . ".zip", $file_path);
552  //move to data directory and add subfix for versioning
553  ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"], $_FILES["scormfile"]["name"], $file_path);
554  } else {
555  //build targetdir in lm_data
556  $file_path = $this->object->getDataDirectory() . "/" . $_POST["uploaded_file"] . "." . $module_version;
557  $file_path = str_replace(".zip." . $module_version, "." . $module_version . ".zip", $file_path);
558  // move the already copied file to the lm_data directory
559  ilFileUtils::rename($source, $file_path);
560  }
561 
562  //unzip and replace old extracted files
563  ilUtil::unzip($file_path, true);
564  ilUtil::renameExecutables($this->object->getDataDirectory()); //(security)
565 
566  //increase module version
567  $this->object->setModuleVersion($module_version);
568  $this->object->update();
569 
570  //redirect to properties and display success
571  ilUtil::sendInfo($this->lng->txt("cont_new_module_added"), true);
572  ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=" . $_GET["ref_id"]);
573  exit;
574  } else {
575  if ($source_is_copy) {
576  unlink($source);
577  }
578 
579  ilUtil::sendInfo($this->lng->txt("cont_invalid_new_module"), true);
580  $this->newModuleVersion();
581  }
582  }
583 
587  public function saveProperties()
588  {
589  $obj_service = $this->object_service;
590  $this->initPropertiesForm();
591  if ($this->form->checkInput()) {
592  $this->object->setTitle($_POST["Fobject_title"]);
593  $this->object->setDescription($_POST["Fobject_description"]);
594 
595  //check if OfflineMode-Zip has to be created
596  $tmpOfflineMode = ilUtil::yn2tf($_POST["cobj_offline_mode"]);
597  if ($tmpOfflineMode == true) {
598  if ($this->object->getOfflineMode() == false) {
599  $this->object->zipLmForOfflineMode();
600  }
601  }
602  if (isset($_POST["mastery_score"])) {
603  $this->object->setMasteryScore($_POST["mastery_score"]);
604  // $this->object->updateMasteryScoreValues();
605  }
606 
607  $t_height = $this->object->getHeight();
608  if ($_POST["height_0"] != $this->object->getHeight()) {
609  $t_height = $_POST["height_0"];
610  }
611  if ($_POST["height_1"] != $this->object->getHeight()) {
612  $t_height = $_POST["height_1"];
613  }
614 
615  $t_width = $this->object->getWidth();
616  if ($_POST["width_0"] != $this->object->getWidth()) {
617  $t_width = $_POST["width_0"];
618  }
619  if ($_POST["width_1"] != $this->object->getWidth()) {
620  $t_width = $_POST["width_1"];
621  }
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);
627  $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
628  $this->object->setAutoContinue(ilUtil::yn2tf($_POST["auto_continue"]));
629  $this->object->setMaxAttempt($_POST["max_attempt"]);
630  $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
631  $this->object->setCreditMode($_POST["credit_mode"]);
632  $this->object->setAutoReview(ilUtil::yn2tf($_POST["auto_review"]));
633  $this->object->setSession(ilUtil::yn2tf($_POST["cobj_session"]));
634  $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
635  $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
636  $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
637  $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
638  $this->object->setAutoSuspend(ilUtil::yn2tf($_POST["cobj_auto_suspend"]));
639  $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
640  $this->object->setIdSetting($_POST["id_setting"]);
641  $this->object->setNameSetting($_POST["name_setting"]);
642  $this->object->update();
643 
644  // tile image
645  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
646  }
647  ilUtil::sendInfo($this->lng->txt("msg_obj_modified"), true);
648  $this->ctrl->redirect($this, "properties");
649  }
650 
654  protected function showTrackingItemsBySco()
655  {
656  global $DIC;
657  $ilTabs = $DIC['ilTabs'];
658 
660  $ilTabs->setTabActive("cont_tracking_data");
661  $ilTabs->setSubTabActive("cont_tracking_bysco");
662 
663  $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');//,'tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers'
664  $scoSelected = "all";
665  if (isset($_GET["scoSelected"])) {
666  $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
667  }
668  if (isset($_POST["scoSelected"])) {
669  $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
670  }
671  $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
672 
673  $report = "choose";
674  if (isset($_GET["report"])) {
675  $report = ilUtil::stripSlashes($_GET["report"]);
676  }
677  if (isset($_POST["report"])) {
678  $report = ilUtil::stripSlashes($_POST["report"]);
679  }
680  $this->ctrl->setParameter($this, 'report', $report);
681 
682  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
683  $filter = new ilSCORMTrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
684  $filter->parse($scoSelected, $report, $reports);
685  if ($report == "choose") {
686  $this->tpl->setContent($filter->form->getHTML());
687  } else {
688  $scosSelected = array();
689  if ($scoSelected != "all") {
690  $scosSelected[] = $scoSelected;
691  } else {
692  $scos = $this->object->getTrackedItems();
693  foreach ($scos as $row) {
694  $scosSelected[] = (int) $row->getId();
695  }
696  }
697  //with check for course ...
698  include_once "Services/Tracking/classes/class.ilTrQuery.php";
699  $a_users = ilTrQuery::getParticipantsForObject($this->ref_id);
700  // var_dump($this->object->getTrackedUsers(""));
701  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
702  $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
703  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
704  }
705  return true;
706  }
707 
708 
714  public function showTrackingItems()
715  {
716  global $DIC;
717  $ilTabs = $DIC['ilTabs'];
718  $ilAccess = $DIC['ilAccess'];
719 
720  $ilTabs->setTabActive('cont_tracking_data');
721 
722  if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
724  $ilTabs->setSubTabActive('cont_tracking_byuser');
725 
726  $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');
727 
728  $userSelected = "all";
729  if (isset($_GET["userSelected"])) {
730  $userSelected = ilUtil::stripSlashes($_GET["userSelected"]);
731  }
732  if (isset($_POST["userSelected"])) {
733  $userSelected = ilUtil::stripSlashes($_POST["userSelected"]);
734  }
735  $this->ctrl->setParameter($this, 'userSelected', $userSelected);
736 
737  $report = "choose";
738  if (isset($_GET["report"])) {
739  $report = ilUtil::stripSlashes($_GET["report"]);
740  }
741  if (isset($_POST["report"])) {
742  $report = ilUtil::stripSlashes($_POST["report"]);
743  }
744  $this->ctrl->setParameter($this, 'report', $report);
745 
746  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
747  $filter = new ilSCORMTrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
748  $filter->parse($userSelected, $report, $reports);
749  if ($report == "choose") {
750  $this->tpl->setContent($filter->form->getHTML());
751  } else {
752  $usersSelected = array();
753  if ($userSelected != "all") {
754  $usersSelected[] = $userSelected;
755  } else {
756  include_once "Services/Tracking/classes/class.ilTrQuery.php";
757  $users = ilTrQuery::getParticipantsForObject($this->ref_id);
758  foreach ($users as $user) {
759  if (ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr') {
760  $usersSelected[] = $user;
761  }
762  }
763  }
764  $scosSelected = array();
765  $scos = $this->object->getTrackedItems();
766  foreach ($scos as $row) {
767  $scosSelected[] = (int) $row->getId();
768  }
769 
770  //with check for course ...
771  // include_once "Services/Tracking/classes/class.ilTrQuery.php";
772  // $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
773  // var_dump($this->object->getTrackedUsers(""));
774  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
775  $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
776  $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
777  }
778  } elseif ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
779  $this->modifyTrackingItems();
780  }
781  return true;
782  }
783  protected function modifyTrackingItems()
784  {
785  global $DIC;
786  $ilAccess = $DIC['ilAccess'];
787  if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
788  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
789  $privacy = ilPrivacySettings::_getInstance();
790  if (!$privacy->enabledSahsProtocolData()) {
791  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
792  }
793 
794  global $DIC;
795  $ilTabs = $DIC['ilTabs'];
796  $ilToolbar = $DIC['ilToolbar'];
797 
798  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
799  $ilToolbar->addButton(
800  $this->lng->txt('import'),
801  $this->ctrl->getLinkTarget($this, 'importForm')
802  );
803  $ilToolbar->addButton(
804  $this->lng->txt('cont_export_all'),
805  $this->ctrl->getLinkTarget($this, 'exportAll')
806  );
807 
809  $ilTabs->setTabActive('cont_tracking_data');
810  $ilTabs->setSubTabActive('cont_tracking_modify');
811 
812  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
813  $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
814  $tbl->parse();
815  $this->tpl->setContent($tbl->getHTML());
816  }
817  }
818 
819 
823  protected function applyUserTableFilter()
824  {
825  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
826  $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
827  $tbl->writeFilterToSession();
828  $tbl->resetOffset();
829  $this->modifyTrackingItems();
830  }
831 
835  protected function resetUserTableFilter()
836  {
837  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
838  $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
839  $tbl->resetFilter();
840  $tbl->resetOffset();
841  $this->modifyTrackingItems();
842  }
843 
847  public function deleteTrackingForUser()
848  {
849  if (!isset($_POST["user"])) {
850  $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
851  }
852 
853  // display confirmation message
854  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
855  $cgui = new ilConfirmationGUI();
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");
860 
861  foreach ($_POST["user"] as $id) {
862  if (ilObject::_exists($id) && ilObject::_lookUpType($id) == "usr") {
863  $user = new ilObjUser($id);
864 
865  $caption = ilUtil::getImageTagByType("sahs", $this->tpl->tplPath) .
866  " " . $this->lng->txt("cont_tracking_data") .
867  ": " . $user->getLastname() . ", " . $user->getFirstname();
868 
869 
870  $cgui->addItem("user[]", $id, $caption);
871  }
872  }
873 
874  $this->tpl->setContent($cgui->getHTML());
875  }
876 
880  public function cancelDeleteTracking()
881  {
882  ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
883  $this->ctrl->redirect($this, "modifyTrackingItems");
884  }
885 
886  public function confirmedDeleteTracking()
887  {
888  $this->object->deleteTrackingDataOfUsers($_POST["user"]);
889  $this->ctrl->redirect($this, "modifyTrackingItems");
890  }
891 
895  public function cancel()
896  {
897  ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
898  $this->ctrl->redirect($this, "properties");
899  }
900 
904  protected function import()
905  {
906  $form = $this->initImportForm("");
907  if ($form->checkInput()) {
908  $source = $form->getInput('csv');
909  $error = $this->object->importTrackingData($source['tmp_name']);
910  switch ($error) {
911  case 0:
912  ilUtil::sendInfo('Tracking data imported', true);
913  $this->ctrl->redirect($this, "showTrackingItems");
914  break;
915  case -1:
916  ilUtil::sendInfo($this->lng->txt('err_check_input'));
917  $this->importForm();
918  break;
919  }
920  }
921  ilUtil::sendInfo($this->lng->txt('err_check_input'));
922  $form->setValuesByPost();
923  $this->importForm();
924  }
925 
929  protected function importForm()
930  {
931  global $DIC;
932  $ilTabs = $DIC['ilTabs'];
933 
934  $ilTabs->clearTargets();
935  $ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'showTrackingItems'));
936 
937  $form = $this->initImportForm("");
938  $this->tpl->setContent($form->getHTML());
939  }
940 
944  protected function initImportForm($a_new_type)
945  {
946  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
947  $form = new ilPropertyFormGUI();
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'));
952 
953  $csv = new ilFileInputGUI($this->lng->txt('select_file'), 'csv');
954  $csv->setRequired(true);
955  $csv->setSuffixes(array('csv'));
956  $form->addItem($csv);
957 
958  return $form;
959  }
960 
964  protected function exportAll()
965  {
966  $this->object->exportSelected(1);
967  }
968 
972  protected function exportSelectionUsers()
973  {
974  if (!count((array) $_POST['user'])) {
975  //ilUtil::sendFailure($this->lng->txt('select_one'),true);
976  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
977  $this->ctrl->redirect($this, 'modifyTrackingItems');
978  } else {
979  $this->object->exportSelected(0, $_POST["user"]);
980  }
981  }
982 
983 
984 
988  protected function showTrackingItem()
989  {
990  global $DIC;
991  $ilTabs = $DIC['ilTabs'];
992 
993  include_once "./Services/Table/classes/class.ilTableGUI.php";
994 
995  $this->setSubTabs();
996  $ilTabs->setTabActive("cont_tracking_data");
997  $ilTabs->setSubTabActive("cont_tracking_byuser");
998 
999  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
1000  $tbl = new ilSCORMTrackingItemsPerUserTableGUI($this->object->getId(), $this, 'showTrackingItem');
1001  $tbl->setUserId((int) $_REQUEST['user_id']);
1002  $tbl->parse();
1003  $this->tpl->setContent($tbl->getHTML());
1004  return true;
1005  }
1006 
1010  protected function showTrackingItemSco()
1011  {
1012  global $DIC;
1013  $ilTabs = $DIC['ilTabs'];
1014 
1015  include_once "./Services/Table/classes/class.ilTableGUI.php";
1016 
1017  $this->setSubTabs();
1018  $ilTabs->setTabActive("cont_tracking_data");
1019  $ilTabs->setSubTabActive("cont_tracking_bysco");
1020 
1021  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
1022  $tbl = new ilSCORMTrackingItemsScoTableGUI($this->object->getId(), $this, 'showTrackingItemSco');
1023  $tbl->setScoId((int) $_GET['obj_id']);
1024  $tbl->parse();
1025  $this->tpl->setContent($tbl->getHTML());
1026  return true;
1027  }
1028 
1032  protected function showTrackingItemPerUser()
1033  {
1034  global $DIC;
1035  $ilTabs = $DIC['ilTabs'];
1036 
1037  include_once "./Services/Table/classes/class.ilTableGUI.php";
1038 
1039  $this->setSubTabs();
1040  $ilTabs->setTabActive("cont_tracking_data");
1041  $ilTabs->setSubTabActive("cont_tracking_byuser");
1042 
1043  $this->ctrl->setParameter($this, 'obj_id', (int) $_REQUEST['obj_id']);
1044  $this->ctrl->setParameter($this, 'user_id', (int) $_REQUEST['user_id']);
1045 
1046  include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1047  $tbl = new ilSCORMTrackingItemPerUserTableGUI($this->object->getId(), $this, 'showTrackingItemPerUser');
1048  $tbl->setUserId((int) $_REQUEST['user_id']);
1049  $tbl->setScoId((int) $_REQUEST['obj_id']);
1050  $tbl->parse();
1051  $this->tpl->setContent($tbl->getHTML());
1052  return true;
1053  }
1054 
1055  //setTabs
1056  public function setSubTabs()
1057  {
1058  global $DIC;
1059  $lng = $DIC['lng'];
1060  $ilTabs = $DIC['ilTabs'];
1061  $ilCtrl = $DIC['ilCtrl'];
1062  $ilAccess = $DIC['ilAccess'];
1063 
1064  if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
1065  $ilTabs->addSubTabTarget(
1066  "cont_tracking_byuser",
1067  $this->ctrl->getLinkTarget($this, "showTrackingItems"),
1068  array("edit", ""),
1069  get_class($this)
1070  );
1071 
1072  $ilTabs->addSubTabTarget(
1073  "cont_tracking_bysco",
1074  $this->ctrl->getLinkTarget($this, "showTrackingItemsBySco"),
1075  array("edit", ""),
1076  get_class($this)
1077  );
1078  }
1079  if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
1080  $ilTabs->addSubTabTarget(
1081  "cont_tracking_modify",
1082  $this->ctrl->getLinkTarget($this, "modifyTrackingItems"),
1083  array("edit", ""),
1084  get_class($this)
1085  );
1086  }
1087  }
1088 
1089 
1095  protected function offlineModeManager()
1096  {
1097  global $DIC;
1098  $rbacsystem = $DIC['rbacsystem'];
1099  $tree = $DIC['tree'];
1100  $tpl = $DIC['tpl'];
1101  $lng = $DIC['lng'];
1102  $ilToolbar = $DIC['ilToolbar'];
1103  $ilCtrl = $DIC['ilCtrl'];
1104  $ilSetting = $DIC['ilSetting'];
1105 
1106  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1107  if (!ilLearningProgressAccess::checkAccess($this->object->getRefId()) && !$rbacsystem->checkAccess("edit_permission", "", $this->object->getRefId())) {
1108  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
1109  }
1110 
1111  include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1112  $tbl = new ilSCORMOfflineModeUsersTableGUI($this->object->getId(), $this, 'offlineModeManager');
1113  $tbl->parse();
1114  $this->tpl->setContent($tbl->getHTML());
1115  }
1119  protected function stopUserOfflineMode()
1120  {
1121  if (!count((array) $_POST['user'])) {
1122  ilUtil::sendFailure($this->lng->txt('select_one'), true);
1123  $this->ctrl->redirect($this, 'offlineModeManager');
1124  }
1125  // display confirmation message
1126  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1127  $cgui = new ilConfirmationGUI();
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) {
1133  if (ilObject::_exists($id) && ilObject::_lookUpType($id) == "usr") {
1134  $user = new ilObjUser($id);
1135  $caption = ilUtil::getImageTagByType("sahs_offline", $this->tpl->tplPath) .
1136  " " . $this->lng->txt("stop_user_offline_mode_for_user") .
1137  ": " . $user->getLastname() . ", " . $user->getFirstname();
1138  $cgui->addItem("user[]", $id, $caption);
1139  }
1140  }
1141  $this->tpl->setContent($cgui->getHTML());
1142  }
1143 
1144  public function cancelStopUserOfflineMode()
1145  {
1146  ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
1147  $this->ctrl->redirect($this, "offlineModeManager");
1148  }
1149 
1151  {
1152  include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
1153  foreach ($_POST["user"] as $id) {
1154  ilSCORMOfflineMode::stopOfflineModeForUser($this->object->getId(), $id);
1155  }
1156 
1157  $this->offlineModeManager();
1158  }
1159 }
1160 // 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.
exit
Definition: login.php:29
static stopOfflineModeForUser($obj_id, $user_id)
cancelDeleteTracking()
cancel deletion of export files
This class represents a property form user interface.
$type
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
$_GET["client_id"]
This class represents a section header in a property form.
This class represents a file property in a property form.
getPropertiesFormValues()
Get values for properties 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
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
exportSelectionUsers()
Export selection for selected users.
static rename($a_source, $a_target)
Rename a file.
setInfo($a_info)
Set Information Text.
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
This class represents a property in a property form.
setValue($a_value)
Set Value.
This class represents a number property in a property form.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
setValue($a_value)
Set Value.
showTrackingItemSco()
show tracking data of item
global $DIC
Definition: goto.php:24
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
redirection script todo: (a better solution should control the processing via a xml file) ...
const CLIENT_WEB_DIR
Definition: constants.php:45
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
writeFilterToSession()
Write filter values to session.
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)
__construct(Container $dic, ilPlugin $plugin)
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.
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)
$source
Definition: metadata.php:76
Class ilObjSCORMLearningModule.
$_POST["username"]
resetFilter()
Reset filter.
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.