ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
5require_once "./Services/Object/classes/class.ilObjectGUI.php";
6require_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
7require_once("Services/User/classes/class.ilObjUser.php");
8
9require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
10require_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();
94 $this->tpl->setContent($this->form->getHTML());
95
96 }
97
101 public function initPropertiesForm()
102 {
103 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
104 $obj_service = $this->object_service;
105 $this->form = new ilPropertyFormGUI();
106 $this->form->setTitle($this->lng->txt("cont_lm_properties"));
107
108 //check/select only once
109 $this->object->checkMasteryScoreValues();
110
111 //title
112 $ti = new ilTextInputGUI($this->lng->txt("title"), "Fobject_title");
113 $ti->setMaxLength(200);
114 $this->form->addItem($ti);
115
116 //description
117 $ti = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject_description");
118 $this->form->addItem($ti);
119
120 // SCORM-type
121 $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
122 $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
123 $this->form->addItem($ne);
124
125 // version
126 $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
127 $ne->setValue($this->object->getModuleVersion());
128 $ne->setInfo($this->lng->txt("cont_sc_version_info"));
129 $this->form->addItem($ne);
130
131 //
132 // activation
133 //
134 $sh = new ilFormSectionHeaderGUI();
135 $sh->setTitle($this->lng->txt("activation"));
136 $this->form->addItem($sh);
137
138 // online
139 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
140 $cb->setInfo($this->lng->txt("cont_online_info"));
141 $this->form->addItem($cb);
142
143 // offline Mode
144 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
145 $cb->setValue("y");
146 include_once("./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php");
147 if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
148 $cb->setDisabled(true);
149 $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
150 } else {
151 $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
152 }
153 $this->form->addItem($cb);
154
155 //
156 // presentation
157 //
158 $sh = new ilFormSectionHeaderGUI();
159 $sh->setTitle($this->lng->txt("cont_presentation"));
160 $this->form->addItem($sh);
161
162 $radg = new ilRadioGroupInputGUI($this->lng->txt("cont_open"), "open_mode");
163 $op0 = new ilRadioOption($this->lng->txt("cont_open_normal"), "0");
164 $radg->addOption($op0);
165 $op1 = new ilRadioOption($this->lng->txt("cont_open_iframe"), "1");
166 $radg->addOption($op1);
167 $op2 = new ilRadioOption($this->lng->txt("cont_open_window"), "5");
168 $radg->addOption($op2);
169
170 // width
171 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_0");
172 $ni->setMaxLength(4);
173 $ni->setSize(4);
174 $op1->addSubItem($ni);
175 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_1");
176 $ni->setMaxLength(4);
177 $ni->setSize(4);
178 $op2->addSubItem($ni);
179 // height
180 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_0");
181 $ni->setMaxLength(4);
182 $ni->setSize(4);
183 $ni->setInfo($this->lng->txt("cont_width_height_info"));
184 $op1->addSubItem($ni);
185 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_1");
186 $ni->setMaxLength(4);
187 $ni->setSize(4);
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->setInfo($this->lng->txt("cont_auto_last_visited_info"));
197 $this->form->addItem($cb);
198
199 // auto continue
200 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_auto_continue"), "auto_continue");
201 $cb->setValue("y");
202 $cb->setInfo($this->lng->txt("cont_sc_auto_continue_info"));
203 $this->form->addItem($cb);
204
205 // tile image
206 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
207
208 //
209 // scorm options
210 //
211 $sh = new ilFormSectionHeaderGUI();
212 $sh->setTitle($this->lng->txt("cont_scorm_options"));
213 $this->form->addItem($sh);
214
215 // lesson mode
216 $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"),
217 "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
218 $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
219 $si->setOptions($options);
220 $this->form->addItem($si);
221
222 // credit mode
223 $options = array("credit" => $this->lng->txt("cont_credit_on"),
224 "no_credit" => $this->lng->txt("cont_credit_off"));
225 $si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
226 $si->setOptions($options);
227 $si->setInfo($this->lng->txt("cont_credit_mode_info"));
228 $this->form->addItem($si);
229
230 // set lesson mode review when completed
231 $options = array(
232 "n" => $this->lng->txt("cont_sc_auto_review_no"),
233// "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
234// "p" => $this->lng->txt("cont_sc_auto_review_passed"),
235// "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
236// "c" => $this->lng->txt("cont_sc_auto_review_completed"),
237// "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
238 "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
239 );
240 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
241 $si->setOptions($options);
242 // $si->setInfo($this->lng->txt("cont_sc_auto_review_info_12"));
243 $this->form->addItem($si);
244
245 // mastery_score
246 if ($this->object->getMasteryScoreValues() != "") {
247 $ni = new ilNumberInputGUI($this->lng->txt("cont_mastery_score_12"), "mastery_score");
248 $ni->setMaxLength(3);
249 $ni->setSize(3);
250 $ni->setInfo($this->lng->txt("cont_mastery_score_12_info") . $this->object->getMasteryScoreValues());
251 $this->form->addItem($ni);
252 }
253
254 //
255 // rte settings
256 //
257 $sh = new ilFormSectionHeaderGUI();
258 $sh->setTitle($this->lng->txt("cont_rte_settings"));
259 $this->form->addItem($sh);
260
261 // unlimited session timeout
262 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
263 $cb->setValue("y");
264 $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
265 $this->form->addItem($cb);
266
267 // storage of interactions
268 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
269 $cb->setValue("y");
270 $cb->setInfo($this->lng->txt("cont_interactions_info_12"));
271 $this->form->addItem($cb);
272
273 // objectives
274 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
275 $cb->setValue("y");
276 $cb->setInfo($this->lng->txt("cont_objectives_info"));
277 $this->form->addItem($cb);
278
279 // time from lms
280 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
281 $cb->setValue("y");
282 $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
283 $this->form->addItem($cb);
284
285 // check values
286 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
287 $cb->setValue("y");
288 $cb->setInfo($this->lng->txt("cont_check_values_info"));
289 $this->form->addItem($cb);
290
291 // auto cmi.core.exit to suspend
292 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
293 $cb->setValue("y");
294 $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
295 $this->form->addItem($cb);
296
297 // settings for student_id
298 $options = array(
299 0 => $this->lng->txt("cont_sc_id_setting_user_id"),
300 1 => $this->lng->txt("cont_sc_id_setting_user_login"),
301 2 => $this->lng->txt("cont_sc_id_setting_user_id_plus_ref_id"),
302 3 => $this->lng->txt("cont_sc_id_setting_user_login_plus_ref_id"),
303 4 => $this->lng->txt("cont_sc_id_setting_user_id_plus_obj_id"),
304 5 => $this->lng->txt("cont_sc_id_setting_user_login_plus_obj_id")
305 );
306 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_id_setting"), "id_setting");
307 $si->setOptions($options);
308 $si->setInfo($this->lng->txt("cont_sc_id_setting_info"));
309 $this->form->addItem($si);
310
311 // settings for student_name
312 $options = array(
313 0 => $this->lng->txt("cont_sc_name_setting_last_firstname"),
314 1 => $this->lng->txt("cont_sc_name_setting_first_lastname"),
315 2 => $this->lng->txt("cont_sc_name_setting_fullname"),
316 3 => $this->lng->txt("cont_sc_name_setting_salutation_lastname"),
317 4 => $this->lng->txt("cont_sc_name_setting_first_name"),
318 9 => $this->lng->txt("cont_sc_name_setting_no_name")
319 );
320 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_name_setting"), "name_setting");
321 $si->setOptions($options);
322 $si->setInfo($this->lng->txt("cont_sc_name_setting_info"));
323 $this->form->addItem($si);
324
325 //
326 // debugging
327 //
328 $sh = new ilFormSectionHeaderGUI();
329 $sh->setTitle($this->lng->txt("cont_debugging"));
330 $this->form->addItem($sh);
331
332 // test tool
333 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
334 $cb->setValue("y");
335 if ($this->object->getDebugActivated() == false) {
336 $cb->setDisabled(true);
337 $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
338 } else {
339 $cb->setInfo($this->lng->txt("cont_debug_deactivate12"));
340 }
341 $this->form->addItem($cb);
342 $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
343 $this->form->setFormAction($this->ctrl->getFormAction($this));
344
345
346 }
347
348
352 public function getPropertiesFormValues()
353 {
354 $values = array();
355 $values["Fobject_title"] = $this->object->getTitle();
356 $values["Fobject_description"] = $this->object->getDescription();
357 if (!$this->object->getOfflineStatus()) {
358 $values["cobj_online"] = true;
359 }
360 $values["cobj_offline_mode"] = $this->object->getOfflineMode();
361 $values["open_mode"] = $this->object->getOpenMode();
362 $values["width_0"] = $this->object->getWidth();
363 $values["width_1"] = $this->object->getWidth();
364 $values["height_0"] = $this->object->getHeight();
365 $values["height_1"] = $this->object->getHeight();
366 $values["cobj_auto_last_visited"] = $this->object->getAuto_last_visited();
367 $values["auto_continue"] = $this->object->getAutoContinue();
368 $values["lesson_mode"] = $this->object->getDefaultLessonMode();
369 $values["credit_mode"] = $this->object->getCreditMode();
370 $values["auto_review"] = $this->object->getAutoReviewChar();
371 $values["mastery_score"] = $this->object->getMasteryScore();
372 $values["cobj_session"] = $this->object->getSession();
373 $values["cobj_interactions"] = $this->object->getInteractions();
374 $values["cobj_objectives"] = $this->object->getObjectives();
375 $values["cobj_time_from_lms"] = $this->object->getTime_from_lms();
376 $values["cobj_check_values"] = $this->object->getCheck_values();
377 $values["cobj_auto_suspend"] = $this->object->getAutoSuspend();
378 $values["id_setting"] = $this->object->getIdSetting();
379 $values["name_setting"] = $this->object->getNameSetting();
380 $values["cobj_debug"] = $this->object->getDebug();
381 $this->form->setValuesByArray($values);
382 }
383
387 public function newModuleVersion()
388 {
389 global $DIC;
390 $ilTabs = $DIC['ilTabs'];
392 $ilTabs->setSubTabActive('cont_sc_new_version');
393
396
397 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
398 $this->form = new ilPropertyFormGUI();
399 //title
400 $this->form->setTitle($this->lng->txt("import_sahs"));
401
402 // SCORM-type
403 $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
404 $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
405 $this->form->addItem($ne);
406
407 $options = array();
408 include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
410 $options[""] = $this->lng->txt("cont_select_from_upload_dir");
412 foreach ($files as $file) {
413 $file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
414 $options[$file] = $file;
415 }
416 }
417 if (count($options) > 1) {
418 // choose upload directory
419 $radg = new ilRadioGroupInputGUI($this->lng->txt("cont_choose_file_source"), "file_source");
420 $op0 = new ilRadioOption($this->lng->txt("cont_choose_local"), "local");
421 $radg->addOption($op0);
422 $op1 = new ilRadioOption($this->lng->txt("cont_choose_upload_dir"), "upload_dir");
423 $radg->addOption($op1);
424 $radg->setValue("local");
425
426 $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
427 $fi->setRequired(true);
428 $op0->addSubItem($fi);
429
430 $si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), "uploaded_file");
431 $si->setOptions($options);
432 $op1->addSubItem($si);
433
434 $this->form->addItem($radg);
435 } else {
436 $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
437 $fi->setRequired(true);
438 $this->form->addItem($fi);
439 }
440 $this->form->addCommandButton("newModuleVersionUpload", $this->lng->txt("upload"));
441 $this->form->addCommandButton("cancel", $this->lng->txt("cancel"));
442 $this->form->setFormAction($DIC['ilCtrl']->getFormAction($this, "newModuleVersionUpload"));
443 $DIC['tpl']->setContent($this->form->getHTML());
444 }
445
446
447 public function getMaxFileSize()
448 {
449 // get the value for the maximal uploadable filesize from the php.ini (if available)
450 $umf = get_cfg_var("upload_max_filesize");
451 // get the value for the maximal post data from the php.ini (if available)
452 $pms = get_cfg_var("post_max_size");
453
454 //convert from short-string representation to "real" bytes
455 $multiplier_a = array("K" => 1024, "M" => 1024 * 1024, "G" => 1024 * 1024 * 1024);
456
457 $umf_parts = preg_split("/(\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
458 $pms_parts = preg_split("/(\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
459
460 if (count($umf_parts) == 2) {
461 $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
462 }
463 if (count($pms_parts) == 2) {
464 $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
465 }
466
467 // use the smaller one as limit
468 $max_filesize = min($umf, $pms);
469
470 if (!$max_filesize) {
471 $max_filesize = max($umf, $pms);
472 }
473
474 //format for display in mega-bytes
475 return $max_filesize = sprintf("%.1f MB", $max_filesize / 1024 / 1024);
476 }
477
478
479 public function newModuleVersionUpload()
480 {
481 global $DIC;
482 $rbacsystem = $DIC['rbacsystem'];
483
484 $unzip = PATH_TO_UNZIP;
485 $tocheck = "imsmanifest.xml";
486
487 include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
488
489 // check create permission before because the uploaded file will be copied
490 if (!$rbacsystem->checkAccess("write", $_GET["ref_id"])) {
491 $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
492 } elseif ($_FILES["scormfile"]["name"]) {
493 // check if file was uploaded
494 $source = $_FILES["scormfile"]["tmp_name"];
495 if (($source == 'none') || (!$source)) {
496 ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"), true);
497 $this->newModuleVersion();
498 return;
499 }
500 } elseif ($_POST["uploaded_file"]) {
501 // check if the file is in the ftp directory and readable
502 if (!ilUploadFiles::_checkUploadFile($_POST["uploaded_file"])) {
503 $this->ilias->raiseError($this->lng->txt("upload_error_file_not_found"), $this->ilias->error_obj->MESSAGE);
504 }
505 // copy the uploaded file to the client web dir to analyze the imsmanifest
506 // the copy will be moved to the lm directory or deleted
507 $source = CLIENT_WEB_DIR . "/" . $_POST["uploaded_file"];
509 $source_is_copy = true;
510 } else {
511 ilUtil::sendInfo($this->lng->txt("upload_error_file_not_found"), true);
512 $this->newModuleVersion();
513 return;
514 }
515 // fim.
516
517 //unzip the imsmanifest-file from new uploaded file
518 $pathinfo = pathinfo($source);
519 $dir = $pathinfo["dirname"];
520 $file = $pathinfo["basename"];
521 $cdir = getcwd();
522 chdir($dir);
523
524 //we need more flexible unzip here than ILIAS standard classes allow
525 $unzipcmd = $unzip . " -o " . ilUtil::escapeShellArg($source) . " " . $tocheck;
526 exec($unzipcmd);
527 chdir($cdir);
528 $tmp_file = $dir . "/" . $_GET["ref_id"] . "." . $tocheck;
529
530 ilFileUtils::rename($dir . "/" . $tocheck, $tmp_file);
531 $new_manifest = file_get_contents($tmp_file);
532
533 //remove temp file
534 unlink($tmp_file);
535
536 //get old manifest file
537 $old_manifest = file_get_contents($this->object->getDataDirectory() . "/" . $tocheck);
538
539 //reload fixed version of file
540 $check = '/xmlns="http:\/\/www.imsglobal.org\/xsd\/imscp_v1p1"/';
541 $replace = "xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1p2\"";
542 $reload_manifest = preg_replace($check, $replace, $new_manifest);
543
544 //do testing for converted versions as well as earlier ILIAS version messed up utf8 conversion
545 if (strcmp($new_manifest, $old_manifest) == 0 || strcmp(utf8_encode($new_manifest), $old_manifest) == 0 ||
546 strcmp($reload_manifest, $old_manifest) == 0 || strcmp(utf8_encode($reload_manifest), $old_manifest) == 0) {
547
548 //get exisiting module version
549 $module_version = $this->object->getModuleVersion() + 1;
550
551 if ($_FILES["scormfile"]["name"]) {
552 //build targetdir in lm_data
553 $file_path = $this->object->getDataDirectory() . "/" . $_FILES["scormfile"]["name"] . "." . $module_version;
554 $file_path = str_replace(".zip." . $module_version, "." . $module_version . ".zip", $file_path);
555 //move to data directory and add subfix for versioning
556 ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"], $_FILES["scormfile"]["name"], $file_path);
557 } else {
558 //build targetdir in lm_data
559 $file_path = $this->object->getDataDirectory() . "/" . $_POST["uploaded_file"] . "." . $module_version;
560 $file_path = str_replace(".zip." . $module_version, "." . $module_version . ".zip", $file_path);
561 // move the already copied file to the lm_data directory
562 ilFileUtils::rename($source, $file_path);
563 }
564
565 //unzip and replace old extracted files
566 ilUtil::unzip($file_path, true);
567 ilUtil::renameExecutables($this->object->getDataDirectory()); //(security)
568
569 //increase module version
570 $this->object->setModuleVersion($module_version);
571 $this->object->update();
572
573 //redirect to properties and display success
574 ilUtil::sendInfo($this->lng->txt("cont_new_module_added"), true);
575 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=" . $_GET["ref_id"]);
576 exit;
577 } else {
578 if ($source_is_copy) {
579 unlink($source);
580 }
581
582 ilUtil::sendInfo($this->lng->txt("cont_invalid_new_module"), true);
583 $this->newModuleVersion();
584 }
585 }
586
590 public function saveProperties()
591 {
592 $obj_service = $this->object_service;
593 $this->initPropertiesForm();
594 if ($this->form->checkInput()) {
595
596 $this->object->setTitle($_POST["Fobject_title"]);
597 $this->object->setDescription($_POST["Fobject_description"]);
598
599 //check if OfflineMode-Zip has to be created
600 $tmpOfflineMode = ilUtil::yn2tf($_POST["cobj_offline_mode"]);
601 if ($tmpOfflineMode == true) {
602 if ($this->object->getOfflineMode() == false) {
603 $this->object->zipLmForOfflineMode();
604 }
605 }
606 if (isset($_POST["mastery_score"])) {
607 $this->object->setMasteryScore($_POST["mastery_score"]);
608 // $this->object->updateMasteryScoreValues();
609 }
610
611 $t_height = $this->object->getHeight();
612 if ($_POST["height_0"] != $this->object->getHeight()) {
613 $t_height = $_POST["height_0"];
614 }
615 if ($_POST["height_1"] != $this->object->getHeight()) {
616 $t_height = $_POST["height_1"];
617 }
618
619 $t_width = $this->object->getWidth();
620 if ($_POST["width_0"] != $this->object->getWidth()) {
621 $t_width = $_POST["width_0"];
622 }
623 if ($_POST["width_1"] != $this->object->getWidth()) {
624 $t_width = $_POST["width_1"];
625 }
626 $this->object->setOfflineStatus(!($_POST['cobj_online']));
627 $this->object->setOfflineMode($tmpOfflineMode);
628 $this->object->setOpenMode($_POST["open_mode"]);
629 $this->object->setWidth($t_width);
630 $this->object->setHeight($t_height);
631 $this->object->setAuto_last_visited(ilUtil::yn2tf($_POST["cobj_auto_last_visited"]));
632 $this->object->setAutoContinue(ilUtil::yn2tf($_POST["auto_continue"]));
633 $this->object->setMaxAttempt($_POST["max_attempt"]);
634 $this->object->setDefaultLessonMode($_POST["lesson_mode"]);
635 $this->object->setCreditMode($_POST["credit_mode"]);
636 $this->object->setAutoReview(ilUtil::yn2tf($_POST["auto_review"]));
637 $this->object->setSession(ilUtil::yn2tf($_POST["cobj_session"]));
638 $this->object->setInteractions(ilUtil::yn2tf($_POST["cobj_interactions"]));
639 $this->object->setObjectives(ilUtil::yn2tf($_POST["cobj_objectives"]));
640 $this->object->setTime_from_lms(ilUtil::yn2tf($_POST["cobj_time_from_lms"]));
641 $this->object->setCheck_values(ilUtil::yn2tf($_POST["cobj_check_values"]));
642 $this->object->setAutoSuspend(ilUtil::yn2tf($_POST["cobj_auto_suspend"]));
643 $this->object->setDebug(ilUtil::yn2tf($_POST["cobj_debug"]));
644 $this->object->setIdSetting($_POST["id_setting"]);
645 $this->object->setNameSetting($_POST["name_setting"]);
646 $this->object->update();
647
648 // tile image
649 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
650 }
651 ilUtil::sendInfo($this->lng->txt("msg_obj_modified"), true);
652 $this->ctrl->redirect($this, "properties");
653 }
654
658 protected function showTrackingItemsBySco()
659 {
660 global $DIC;
661 $ilTabs = $DIC['ilTabs'];
662
664 $ilTabs->setTabActive("cont_tracking_data");
665 $ilTabs->setSubTabActive("cont_tracking_bysco");
666
667 $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');//,'tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers'
668 $scoSelected = "all";
669 if (isset($_GET["scoSelected"])) {
670 $scoSelected = ilUtil::stripSlashes($_GET["scoSelected"]);
671 }
672 if (isset($_POST["scoSelected"])) {
673 $scoSelected = ilUtil::stripSlashes($_POST["scoSelected"]);
674 }
675 $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
676
677 $report = "choose";
678 if (isset($_GET["report"])) {
679 $report = ilUtil::stripSlashes($_GET["report"]);
680 }
681 if (isset($_POST["report"])) {
682 $report = ilUtil::stripSlashes($_POST["report"]);
683 }
684 $this->ctrl->setParameter($this, 'report', $report);
685
686 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerScoFilterGUI.php';
687 $filter = new ilSCORMTrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
688 $filter->parse($scoSelected, $report, $reports);
689 if ($report == "choose") {
690 $this->tpl->setContent($filter->form->getHTML());
691 } else {
692 $scosSelected = array();
693 if ($scoSelected != "all") {
694 $scosSelected[] = $scoSelected;
695 } else {
696 $scos = $this->object->getTrackedItems();
697 foreach ($scos as $row) {
698 $scosSelected[] = (int) $row->getId();
699 }
700 }
701 //with check for course ...
702 include_once "Services/Tracking/classes/class.ilTrQuery.php";
703 $a_users = ilTrQuery::getParticipantsForObject($this->ref_id);
704 // var_dump($this->object->getTrackedUsers(""));
705 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
706 $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
707 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
708 }
709 return true;
710 }
711
712
718 public function showTrackingItems()
719 {
720 global $DIC;
721 $ilTabs = $DIC['ilTabs'];
722 $ilAccess = $DIC['ilAccess'];
723
724 $ilTabs->setTabActive('cont_tracking_data');
725
726 if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
728 $ilTabs->setSubTabActive('cont_tracking_byuser');
729
730 $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportSelectedRaw');
731
732 $userSelected = "all";
733 if (isset($_GET["userSelected"])) {
734 $userSelected = ilUtil::stripSlashes($_GET["userSelected"]);
735 }
736 if (isset($_POST["userSelected"])) {
737 $userSelected = ilUtil::stripSlashes($_POST["userSelected"]);
738 }
739 $this->ctrl->setParameter($this, 'userSelected', $userSelected);
740
741 $report = "choose";
742 if (isset($_GET["report"])) {
743 $report = ilUtil::stripSlashes($_GET["report"]);
744 }
745 if (isset($_POST["report"])) {
746 $report = ilUtil::stripSlashes($_POST["report"]);
747 }
748 $this->ctrl->setParameter($this, 'report', $report);
749
750 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserFilterGUI.php';
751 $filter = new ilSCORMTrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
752 $filter->parse($userSelected, $report, $reports);
753 if ($report == "choose") {
754 $this->tpl->setContent($filter->form->getHTML());
755 } else {
756 $usersSelected = array();
757 if ($userSelected != "all") {
758 $usersSelected[] = $userSelected;
759 } else {
760 include_once "Services/Tracking/classes/class.ilTrQuery.php";
761 $users = ilTrQuery::getParticipantsForObject($this->ref_id);
762 foreach ($users as $user) {
763 if (ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr') {
764 $usersSelected[] = $user;
765 }
766 }
767 }
768 $scosSelected = array();
769 $scos = $this->object->getTrackedItems();
770 foreach ($scos as $row) {
771 $scosSelected[] = (int) $row->getId();
772 }
773
774 //with check for course ...
775 // include_once "Services/Tracking/classes/class.ilTrQuery.php";
776 // $a_users=ilTrQuery::getParticipantsForObject($this->ref_id);
777 // var_dump($this->object->getTrackedUsers(""));
778 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsTableGUI.php';
779 $tbl = new ilSCORMTrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
780 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
781 }
782 } elseif ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
783 $this->modifyTrackingItems();
784 }
785 return true;
786 }
787 protected function modifyTrackingItems()
788 {
789 global $DIC;
790 $ilAccess = $DIC['ilAccess'];
791 if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
792 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
794 if (!$privacy->enabledSahsProtocolData()) {
795 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
796 }
797
798 global $DIC;
799 $ilTabs = $DIC['ilTabs'];
800 $ilToolbar = $DIC['ilToolbar'];
801
802 include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
803 $ilToolbar->addButton(
804 $this->lng->txt('import'),
805 $this->ctrl->getLinkTarget($this, 'importForm')
806 );
807 $ilToolbar->addButton(
808 $this->lng->txt('cont_export_all'),
809 $this->ctrl->getLinkTarget($this, 'exportAll')
810 );
811
813 $ilTabs->setTabActive('cont_tracking_data');
814 $ilTabs->setSubTabActive('cont_tracking_modify');
815
816 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
817 $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
818 $tbl->parse();
819 $this->tpl->setContent($tbl->getHTML());
820 }
821 }
822
823
827 protected function applyUserTableFilter()
828 {
829 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
830 $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
831 $tbl->writeFilterToSession();
832 $tbl->resetOffset();
833 $this->modifyTrackingItems();
834 }
835
839 protected function resetUserTableFilter()
840 {
841 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingUsersTableGUI.php';
842 $tbl = new ilSCORMTrackingUsersTableGUI($this->object->getId(), $this, 'modifytrackingItems');
843 $tbl->resetFilter();
844 $tbl->resetOffset();
845 $this->modifyTrackingItems();
846 }
847
851 public function deleteTrackingForUser()
852 {
853 if (!isset($_POST["user"])) {
854 $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
855 }
856
857 // display confirmation message
858 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
859 $cgui = new ilConfirmationGUI();
860 $cgui->setFormAction($this->ctrl->getFormAction($this));
861 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
862 $cgui->setCancel($this->lng->txt("cancel"), "cancelDeleteTracking");
863 $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDeleteTracking");
864
865 foreach ($_POST["user"] as $id) {
866 if (ilObject::_exists($id) && ilObject::_lookUpType($id) == "usr") {
867 $user = new ilObjUser($id);
868
869 $caption = ilUtil::getImageTagByType("sahs", $this->tpl->tplPath) .
870 " " . $this->lng->txt("cont_tracking_data") .
871 ": " . $user->getLastname() . ", " . $user->getFirstname();
872
873
874 $cgui->addItem("user[]", $id, $caption);
875 }
876 }
877
878 $this->tpl->setContent($cgui->getHTML());
879 }
880
884 public function cancelDeleteTracking()
885 {
886 ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
887 $this->ctrl->redirect($this, "modifyTrackingItems");
888 }
889
890 public function confirmedDeleteTracking()
891 {
892 $this->object->deleteTrackingDataOfUsers($_POST["user"]);
893 $this->ctrl->redirect($this, "modifyTrackingItems");
894 }
895
899 public function cancel()
900 {
901 ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
902 $this->ctrl->redirect($this, "properties");
903 }
904
908 protected function import()
909 {
910 $form = $this->initImportForm("");
911 if ($form->checkInput()) {
912 $source = $form->getInput('csv');
913 $error = $this->object->importTrackingData($source['tmp_name']);
914 switch ($error) {
915 case 0:
916 ilUtil::sendInfo('Tracking data imported', true);
917 $this->ctrl->redirect($this, "showTrackingItems");
918 break;
919 case -1:
920 ilUtil::sendInfo($this->lng->txt('err_check_input'));
921 $this->importForm();
922 break;
923 }
924 }
925 ilUtil::sendInfo($this->lng->txt('err_check_input'));
926 $form->setValuesByPost();
927 $this->importForm();
928 }
929
933 protected function importForm()
934 {
935 global $DIC;
936 $ilTabs = $DIC['ilTabs'];
937
938 $ilTabs->clearTargets();
939 $ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'showTrackingItems'));
940
941 $form = $this->initImportForm("");
942 $this->tpl->setContent($form->getHTML());
943 }
944
948 protected function initImportForm($a_new_type)
949 {
950 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
951 $form = new ilPropertyFormGUI();
952 $form->setFormAction($this->ctrl->getFormAction($this));
953 $form->setTitle($this->lng->txt('cont_import_tracking'));
954 $form->addCommandButton('import', $this->lng->txt('import'));
955 $form->addCommandButton('showTrackingItems', $this->lng->txt('cancel'));
956
957 $csv = new ilFileInputGUI($this->lng->txt('select_file'), 'csv');
958 $csv->setRequired(true);
959 $csv->setSuffixes(array('csv'));
960 $form->addItem($csv);
961
962 return $form;
963 }
964
968 protected function exportAll()
969 {
970 $this->object->exportSelected(1);
971 }
972
976 protected function exportSelectionUsers()
977 {
978 if (!count((array) $_POST['user'])) {
979 //ilUtil::sendFailure($this->lng->txt('select_one'),true);
980 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
981 $this->ctrl->redirect($this, 'modifyTrackingItems');
982 } else {
983 $this->object->exportSelected(0, $_POST["user"]);
984 }
985 }
986
987
988 public function decreaseAttempts()
989 {
990 if (!isset($_POST["user"])) {
991 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
992 }
993 $this->object->decreaseAttemptsForUser($_POST["user"]);
994 $this->ctrl->redirect($this, "modifyTrackingItems");
995 }
996
997
1001 protected function showTrackingItem()
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_byuser");
1011
1012 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsPerUserTableGUI.php';
1013 $tbl = new ilSCORMTrackingItemsPerUserTableGUI($this->object->getId(), $this, 'showTrackingItem');
1014 $tbl->setUserId((int) $_REQUEST['user_id']);
1015 $tbl->parse();
1016 $this->tpl->setContent($tbl->getHTML());
1017 return true;
1018 }
1019
1023 protected function showTrackingItemSco()
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_bysco");
1033
1034 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemsScoTableGUI.php';
1035 $tbl = new ilSCORMTrackingItemsScoTableGUI($this->object->getId(), $this, 'showTrackingItemSco');
1036 $tbl->setScoId((int) $_GET['obj_id']);
1037 $tbl->parse();
1038 $this->tpl->setContent($tbl->getHTML());
1039 return true;
1040 }
1041
1045 protected function showTrackingItemPerUser()
1046 {
1047 global $DIC;
1048 $ilTabs = $DIC['ilTabs'];
1049
1050 include_once "./Services/Table/classes/class.ilTableGUI.php";
1051
1052 $this->setSubTabs();
1053 $ilTabs->setTabActive("cont_tracking_data");
1054 $ilTabs->setSubTabActive("cont_tracking_byuser");
1055
1056 $this->ctrl->setParameter($this, 'obj_id', (int) $_REQUEST['obj_id']);
1057 $this->ctrl->setParameter($this, 'user_id', (int) $_REQUEST['user_id']);
1058
1059 include_once './Modules/ScormAicc/classes/class.ilSCORMTrackingItemPerUserTableGUI.php';
1060 $tbl = new ilSCORMTrackingItemPerUserTableGUI($this->object->getId(), $this, 'showTrackingItemPerUser');
1061 $tbl->setUserId((int) $_REQUEST['user_id']);
1062 $tbl->setScoId((int) $_REQUEST['obj_id']);
1063 $tbl->parse();
1064 $this->tpl->setContent($tbl->getHTML());
1065 return true;
1066 }
1067
1068 //setTabs
1069 public function setSubTabs()
1070 {
1071 global $DIC;
1072 $lng = $DIC['lng'];
1073 $ilTabs = $DIC['ilTabs'];
1074 $ilCtrl = $DIC['ilCtrl'];
1075 $ilAccess = $DIC['ilAccess'];
1076
1077 if ($ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
1078 $ilTabs->addSubTabTarget(
1079 "cont_tracking_byuser",
1080 $this->ctrl->getLinkTarget($this, "showTrackingItems"),
1081 array("edit", ""),
1082 get_class($this)
1083 );
1084
1085 $ilTabs->addSubTabTarget(
1086 "cont_tracking_bysco",
1087 $this->ctrl->getLinkTarget($this, "showTrackingItemsBySco"),
1088 array("edit", ""),
1089 get_class($this)
1090 );
1091 }
1092 if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
1093 $ilTabs->addSubTabTarget(
1094 "cont_tracking_modify",
1095 $this->ctrl->getLinkTarget($this, "modifyTrackingItems"),
1096 array("edit", ""),
1097 get_class($this)
1098 );
1099 }
1100 }
1101
1102
1108 protected function offlineModeManager()
1109 {
1110 global $DIC;
1111 $rbacsystem = $DIC['rbacsystem'];
1112 $tree = $DIC['tree'];
1113 $tpl = $DIC['tpl'];
1114 $lng = $DIC['lng'];
1115 $ilToolbar = $DIC['ilToolbar'];
1116 $ilCtrl = $DIC['ilCtrl'];
1117 $ilSetting = $DIC['ilSetting'];
1118
1119 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1120 if (!ilLearningProgressAccess::checkAccess($this->object->getRefId()) && !$rbacsystem->checkAccess("edit_permission", "", $this->object->getRefId())) {
1121 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
1122 }
1123
1124 include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
1125 $tbl = new ilSCORMOfflineModeUsersTableGUI($this->object->getId(), $this, 'offlineModeManager');
1126 $tbl->parse();
1127 $this->tpl->setContent($tbl->getHTML());
1128 }
1132 protected function stopUserOfflineMode()
1133 {
1134 if (!count((array) $_POST['user'])) {
1135 ilUtil::sendFailure($this->lng->txt('select_one'), true);
1136 $this->ctrl->redirect($this, 'offlineModeManager');
1137 }
1138 // display confirmation message
1139 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1140 $cgui = new ilConfirmationGUI();
1141 $cgui->setFormAction($this->ctrl->getFormAction($this));
1142 $cgui->setHeaderText($this->lng->txt("info_stop_offline_mode_sure"));
1143 $cgui->setCancel($this->lng->txt("cancel"), "cancelStopUserOfflineMode");
1144 $cgui->setConfirm($this->lng->txt("confirm"), "confirmedStopUserOfflineMode");
1145 foreach ($_POST["user"] as $id) {
1146 if (ilObject::_exists($id) && ilObject::_lookUpType($id) == "usr") {
1147 $user = new ilObjUser($id);
1148 $caption = ilUtil::getImageTagByType("sahs_offline", $this->tpl->tplPath) .
1149 " " . $this->lng->txt("stop_user_offline_mode_for_user") .
1150 ": " . $user->getLastname() . ", " . $user->getFirstname();
1151 $cgui->addItem("user[]", $id, $caption);
1152 }
1153 }
1154 $this->tpl->setContent($cgui->getHTML());
1155 }
1156
1158 {
1159 ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
1160 $this->ctrl->redirect($this, "offlineModeManager");
1161 }
1162
1164 {
1165 include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php';
1166 foreach ($_POST["user"] as $id) {
1167 ilSCORMOfflineMode::stopOfflineModeForUser($this->object->getId(), $id);
1168 }
1169
1170 $this->offlineModeManager();
1171 }
1172}
1173// END class.ilObjSCORMLearningModule
$_GET["client_id"]
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
This class represents a checkbox property in a property form.
Confirmation screen class.
This class represents a file property in a property form.
static rename($a_source, $a_target)
Rename a file.
This class represents a section header in a property form.
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.
This class represents a number property in a property form.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
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.
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
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.
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 a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
GUI class ilSCORMOfflineModeUsersTableGUI.
static stopOfflineModeForUser($obj_id, $user_id)
static checkIfAnyoneIsInOfflineMode($obj_id)
Class ilSCORMTrackingItemsTableGUI.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getParticipantsForObject($a_ref_id)
Get participant ids for given object.
static _getUploadFiles()
Get a list of readable files in the upload directory.
static _copyUploadFile($a_file, $a_target, $a_raise_errors=true)
copy an uploaded file to the target directory (including virus check)
static _checkUploadFile($a_file)
Check if a file exists in the upload directory and is readable.
static _getUploadDirectory()
Get the directory with uploaded files.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static escapeShellArg($a_arg)
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:29
$source
Definition: metadata.php:76
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)
global $ilSetting
Definition: privfeed.php:17
$type
$DIC
Definition: xapitoken.php:46