ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilDclRecordEditGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
16{
17
23 const REDIRECT_DETAIL = 2;
27 protected $record_id;
31 protected $table_id;
35 protected $table;
39 protected $parent_obj;
43 protected $record;
47 protected $ctrl;
51 protected $tpl;
55 protected $lng;
59 protected $user;
63 protected $form;
64
65
70 {
71 global $DIC;
72 $ilCtrl = $DIC['ilCtrl'];
73 $tpl = $DIC['tpl'];
74 $lng = $DIC['lng'];
75 $ilUser = $DIC['ilUser'];
76
77 $this->ctrl = $ilCtrl;
78 $this->tpl = $tpl;
79 $this->lng = $lng;
80 $this->user = $ilUser;
81 $this->parent_obj = $parent_obj;
82 $this->record_id = $_REQUEST['record_id'];
83 $this->table_id = $_REQUEST['table_id'];
84 $this->tableview_id = $_REQUEST['tableview_id'];
85 }
86
87
91 public function executeCommand()
92 {
93 $this->getRecord();
94
95 $cmd = $this->ctrl->getCmd();
96 switch ($cmd) {
97 default:
98 $this->$cmd();
99 break;
100 }
101
102 return true;
103 }
104
105
109 public function getRecord()
110 {
111 if ($_GET['mode']) {
112 $this->ctrl->saveParameter($this, 'mode');
113 $this->ctrl->setParameterByClass("ildclrecordlistgui", "mode", $_GET['mode']);
114 }
115 $this->ctrl->setParameterByClass('ildclrecordlistgui', 'tableview_id', $this->tableview_id);
116 $this->ctrl->saveParameter($this, 'redirect');
117 if ($this->record_id) {
118 $this->record = ilDclCache::getRecordCache($this->record_id);
119 if (!$this->record->hasPermissionToEdit($this->parent_obj->ref_id) or !$this->record->hasPermissionToView($this->parent_obj->ref_id)) {
120 $this->accessDenied();
121 }
122 $this->table = $this->record->getTable();
123 $this->table_id = $this->table->getId();
124 } else {
125 $this->table = ilDclCache::getTableCache($this->table_id);
127 $this->accessDenied();
128 }
129 }
130 }
131
132
136 public function create()
137 {
138 $this->initForm();
139 if ($this->ctrl->isAsynch()) {
140 echo $this->form->getHTML();
141 exit();
142 } else {
143 $this->tpl->setContent(
144 $this->getLanguageJsKeys()
145 . $this->form->getHTML()
146 );
147 }
148 }
149
150
154 public function edit()
155 {
156 $this->initForm();
157 $this->cleanupTempFiles();
158
159 $this->setFormValues();
160 if ($this->ctrl->isAsynch()) {
161 echo $this->form->getHTML();
162 exit();
163 } else {
164 $this->tpl->setContent(
165 $this->getLanguageJsKeys()
166 . $this->form->getHTML()
167 );
168 }
169 }
170
171
177 public function confirmDelete()
178 {
179 $conf = new ilConfirmationGUI();
180 $conf->setFormAction($this->ctrl->getFormAction($this));
181 $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_record'));
182 $record = ilDclCache::getRecordCache($this->record_id);
183
184 $all_fields = $this->table->getRecordFields();
185 $record_data = "";
186 foreach ($all_fields as $key => $field) {
187 $field_record = ilDclCache::getRecordFieldCache($record, $field);
188
189 $record_representation = ilDclCache::getRecordRepresentation($field_record);
190 if ($record_representation->getConfirmationHTML() !== false) {
191 $record_data .= $field->getTitle() . ": " . $record_representation->getConfirmationHTML() . "<br />";
192 }
193 }
194 $conf->addItem('record_id', $record->getId(), $record_data);
195 $conf->addHiddenItem('table_id', $this->table_id);
196 $conf->addHiddenItem('tableview_id', $this->tableview_id);
197 $conf->setConfirm($this->lng->txt('delete'), 'delete');
198 $conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
199 $this->tpl->setContent($conf->getHTML());
200 }
201
202
206 public function cancelDelete()
207 {
208 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
209 }
210
211
215 public function delete()
216 {
217 $record = ilDclCache::getRecordCache($this->record_id);
218
219 if (!$this->table->hasPermissionToDeleteRecord($this->parent_obj->ref_id, $record)) {
220 $this->accessDenied();
221
222 return;
223 }
224
225 $record->doDelete();
226 ilUtil::sendSuccess($this->lng->txt("dcl_record_deleted"), true);
227 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
228 }
229
230
239 public function getRecordData($record_id = 0)
240 {
241 $record_id = ($record_id) ? $record_id : $_GET['record_id'];
242 $return = array();
243 if ($record_id) {
245 if (is_object($record)) {
246 $return = $record->getRecordFieldValues();
247 }
248 }
249 if ($this->ctrl->isAsynch()) {
250 echo json_encode($return);
251 exit();
252 }
253
254 return $return;
255 }
256
257
263 public function initForm()
264 {
265 $this->form = new ilDclPropertyFormGUI();
266 $prefix = ($this->ctrl->isAsynch()) ? 'dclajax' : 'dcl'; // Used by datacolleciton.js to select input elements
267 $this->form->setId($prefix . $this->table_id . $this->record_id);
268
269 $hidden_prop = new ilHiddenInputGUI("table_id");
270 $hidden_prop->setValue($this->table_id);
271 $this->form->addItem($hidden_prop);
272 $hidden_prop = new ilHiddenInputGUI("tableview_id");
273 $hidden_prop->setValue($this->tableview_id);
274 $this->form->addItem($hidden_prop);
275 if ($this->record_id) {
276 $hidden_prop = new ilHiddenInputGUI("record_id");
277 $hidden_prop->setValue($this->record_id);
278 $this->form->addItem($hidden_prop);
279 }
280
281 $this->ctrl->setParameter($this, "record_id", $this->record_id);
282 $this->form->setFormAction($this->ctrl->getFormAction($this));
283 $allFields = $this->table->getRecordFields();
284 $inline_css = '';
285 foreach ($allFields as $field) {
286 $item = ilDclCache::getFieldRepresentation($field)->getInputField($this->form, $this->record_id);
287 if ($item === null) {
288 continue; // Fields calculating values at runtime, e.g. ilDclFormulaFieldModel do not have input
289 }
290
291 if (!ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id) && $field->getLocked()) {
292 $item->setDisabled(true);
293 }
294 $this->form->addItem($item);
295 }
296
297 $this->tpl->addInlineCss($inline_css);
298
299 // Add possibility to change the owner in edit mode
300 if ($this->record_id) {
301 $ownerField = $this->table->getField('owner');
302 $inputfield = ilDclCache::getFieldRepresentation($ownerField)->getInputField($this->form);
303 $this->form->addItem($inputfield);
304 }
305
306 // save and cancel commands
307 if ($this->record_id) {
308 $this->form->setTitle($this->lng->txt("dcl_update_record"));
309 $this->form->addCommandButton("save", $this->lng->txt("dcl_update_record"));
310 if (!$this->ctrl->isAsynch()) {
311 $this->form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
312 }
313 } else {
314 $this->form->setTitle($this->lng->txt("dcl_add_new_record"));
315 $this->form->addCommandButton("save", $this->lng->txt("save"));
316 if (!$this->ctrl->isAsynch()) {
317 $this->form->addCommandButton("cancelSave", $this->lng->txt("cancel"));
318 }
319 }
320 $this->ctrl->setParameter($this, "tableview_id", $this->tableview_id);
321 $this->ctrl->setParameter($this, "table_id", $this->table_id);
322 $this->ctrl->setParameter($this, "record_id", $this->record_id);
323 }
324
325
331 public function setFormValues()
332 {
333 //Get Record-Values
334 $record_obj = ilDclCache::getRecordCache($this->record_id);
335 if ($record_obj->getId()) {
336 //Get Table Field Definitions
337 $allFields = $this->table->getFields();
338 foreach ($allFields as $field) {
339 $record_obj->fillRecordFieldFormInput($field->getId(), $this->form);
340 }
341 } else {
342 $this->form->setValuesByPost();
343 }
344
345 return true;
346 }
347
348
352 public function cancelUpdate()
353 {
354 $this->checkAndPerformRedirect(true);
355 }
356
357
361 public function cancelSave()
362 {
363 $this->cancelUpdate();
364 }
365
366
367 public function saveConfirmation(ilDclBaseRecordModel $record_obj, $filehash)
368 {
369 $permission = ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id);
370 if ($permission) {
371 $all_fields = $this->table->getRecordFields();
372 } else {
373 $all_fields = $this->table->getEditableFields();
374 }
375
376 $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
377 $record_obj->setTableId($this->table_id);
378 $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
379 $record_obj->setLastEditBy($this->user->getId());
380
381 $confirmation = new ilConfirmationGUI();
382 $confirmation->setFormAction($this->ctrl->getFormAction($this));
383 $header_text = $this->lng->txt('dcl_confirm_storing_records');
384 if (!$permission && !ilObjDataCollectionAccess::hasEditAccess($this->parent_obj->ref_id)
385 && !$this->table->getEditByOwner()
386 && !$this->table->getEditPerm()
387 ) {
388 $header_text .= " " . $this->lng->txt('dcl_confirm_storing_records_no_permission');
389 }
390 $confirmation->setHeaderText($header_text);
391
392 $confirmation->setCancel($this->lng->txt('dcl_edit_record'), 'edit');
393 $confirmation->setConfirm($this->lng->txt('dcl_save_record'), 'save');
394
395 $record_data = "";
396
397 $empty_fileuploads = array();
398 foreach ($all_fields as $field) {
399 $record_field = $record_obj->getRecordField($field->getId());
401 $record_field->addHiddenItemsToConfirmation($confirmation);
402
403 if (($record_field instanceof ilDclFileuploadRecordFieldModel || $record_field instanceof ilDclMobRecordFieldModel)
404 && $record_field->getValue() == null
405 ) {
406 $empty_fileuploads['field_' . $field->getId()] = array("name" => "", "type" => "", "tmp_name" => "", "error" => 4, "size" => 0);
407 }
408 $record_representation = ilDclFieldFactory::getRecordRepresentationInstance($record_field);
409
410 if ($record_representation->getConfirmationHTML() !== false) {
411 $record_data .= $field->getTitle() . ": " . $record_representation->getConfirmationHTML() . "<br />";
412 }
413 }
414
415 $confirmation->addHiddenItem('ilfilehash', $filehash);
416 $confirmation->addHiddenItem('empty_fileuploads', htmlspecialchars(json_encode($empty_fileuploads)));
417 $confirmation->addHiddenItem('table_id', $this->table_id);
418 $confirmation->addHiddenItem('tableview_id', $this->tableview_id);
419 $confirmation->addItem('save_confirmed', 1, $record_data);
420
421 if ($this->ctrl->isAsynch()) {
422 echo $confirmation->getHTML();
423 exit();
424 } else {
425 $this->tpl->setContent($confirmation->getHTML());
426 }
427 }
428
429
433 public function save()
434 {
435 global $DIC;
436 $ilAppEventHandler = $DIC['ilAppEventHandler'];
437 $ilUser = $DIC['ilUser'];
438
439 $this->initForm();
440
441 // if save confirmation is enabled: Temporary file-uploads need to be handled
442 if ($this->table->getSaveConfirmation() && isset($_POST['save_confirmed']) && isset($_POST['ilfilehash']) && !isset($this->record_id) && !$this->ctrl->isAsynch()) {
444
445 //handle empty fileuploads, since $_FILES has to have an entry for each fileuploadGUI
446 if (json_decode($_POST['empty_fileuploads']) && $_POST['empty_fileuploads'] != '') {
447 $_FILES = $_FILES + json_decode($_POST['empty_fileuploads'], true);
448 }
449
450 unset($_SESSION['record_form_values']);
451 }
452
453 $valid = $this->form->checkInput();
454
455 $record_obj = ilDclCache::getRecordCache($this->record_id);
456 $unchanged_obj = $record_obj;
457 $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
458 $record_obj->setTableId($this->table_id);
459 $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
460 $record_obj->setLastEditBy($this->user->getId());
461
462 $create_mode = false;
463
464 if (ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id)) {
465 $all_fields = $this->table->getRecordFields();
466 } else {
467 $all_fields = $this->table->getEditableFields();
468 }
469
470 //Check if we can create this record.
471 foreach ($all_fields as $field) {
472 try {
473 $field->checkValidityFromForm($this->form, $this->record_id);
474 } catch (ilDclInputException $e) {
475 $valid = false;
476 $item = $this->form->getItemByPostVar('field_' . $field->getId());
477 $item->setAlert($e);
478 }
479 }
480
481 if (!$valid) {
482 $this->sendFailure($this->lng->txt('form_input_not_valid'));
483 return;
484 }
485
486 if ($valid) {
487 if (!isset($this->record_id)) {
488 if (!(ilObjDataCollectionAccess::hasPermissionToAddRecord($this->parent_obj->ref_id, $this->table_id))) {
489 $this->accessDenied();
490 return;
491 }
492
493 // when save_confirmation is enabled, not yet confirmed and we have not an async-request => prepare for displaying confirmation
494 if ($this->table->getSaveConfirmation() && $this->form->getInput('save_confirmed') == null && !$this->ctrl->isAsynch()) {
495 // temporary store fileuploads (reuse code from ilPropertyFormGUI)
496 $hash = $_POST["ilfilehash"];
497 foreach ($_FILES as $field => $data) {
498 if (is_array($data["tmp_name"])) {
499 foreach ($data["tmp_name"] as $idx => $upload) {
500 if (is_array($upload)) {
501 foreach ($upload as $idx2 => $file) {
502 if ($file && is_uploaded_file($file)) {
503 $file_name = $data["name"][$idx][$idx2];
504 $file_type = $data["type"][$idx][$idx2];
505 $this->form->keepTempFileUpload($hash, $field, $file, $file_name, $file_type, $idx, $idx2);
506 }
507 }
508 } else {
509 if ($upload && is_uploaded_file($upload)) {
510 $file_name = $data["name"][$idx];
511 $file_type = $data["type"][$idx];
512 $this->form->keepTempFileUpload($hash, $field, $upload, $file_name, $file_type, $idx);
513 }
514 }
515 }
516 } else {
517 $this->form->keepTempFileUpload($hash, $field, $data["tmp_name"], $data["name"], $data["type"]);
518 }
519 }
520
521 //edit values, they are valid we already checked them above
522 foreach ($all_fields as $field) {
523 $record_obj->setRecordFieldValueFromForm($field->getId(), $this->form);
524 }
525
526 $this->saveConfirmation($record_obj, $hash);
527
528 return;
529 }
530
531 $record_obj->setOwner($this->user->getId());
532 $record_obj->setCreateDate($date_obj->get(IL_CAL_DATETIME));
533 $record_obj->setTableId($this->table_id);
534 $record_obj->doCreate();
535
536 $this->record_id = $record_obj->getId();
537 $create_mode = true;
538 } else {
539 if (!$record_obj->hasPermissionToEdit($this->parent_obj->ref_id)) {
540 $this->accessDenied();
541
542 return;
543 }
544 }
545
546 //edit values, they are valid we already checked them above
547 foreach ($all_fields as $field) {
548 $record_obj->setRecordFieldValueFromForm($field->getId(), $this->form);
549 }
550
551 // Do we need to set a new owner for this record?
552 if (!$create_mode) {
553 $owner_id = ilObjUser::_lookupId($_POST['field_owner']);
554 if (!$owner_id) {
555 $this->sendFailure($this->lng->txt('user_not_known'));
556
557 return;
558 }
559 $record_obj->setOwner($owner_id);
560 }
561
562 $dispatchEvent = "update";
563
564 $dispatchEventData = array(
565 'dcl' => $this->parent_obj->getDataCollectionObject(),
566 'table_id' => $this->table_id,
567 'record_id' => $record_obj->getId(),
568 'record' => $record_obj,
569 );
570
571 if ($create_mode) {
572 $dispatchEvent = "create";
573 ilObjDataCollection::sendNotification("new_record", $this->table_id, $record_obj->getId());
574 } else {
575 $dispatchEventData['prev_record'] = $unchanged_obj;
576 }
577
578 $record_obj->doUpdate($create_mode);
579
580 $ilAppEventHandler->raise(
581 'Modules/DataCollection',
582 $dispatchEvent . 'Record',
583 $dispatchEventData
584 );
585
586 $this->ctrl->setParameter($this, "table_id", $this->table_id);
587 $this->ctrl->setParameter($this, "tableview_id", $this->tableview_id);
588 $this->ctrl->setParameter($this, "record_id", $this->record_id);
589
590 if (!$this->ctrl->isAsynch()) {
591 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
592 }
593
595 if ($this->ctrl->isAsynch()) {
596 // If ajax request, return the form in edit mode again
597 $this->record_id = $record_obj->getId();
598 $this->initForm();
599 $this->setFormValues();
600 echo $this->tpl->getMessageHTML($this->lng->txt('msg_obj_modified'), 'success') . $this->form->getHTML();
601 exit();
602 } else {
603 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
604 }
605 } else {
606 // Form not valid...
607 //TODO: URL title flushes on invalid form
608 $this->form->setValuesByPost();
609 if ($this->ctrl->isAsynch()) {
610 echo $this->form->getHTML();
611 exit();
612 } else {
613 $this->tpl->setContent($this->getLanguageJsKeys() . $this->form->getHTML());
614 }
615 }
616 }
617
618
623 protected function checkAndPerformRedirect($force_redirect = false)
624 {
625 if ($force_redirect || (isset($_GET['redirect']) && !$this->ctrl->isAsynch())) {
626 switch ((int) $_GET['redirect']) {
628 $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'record_id', $this->record_id);
629 $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'table_id', $this->table_id);
630 $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'tableview_id', $this->tableview_id);
631 $this->ctrl->redirectByClass("ilDclDetailedViewGUI", "renderRecord");
632 break;
634 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
635 break;
636 default:
637 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
638 }
639 }
640 }
641
642
643 protected function accessDenied()
644 {
645 if (!$this->ctrl->isAsynch()) {
646 ilUtil::sendFailure($this->lng->txt('dcl_msg_no_perm_edit'), true);
647 $this->ctrl->redirectByClass('ildclrecordlistgui', 'listRecords');
648 } else {
649 echo $this->lng->txt('dcl_msg_no_perm_edit');
650 exit();
651 }
652 }
653
654
658 protected function sendFailure($message)
659 {
660 $keep = ($this->ctrl->isAsynch()) ? false : true;
661 $this->form->setValuesByPost();
662 if ($this->ctrl->isAsynch()) {
663 echo $this->tpl->getMessageHTML($message, 'failure') . $this->form->getHTML();
664 exit();
665 } else {
667 $this->tpl->setContent($this->getLanguageJsKeys() . $this->form->getHTML());
668 }
669 }
670
671
675 public function searchObjects()
676 {
677 $search = $_POST['search_for'];
678 $dest = $_POST['dest'];
679 $html = "";
680 include_once './Services/Search/classes/class.ilQueryParser.php';
681 $query_parser = new ilQueryParser($search);
682 $query_parser->setMinWordLength(1, true);
683 $query_parser->setCombination(QP_COMBINATION_AND);
684 $query_parser->parse();
685 if (!$query_parser->validate()) {
686 $html .= $query_parser->getMessage() . "<br />";
687 }
688
689 // only like search since fulltext does not support search with less than 3 characters
690 include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
691 $object_search = new ilLikeObjectSearch($query_parser);
692 $res = $object_search->performSearch();
693 //$res->setRequiredPermission('copy');
694 $res->filter(ROOT_FOLDER_ID, true);
695
696 if (!count($results = $res->getResultsByObjId())) {
697 $html .= $this->lng->txt('dcl_no_search_results_found_for') . ' ' . $search . "<br />";
698 }
700
701 foreach ($results as $entry) {
702 $tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
703 foreach ((array) $entry['refs'] as $reference) {
704 include_once './Services/Tree/classes/class.ilPathGUI.php';
705 $path = new ilPathGUI();
706 $tpl->setCurrentBlock('result');
707 $tpl->setVariable('RESULT_PATH', $path->getPath(ROOT_FOLDER_ID, $reference) . " ยป " . $entry['title']);
708 $tpl->setVariable('RESULT_REF', $reference);
709 $tpl->setVariable('FIELD_ID', $dest);
710 $tpl->parseCurrentBlock();
711 }
712 $html .= $tpl->get();
713 }
714
715 echo $html;
716 exit;
717 }
718
719
720 protected function getLanguageJsKeys()
721 {
722 return "<script>ilDataCollection.strings.add_value='" . $this->lng->txt('add_value') . "';</script>";
723 }
724
725
733 protected function parseSearchResults($a_res)
734 {
735 $rows = array();
736 foreach ($a_res as $obj_id => $references) {
737 $r = array();
738 $r['title'] = ilObject::_lookupTitle($obj_id);
739 $r['desc'] = ilObject::_lookupDescription($obj_id);
740 $r['obj_id'] = $obj_id;
741 $r['refs'] = $references;
742 $rows[] = $r;
743 }
744
745 return $rows;
746 }
747
748
752 protected function cleanupTempFiles()
753 {
754 $ilfilehash = (isset($_POST['ilfilehash'])) ? $_POST['ilfilehash'] : null;
755 if ($ilfilehash != null) {
756 $this->form->cleanupTempFiles($ilfilehash);
757 }
758 }
759
760
764 public function getForm()
765 {
766 return $this->form;
767 }
768}
user()
Definition: user.php:4
$path
Definition: aliased.php:25
exit
Definition: backend.php:16
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
const IL_CAL_DATETIME
const QP_COMBINATION_AND
Confirmation screen class.
@classDescription Date and time handling
Class ilDclBaseRecordModel.
setLastUpdate($a_datetime)
Set Last Update Date.
setRecordFieldValueFromForm($field_id, &$form)
Set a field value.
setCreateDate($a_datetime)
Set Creation Date.
doUpdate($omit_notification=false)
doUpdate
static getRecordFieldCache($record, $field)
static getTableCache($table_id=0)
static getRecordCache($record_id=0)
static getRecordRepresentation(ilDclBaseRecordFieldModel $record_field)
Returns a record representation.
static getFieldRepresentation(ilDclBaseFieldModel $field)
static getRecordRepresentationInstance(ilDclBaseRecordFieldModel $record_field)
Get RecordRepresentation from RecordFieldModel.
Class ilDclBaseFieldModel.
Class ilDclMobRecordFieldModel.
Class ilDclPropertyFormGUI.
static rebuildTempFileByHash($hash)
Return temp files.
Class ilDclRecordEditGUI.
confirmDelete()
Delete confirmation.
parseSearchResults($a_res)
Parse search results.
__construct(ilObjDataCollectionGUI $parent_obj)
getRecordData($record_id=0)
Return All fields and values from a record ID.
searchObjects()
This function is only used by the ajax request if searching for ILIAS references.
cancelDelete()
Cancel deletion.
setFormValues()
Set values from object to form.
cleanupTempFiles()
Cleanup temp-files.
checkAndPerformRedirect($force_redirect=false)
Checkes to what view (table or detail) should be redirected and performs redirect.
const REDIRECT_RECORD_LIST
Possible redirects after saving/updating a record - use GET['redirect'] to set constants.
create()
Create new record gui.
This class represents a hidden form property in a property form.
static hasEditAccess($ref, $user_id=0)
Has permission to view and edit all entries event when he is not the owner.
static hasPermissionToAddRecord($ref_id, $table_id)
Class ilObjDataCollectionGUI.
static _lookupId($a_user_str)
Lookup id by login.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
Creates a path for a start and endnode.
special template class to simplify handling of ITX/PEAR
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$key
Definition: croninfo.php:18
$valid
$html
Definition: example_001.php:87
$r
Definition: example_031.php:79
global $ilCtrl
Definition: ilias.php:18
catch(Exception $e) $message
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$results
Definition: svg-scanner.php:47
$ilUser
Definition: imgupload.php:18
$data
Definition: bench.php:6
$rows
Definition: xhr_table.php:10