ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilObjSAHSLearningModuleGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once "./Services/Object/classes/class.ilObjectGUI.php";
5require_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
6
19{
25 function ilObjSAHSLearningModuleGUI($a_data,$a_id,$a_call_by_reference, $a_prepare_output = true)
26 {
27 global $lng;
28
29 $lng->loadLanguageModule("content");
30 $this->type = "sahs";
31 $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
32 }
33
37 function &executeCommand()
38 {
39 global $ilAccess, $ilTabs, $ilErr;
40
41 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
42 strtolower($_GET["baseClass"]) == "ilsahspresentationgui" ||
43 $this->getCreationMode() == true)
44 {
45 $this->prepareOutput();
46 }
47 else
48 {
49 $this->getTemplate();
50 $this->setLocator();
51 $this->setTabs();
52 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
53 $this->tpl->setTitle($this->object->getTitle());
54 }
55
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
58
59 switch($next_class)
60 {
61 case 'ilmdeditorgui':
62 if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
63 {
64 $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->WARNING);
65 }
66
67 include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
68
69 $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
70 $md_gui->addObserver($this->object,'MDUpdateListener','General');
71
72 $this->ctrl->forwardCommand($md_gui);
73 break;
74
75 case 'ilpermissiongui':
76 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
77 $perm_gui =& new ilPermissionGUI($this);
78 $ret =& $this->ctrl->forwardCommand($perm_gui);
79 break;
80
81 case "ilfilesystemgui":
82 $this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
83 $this->fs_gui->setUseUploadDirectory(true);
84 $this->fs_gui->setTableId("sahsfs".$this->object->getId());
85 $ret =& $this->ctrl->forwardCommand($this->fs_gui);
86 break;
87
88 case "ilcertificategui":
89 $this->setSettingsSubTabs();
90 $ilTabs->setSubTabActive('certificate');
91 include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
92 include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
93 $output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
94 $ret =& $this->ctrl->forwardCommand($output_gui);
95 break;
96
97 case "illearningprogressgui":
98 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
99
100 $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY,$this->object->getRefId());
101 $this->ctrl->forwardCommand($new_gui);
102
103 break;
104
105 case 'illicensegui':
106 include_once("./Services/License/classes/class.ilLicenseGUI.php");
107 $license_gui =& new ilLicenseGUI($this);
108 $ret =& $this->ctrl->forwardCommand($license_gui);
109 break;
110
111 case "ilinfoscreengui":
112 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
113
114 $info = new ilInfoScreenGUI($this);
115 $info->enablePrivateNotes();
116 $info->enableLearningProgress();
117
118 // add read / back button
119 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
120 {
121 if (!$this->object->getEditable())
122 {
123 $info->addButton($this->lng->txt("view"),
124 "ilias.php?baseClass=ilSAHSPresentationGUI&amp;ref_id=".$this->object->getRefID(),
125 ' target="ilContObj'.$this->object->getId().'" ');
126 }
127 }
128
129 $info->enableNews();
130 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
131 {
132 $info->enableNewsEditing();
133 $news_set = new ilSetting("news");
134 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
135 if ($enable_internal_rss)
136 {
137 $info->setBlockProperty("news", "settings", true);
138 }
139 }
140 // show standard meta data section
141 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
142
143 // forward the command
144 $this->ctrl->forwardCommand($info);
145 break;
146
147 case "ilcommonactiondispatchergui":
148 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
150 $this->ctrl->forwardCommand($gui);
151 break;
152
153 case "ilobjstylesheetgui":
154 //$this->addLocations();
155 $this->ctrl->setReturn($this, "properties");
156 $ilTabs->clearTargets();
157 $style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
158 $style_gui->omitLocator();
159 if ($cmd == "create" || $_GET["new_type"]=="sty")
160 {
161 $style_gui->setCreationMode(true);
162 }
163 //$ret =& $style_gui->executeCommand();
164
165 if ($cmd == "confirmedDelete")
166 {
167 $this->object->setStyleSheetId(0);
168 $this->object->update();
169 }
170 $ret =& $this->ctrl->forwardCommand($style_gui);
171 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
172 {
173 $style_id = $ret;
174 $this->object->setStyleSheetId($style_id);
175 $this->object->update();
176 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
177 }
178 break;
179 default:
180 if ($this->object && !$this->object->getEditable())
181 {
182 $cmd = $this->ctrl->getCmd("properties");
183 }
184 else
185 {
186 $cmd = $this->ctrl->getCmd("frameset");
187 }
188 if ((strtolower($_GET["baseClass"]) == "iladministrationgui" ||
189 $this->getCreationMode() == true) &&
190 $cmd != "frameset")
191 {
192 $cmd.= "Object";
193 }
194
195 // #9225
196 if($cmd == "redrawHeaderAction")
197 {
198 $cmd .= "Object";
199 }
200
201 $ret =& $this->$cmd();
202 break;
203 }
204 }
205
206
207 function viewObject()
208 {
209 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
210 {
211 parent::viewObject();
212 }
213 else
214 {
215 }
216 }
217
221 function properties()
222 {
223 }
224
228 function saveProperties()
229 {
230 }
231
235
239 function initCreationForms($a_new_type)
240 {
241 $forms = array();
242
243 $this->initUploadForm();
244 $forms[self::CFORM_IMPORT] = $this->form;
245
246 $this->initCreationForm();
247 $forms[self::CFORM_NEW] = $this->form;
248
249 return $forms;
250 }
251
257 public function initCreationForm()
258 {
259 global $lng, $ilCtrl;
260
261 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
262 $this->form = new ilPropertyFormGUI();
263
264 // title
265 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
266 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
267 $ti->setMaxLength(ilObject::TITLE_LENGTH);
268 $ti->setRequired(true);
269 $this->form->addItem($ti);
270
271 // text area
272 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
273 $ta->setCols(40);
274 $ta->setRows(2);
275 $this->form->addItem($ta);
276
277
278 $this->form->addCommandButton("save", $lng->txt("create"));
279 $this->form->addCommandButton("cancel", $lng->txt("cancel"));
280
281 $this->form->setTitle($lng->txt("scorm_new"));
282 $this->form->setFormAction($ilCtrl->getFormAction($this));
283 $this->form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
284 }
285
289 public function initUploadForm()
290 {
291 global $lng, $ilCtrl;
292
293 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
294 $this->form = new ilPropertyFormGUI();
295
296 // type selection
297 $options = array(
298 "scorm2004" => $lng->txt("lm_type_scorm2004"),
299 "scorm" => $lng->txt("lm_type_scorm"),
300 "aicc" => $lng->txt("lm_type_aicc"),
301 "hacp" => $lng->txt("lm_type_hacp")
302 );
303 $si = new ilSelectInputGUI($this->lng->txt("type"), "sub_type");
304 $si->setOptions($options);
305 $this->form->addItem($si);
306
307 // input file
308 $fi = new ilFileInputGUI($this->lng->txt("select_file"), "scormfile");
309 $fi->setRequired(true);
310 $this->form->addItem($fi);
311
312 // todo "uploaded file"
313 // todo wysiwyg editor removement
314
315 include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
317 {
318 $options = array();
319 $fi->setRequired(false);
321 $options[""] = $this->lng->txt("cont_select_from_upload_dir");
322 foreach($files as $file)
323 {
324 $file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
326 }
327 //
328 $si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), "uploaded_file");
329 $si->setOptions($options);
330 $this->form->addItem($si);
331 }
332
333
334 // validate file
335 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_validate_file"), "validate");
336 $cb->setValue("y");
337 //$cb->setChecked(true);
338 $this->form->addItem($cb);
339
340 // import for editing
341 $cb = new ilCheckboxInputGUI($this->lng->txt("sahs_authoring_mode"), "editable");
342 $cb->setValue("y");
343 $cb->setInfo($this->lng->txt("sahs_authoring_mode_info"));
344 $this->form->addItem($cb);
345
346 //
347 $radg = new ilRadioGroupInputGUI($lng->txt("sahs_sequencing"), "import_sequencing");
348 $radg->setValue(0);
349 $op1 = new ilRadioOption($lng->txt("sahs_std_sequencing"), 0,$lng->txt("sahs_std_sequencing_info"));
350 $radg->addOption($op1);
351 $op1 = new ilRadioOption($lng->txt("sahs_import_sequencing"), 1,$lng->txt("sahs_import_sequencing_info"));
352 $radg->addOption($op1);
353 $cb->addSubItem($radg);
354
355
356 $this->form->addCommandButton("upload", $lng->txt("import"));
357 $this->form->addCommandButton("cancel", $lng->txt("cancel"));
358
359 $this->form->setTitle($lng->txt("import_sahs"));
360 $this->form->setFormAction($ilCtrl->getFormAction($this, "upload"));
361 $this->form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
362 }
363
370 function uploadObject()
371 {
372 global $_FILES, $rbacsystem;
373
374 include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
375
376 // check create permission
377 if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], "sahs"))
378 {
379 $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->WARNING);
380 }
381 elseif ($_FILES["scormfile"]["name"])
382 {
383 // check if file was uploaded
384 $source = $_FILES["scormfile"]["tmp_name"];
385 if (($source == 'none') || (!$source))
386 {
387 $this->ilias->raiseError($this->lng->txt("msg_no_file"),$this->ilias->error_obj->MESSAGE);
388 }
389 // get_cfg_var("upload_max_filesize"); // get the may filesize form t he php.ini
390 switch ($__FILES["scormfile"]["error"])
391 {
392 case UPLOAD_ERR_INI_SIZE:
393 $this->ilias->raiseError($this->lng->txt("err_max_file_size_exceeds"),$this->ilias->error_obj->MESSAGE);
394 break;
395
396 case UPLOAD_ERR_FORM_SIZE:
397 $this->ilias->raiseError($this->lng->txt("err_max_file_size_exceeds"),$this->ilias->error_obj->MESSAGE);
398 break;
399
400 case UPLOAD_ERR_PARTIAL:
401 $this->ilias->raiseError($this->lng->txt("err_partial_file_upload"),$this->ilias->error_obj->MESSAGE);
402 break;
403
404 case UPLOAD_ERR_NO_FILE:
405 $this->ilias->raiseError($this->lng->txt("err_no_file_uploaded"),$this->ilias->error_obj->MESSAGE);
406 break;
407 }
408
409 $file = pathinfo($_FILES["scormfile"]["name"]);
410 }
411 elseif ($_POST["uploaded_file"])
412 {
413 // check if the file is in the upload directory and readable
414 if (!ilUploadFiles::_checkUploadFile($_POST["uploaded_file"]))
415 {
416 $this->ilias->raiseError($this->lng->txt("upload_error_file_not_found"),$this->ilias->error_obj->MESSAGE);
417 }
418
419 $file = pathinfo($_POST["uploaded_file"]);
420 }
421 else
422 {
423 $this->ilias->raiseError($this->lng->txt("msg_no_file"),$this->ilias->error_obj->MESSAGE);
424 }
425
426 $name = substr($file["basename"], 0, strlen($file["basename"]) - strlen($file["extension"]) - 1);
427 if ($name == "")
428 {
429 $name = $this->lng->txt("no_title");
430 }
431
432 // create and insert object in objecttree
433 switch ($_POST["sub_type"])
434 {
435
436 case "scorm2004":
437 include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
438 $newObj = new ilObjSCORM2004LearningModule();
439 $newObj->setEditable($_POST["editable"]=='y');
440 $newObj->setImportSequencing($_POST["import_sequencing"]);
441 $newObj->setSequencingExpertMode($_POST["import_sequencing"]);
442 break;
443
444 case "scorm":
445 include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php");
446 $newObj = new ilObjSCORMLearningModule();
447 break;
448
449 case "aicc":
450 include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModule.php");
451 $newObj = new ilObjAICCLearningModule();
452 break;
453
454 case "hacp":
455 include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModule.php");
456 $newObj = new ilObjHACPLearningModule();
457 break;
458 }
459
460 $newObj->setTitle($name);
461 $newObj->setSubType($_POST["sub_type"]);
462 $newObj->setDescription("");
463 $newObj->create(true);
464 $newObj->createReference();
465 $newObj->putInTree($_GET["ref_id"]);
466 $newObj->setPermissions($_GET["ref_id"]);
467 $newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
468
469 // create data directory, copy file to directory
470 $newObj->createDataDirectory();
471
472 if ($_FILES["scormfile"]["name"])
473 {
474 // copy uploaded file to data directory
475 $file_path = $newObj->getDataDirectory()."/".$_FILES["scormfile"]["name"];
476
477 ilUtil::moveUploadedFile($_FILES["scormfile"]["tmp_name"],
478 $_FILES["scormfile"]["name"], $file_path);
479 }
480 else
481 {
482 // copy uploaded file to data directory
483 $file_path = $newObj->getDataDirectory()."/". $_POST["uploaded_file"];
484
485 ilUploadFiles::_copyUploadFile($_POST["uploaded_file"], $file_path);
486 }
487
488 ilUtil::unzip($file_path);
489 ilUtil::renameExecutables($newObj->getDataDirectory());
490
491 $title = $newObj->readObject();
492 if ($title != "")
493 {
494 ilObject::_writeTitle($newObj->getId(), $title);
495 /*$md = new ilMD($newObj->getId(),0, $newObj->getType());
496 if(is_object($md_gen = $md->getGeneral()))
497 {
498 $md_gen->setTitle($title);
499 $md_gen->update();
500 }*/
501 }
502
503 //auto set learning progress settings
504 switch ($_POST["sub_type"])
505 {
506 case "scorm2004":
507 case "scorm":
508 $newObj->setLearningProgressSettingsAtUpload();
509 break;
510 }
511
512
513 ilUtil::sendInfo( $this->lng->txt($newObj->getType()."_added"), true);
514 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$newObj->getRefId());
515 }
516
517 function upload()
518 {
519 $this->uploadObject();
520 }
521
522
523
527 function saveObject()
528 {
529 if (trim($_POST["title"]) == "")
530 {
531 $this->ilias->raiseError($this->lng->txt("msg_no_title"),$this->ilias->error_obj->MESSAGE);
532 }
533
534 include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
535 $newObj = new ilObjSCORM2004LearningModule();
536 $newObj->setTitle(ilUtil::stripSlashes($_POST["title"]));
537 $newObj->setSubType("scorm2004");
538 $newObj->setEditable(true);
539 $newObj->setDescription(ilUtil::stripSlashes($_POST["desc"]));
540 $newObj->create();
541 $newObj->createReference();
542 $newObj->putInTree($_GET["ref_id"]);
543 $newObj->setPermissions($_GET["ref_id"]);
544 $newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
545 $newObj->createDataDirectory();
546 $newObj->createScorm2004Tree();
547 ilUtil::sendInfo( $this->lng->txt($newObj->getType()."_added"), true);
548 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$newObj->getRefId());
549 }
550
551
555 function info()
556 {
557 $this->infoObject();
558 }
559
563 function owner()
564 {
565 $this->ownerObject();
566 }
567
571 function getTemplate()
572 {
573 global $lng;
574
575 $this->tpl->getStandardTemplate();
576 }
577
578
584/* function frameset()
585 {
586 $this->tpl = new ilTemplate("tpl.sahs_edit_frameset.html", false, false, "Modules/ScormAicc");
587 $this->tpl->setVariable("SRC",
588 $this->ctrl->getLinkTarget($this, "properties"));
589 $this->tpl->show("DEFAULT", false);
590 exit;
591 }*/
592
596 function setTabs()
597 {
598 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
599 $this->tpl->setTitle($this->object->getTitle());
600 if(strtolower($_GET["baseClass"]) == "ilsahseditgui") $this->getTabs($this->tabs_gui);
601 }
602
606 function certificate()
607 {
608 include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
609 include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
610 $output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
611 $output_gui->certificateEditor();
612 }
613
619 function getTabs(&$tabs_gui)
620 {
621 global $rbacsystem, $ilUser, $ilCtrl, $ilHelp;
622
623 if ($this->ctrl->getCmd() == "delete")
624 {
625 return;
626 }
627
628 switch ($this->object->getSubType())
629 {
630 case "scorm2004":
631 $ilHelp->setScreenIdComponent("sahs13");
632 break;
633
634 case "scorm":
635 $ilHelp->setScreenIdComponent("sahs12");
636 break;
637 }
638
639 // file system gui tabs
640 // properties
641 $ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", 1);
642 $tabs_gui->addTarget("cont_list_files",
643 $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "",
644 "ilfilesystemgui");
645 $ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", "");
646
647 // info screen
648 $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui")
649 ? true
650 : false;
651 $tabs_gui->addTarget("info_short",
652 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
653 "ilinfoscreengui", "", $force_active);
654
655 // properties
656 $tabs_gui->addTarget("settings",
657 $this->ctrl->getLinkTarget($this, "properties"), array("", "properties"),
658 get_class($this));
659
660 // learning progress and offline mode
661 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
662 if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
663 {
664 //if scorm && offline_mode activated
665 if ($this->object->getSubType() == "scorm2004" || $this->object->getSubType() == "scorm") {
666 if ($this->object->getOfflineMode() == true) {
667 $tabs_gui->addTarget("offline_mode_manager",
668 $this->ctrl->getLinkTarget($this, "offlineModeManager"),
669 "offlineModeManager",
670 "ilobjscormlearningmodulegui");
671 }
672 }
673
674 $tabs_gui->addTarget('learning_progress',
675 $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'),''),
676 '',
677 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
678 }
679
680 // tracking data
681 if($rbacsystem->checkAccess("read_learning_progress", $this->object->getRefId()) || $rbacsystem->checkAccess("edit_learning_progress", $this->object->getRefId()))
682 {
683 if ($this->object->getSubType() == "scorm2004" || $this->object->getSubType() == "scorm") {
684 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
686 if($privacy->enabledSahsProtocolData())
687 {
688 $tabs_gui->addTarget("cont_tracking_data",
689 $this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems",
690 get_class($this));
691 }
692 }
693 }
694 include_once("Services/License/classes/class.ilLicenseAccess.php");
695 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId())
697 {
698 $tabs_gui->addTarget("license",
699 $this->ctrl->getLinkTargetByClass('illicensegui', ''),
700 "", "illicensegui");
701 }
702
703 // edit meta
704 $tabs_gui->addTarget("meta_data",
705 $this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
706 "", "ilmdeditorgui");
707
708 // perm
709 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
710 {
711 $tabs_gui->addTarget("perm_settings",
712 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
713 }
714 }
715
719 public static function _goto($a_target)
720 {
721 global $ilAccess, $ilErr, $lng;
722
723 $parts = explode("_", $a_target);
724
725 if ($ilAccess->checkAccess("write", "", $parts[0]))
726 {
727 $_GET["cmd"] = "";
728 $_GET["baseClass"] = "ilSAHSEditGUI";
729 $_GET["ref_id"] = $parts[0];
730 $_GET["obj_id"] = $parts[1];
731 include("ilias.php");
732 exit;
733 }
734 if ($ilAccess->checkAccess("visible", "", $parts[0]))
735 {
736 $_GET["cmd"] = "infoScreen";
737 $_GET["baseClass"] = "ilSAHSPresentationGUI";
738 $_GET["ref_id"] = $parts[0];
739 include("ilias.php");
740 exit;
741 }
742 else
743 {
744 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
745 {
746 ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
749 }
750 }
751
752 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
753 }
754
756 {
757 global $ilLocator;
758
759 if (is_object($this->object))
760 {
761 $ilLocator->addItem($this->object->getTitle(),
762 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", $_GET["ref_id"]);
763 }
764 }
765
772 function editContent()
773 {
774 global $ilCtrl;
775
776 if (!$this->object->getEditable())
777 {
778 $ilCtrl->redirectByClass("ilfilesystemgui", "listFiles");
779 }
780 else
781 {
782 $ilCtrl->redirectByClass("ilobjscorm2004learningmodulegui", "editOrganization");
783 }
784 }
785
790 {
791 global $lng, $ilTabs, $ilCtrl;
792
793 $ilTabs->addSubTabTarget("cont_settings",
794 $this->ctrl->getLinkTarget($this, "properties"), array("edit", ""),
795 get_class($this));
796
797 $ilTabs->addSubTabTarget("cont_sc_new_version",
798 $this->ctrl->getLinkTarget($this, "newModuleVersion"), array("edit", ""),
799 get_class($this));
800
801 include_once "Services/Certificate/classes/class.ilCertificate.php";
803 {
804 // // create and insert object in objecttree
805 // $ilTabs->addSubTabTarget("certificate",
806 // $this->ctrl->getLinkTarget($this, "certificate"),
807 // array("certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave",
808 // "certificatePreview", "certificateDelete", "certificateUpload", "certificateImport")
809 // );
810 $ilTabs->addSubTabTarget(
811 "certificate",
812 $this->ctrl->getLinkTargetByClass("ilcertificategui", "certificateeditor"),
813 "", "ilcertificategui");
814 }
815
816 $ilTabs->setTabActive('settings');
817 }
818
819} // END class.ilObjSAHSLearningModule
820?>
print $file
$_GET["client_id"]
GUI class to create PDF certificates.
This class represents a checkbox property in a property form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This class represents a file property in a property form.
File System Explorer GUI class.
static _getFrame($a_class, $a_type='')
Get content frame name.
Class ilInfoScreenGUI.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
Class ilObjUserTrackingGUI.
static _isEnabled()
Check, if licencing is enabled This check is called from the ilAccessHandler class.
Class ilObjAICCLearningModule.
Class ilObjAICCLearningModule.
SCORM/AICC/HACP Learning Modules.
getTabs(&$tabs_gui)
adds tabs to tab gui object
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
ilObjSAHSLearningModuleGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
saveObject()
save new learning module to db
setTabs()
output main frameset of media pool left frame: explorer tree of folders right frame: media pool conte...
static _goto($a_target)
goto target course
viewObject()
list childs of current object
initCreationForms($a_new_type)
no manual SCORM creation, only import at the time
certificate()
Shows the certificate editor.
owner()
show owner of learning module
getTemplate()
output main header (title and locator)
uploadObject()
display status information or report errors messages in case of error
Class ilObjSCORM2004LearningModule.
Class ilObjSCORMLearningModule.
Class ilObjStyleSheetGUI.
Class ilObjectGUI Basic methods of all Output classes.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
prepareOutput()
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
setLocator()
set Locator
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
_writeTitle($a_obj_id, $a_title)
write title to db (static)
static _lookupTitle($a_id)
lookup object title
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
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.
This class represents a selection list property in a property form.
ILIAS Setting Class.
This class represents a text area property in a property form.
This class represents a text property in a property form.
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 redirect($a_script)
http redirect to other script
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 sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:54
redirection script todo: (a better solution should control the processing via a xml file)
$cmd
Definition: sahs_server.php:35
if(!is_array($argv)) $options
global $ilUser
Definition: imgupload.php:15