ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
|
class ilConditionHandlerGUI More...
Public Member Functions | |
__construct (?int $a_ref_id=null) | |
setBackButtons (array $a_btn_arr) | |
getBackButtons () | |
executeCommand () | |
setAutomaticValidation (bool $a_status) | |
getAutomaticValidation () | |
setTargetId (int $a_target_id) | |
getTargetId () | |
setTargetRefId (int $a_target_ref_id) | |
getTargetRefId () | |
setTargetType (string $a_target_type) | |
getTargetType () | |
setTargetTitle (string $a_target_title) | |
isTargetReferenced () | |
Check if target has refernce id. More... | |
getTargetTitle () | |
edit (?ilPropertyFormGUI $form=null) | |
updateCondition () | |
selector () | |
add (?ilPropertyFormGUI $form=null) | |
assign () | |
assign new trigger condition to target More... | |
getConditionsOfTarget () | |
Static Public Member Functions | |
static | translateOperator (int $a_obj_id, string $a_operator, string $value='') |
Protected Member Functions | |
initConditionIdFromQuery () | |
initConditionsIdsFromPost () | |
initItemIdsFromPost () | |
initObligatoryItemsFromPost () | |
initListModeFromPost () | |
initSourceIdFromQuery () | |
getConditionHandler () | |
showObligatoryForm (string $list_mode=self::LIST_MODE_ALL) | |
adjustConditionsAfterDeletion () | |
listConditions (bool $load_form_with_request=false) | |
handleConditionTriggerTableActions () | |
saveCompulsoryStatus () | |
confirmDeleteConditionTrigger () | |
deleteConditionTrigger () | |
initCompulsoryForm (bool $with_request=false) | |
saveCompulsoryForm () | |
addConditionTrigger (bool $with_request=false) | |
editConditionTrigger (bool $with_request=false) | |
initRangeConditionInputItem (int $trigger_ref_id, int $trigger_obj_id, array $condition) | |
extractValueOptionsFromInput (array $data) | |
extractValueOptionsFromCondition (array $condition) | |
updateConditionTrigger () | |
saveConditionTrigger () | |
Protected Attributes | |
ilCtrl | $ctrl |
ilLanguage | $lng |
ilGlobalTemplateInterface | $tpl |
ilTree | $tree |
ilAccessHandler | $access |
ilToolbarGUI | $toolbar |
ilConditionUtil | $conditionUtil |
ilObjectDefinition | $objectDefinition |
ilConditionHandler | $ch_obj |
ilObject | $target_obj = null |
int | $target_id = 0 |
string | $target_type = '' |
string | $target_title = '' |
int | $target_ref_id = 0 |
bool | $automatic_validation = true |
Private Member Functions | |
initFormCondition (int $a_source_id, int $a_condition_id=0, string $a_mode='add') | |
initConditionTriggerForm (bool $with_request, int $trigger_id, int $condition_id, string $mode='add') | |
Private Attributes | |
const | LIST_MODE_UNDEFINED = 'undefined' |
const | LIST_MODE_ALL = 'all' |
const | LIST_MODE_SUBSET = 'subset' |
GlobalHttpState | $http |
Factory | $refinery |
UIFactory | $ui_factory |
UIRenderer | $ui_renderer |
class ilConditionHandlerGUI
Definition at line 40 of file class.ilConditionHandlerGUI.php.
ilConditionHandlerGUI::__construct | ( | ?int | $a_ref_id = null | ) |
Definition at line 68 of file class.ilConditionHandlerGUI.php.
References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObject\getId(), ilObjectFactory\getInstanceByRefId(), ilObject\getRefId(), ilObject\getTitle(), ilObject\getType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), null, ILIAS\Repository\objectDefinition(), ILIAS\Repository\refinery(), setTargetId(), setTargetRefId(), setTargetTitle(), setTargetType(), and ILIAS\Repository\toolbar().
ilConditionHandlerGUI::add | ( | ?ilPropertyFormGUI | $form = null | ) |
Definition at line 499 of file class.ilConditionHandlerGUI.php.
References initFormCondition(), initSourceIdFromQuery(), and selector().
Referenced by assign().
|
protected |
Definition at line 1027 of file class.ilConditionHandlerGUI.php.
References ILIAS\Repository\ctrl(), initConditionTriggerForm(), initSourceIdFromQuery(), and selector().
Referenced by saveConditionTrigger().
|
protected |
Definition at line 439 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), getTargetId(), getTargetRefId(), ilConditionHandler\lookupObligatoryConditionsOfTarget(), ilConditionHandler\saveNumberOfRequiredTriggers(), and ilConditionHandler\updateObligatory().
Referenced by deleteConditionTrigger().
ilConditionHandlerGUI::assign | ( | ) |
assign new trigger condition to target
Definition at line 516 of file class.ilConditionHandlerGUI.php.
References add(), ILIAS\Repository\ctrl(), getAutomaticValidation(), ilObjectLP\getInstance(), ilObjectFactory\getInstanceByRefId(), getTargetId(), getTargetRefId(), getTargetType(), initFormCondition(), initItemIdsFromPost(), initSourceIdFromQuery(), ILIAS\Repository\lng(), ilConditionHandler\lookupPersistedHiddenStatusByTarget(), null, selector(), and ilConditionHandler\UNIQUE_CONDITIONS.
|
protected |
Definition at line 796 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilConditionHandler\_getPersistedConditionsOfTarget(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), getTargetId(), getTargetRefId(), getTargetType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
Referenced by handleConditionTriggerTableActions().
|
protected |
Definition at line 858 of file class.ilConditionHandlerGUI.php.
References adjustConditionsAfterDeletion(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), listConditions(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
ilConditionHandlerGUI::edit | ( | ?ilPropertyFormGUI | $form = null | ) |
Definition at line 366 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ILIAS\Repository\ctrl(), initConditionIdFromQuery(), initFormCondition(), and listConditions().
Referenced by updateCondition().
|
protected |
Definition at line 1040 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), initConditionIdFromQuery(), initConditionTriggerForm(), listConditions(), and ILIAS\Repository\refinery().
Referenced by handleConditionTriggerTableActions(), and updateConditionTrigger().
ilConditionHandlerGUI::executeCommand | ( | ) |
Definition at line 226 of file class.ilConditionHandlerGUI.php.
References $DIC, $ilErr, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
|
protected |
Definition at line 1204 of file class.ilConditionHandlerGUI.php.
Referenced by initRangeConditionInputItem().
|
protected |
Definition at line 1189 of file class.ilConditionHandlerGUI.php.
References null, and ilConditionHandler\OPERATOR_RESULT_RANGE_PERCENTAGE.
Referenced by saveConditionTrigger(), and updateConditionTrigger().
ilConditionHandlerGUI::getAutomaticValidation | ( | ) |
Definition at line 253 of file class.ilConditionHandlerGUI.php.
References $automatic_validation.
Referenced by assign(), and saveConditionTrigger().
ilConditionHandlerGUI::getBackButtons | ( | ) |
Definition at line 218 of file class.ilConditionHandlerGUI.php.
References ilSession\get(), and ilSession\has().
|
protected |
Definition at line 208 of file class.ilConditionHandlerGUI.php.
References $ch_obj.
Referenced by selector().
ilConditionHandlerGUI::getConditionsOfTarget | ( | ) |
Definition at line 578 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), getTargetId(), getTargetRefId(), and getTargetType().
ilConditionHandlerGUI::getTargetId | ( | ) |
Definition at line 263 of file class.ilConditionHandlerGUI.php.
References $target_id.
Referenced by adjustConditionsAfterDeletion(), assign(), confirmDeleteConditionTrigger(), getConditionsOfTarget(), initCompulsoryForm(), listConditions(), saveCompulsoryForm(), saveCompulsoryStatus(), saveConditionTrigger(), and showObligatoryForm().
ilConditionHandlerGUI::getTargetRefId | ( | ) |
Definition at line 273 of file class.ilConditionHandlerGUI.php.
References $target_ref_id.
Referenced by adjustConditionsAfterDeletion(), assign(), confirmDeleteConditionTrigger(), getConditionsOfTarget(), initCompulsoryForm(), isTargetReferenced(), listConditions(), saveCompulsoryForm(), saveCompulsoryStatus(), saveConditionTrigger(), selector(), showObligatoryForm(), updateCondition(), and updateConditionTrigger().
ilConditionHandlerGUI::getTargetTitle | ( | ) |
Definition at line 301 of file class.ilConditionHandlerGUI.php.
References $target_title.
Referenced by initFormCondition().
ilConditionHandlerGUI::getTargetType | ( | ) |
Definition at line 283 of file class.ilConditionHandlerGUI.php.
References $target_type.
Referenced by assign(), confirmDeleteConditionTrigger(), getConditionsOfTarget(), initCompulsoryForm(), initFormCondition(), listConditions(), saveCompulsoryForm(), saveCompulsoryStatus(), saveConditionTrigger(), and updateCondition().
|
protected |
Definition at line 734 of file class.ilConditionHandlerGUI.php.
References confirmDeleteConditionTrigger(), ILIAS\Repository\ctrl(), editConditionTrigger(), ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), and saveCompulsoryStatus().
|
protected |
Definition at line 883 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ILIAS\Repository\ctrl(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), getTargetId(), getTargetRefId(), getTargetType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilConditionHandler\lookupObligatoryConditionsOfTarget(), ilConditionHandler\lookupPersistedHiddenStatusByTarget(), null, ILIAS\Repository\objectDefinition(), ILIAS\Repository\refinery(), and ILIAS\UI\Implementation\Component\Input\withValue().
Referenced by listConditions(), and saveCompulsoryForm().
|
protected |
Definition at line 100 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
Referenced by edit(), editConditionTrigger(), updateCondition(), and updateConditionTrigger().
|
protected |
Definition at line 111 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
|
private |
Definition at line 1072 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), initRangeConditionInputItem(), ILIAS\Repository\lng(), and ilConditionHandler\OPERATOR_RESULT_RANGE_PERCENTAGE.
Referenced by addConditionTrigger(), editConditionTrigger(), saveConditionTrigger(), and updateConditionTrigger().
|
private |
Definition at line 595 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilConditionHandler\_isReferenceHandlingOptional(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilObjectLP\getInstance(), getTargetTitle(), getTargetType(), ILIAS\Repository\lng(), ilFormPropertyGUI\setInfo(), ilRadioGroupInputGUI\setValue(), ilConditionHandler\SHARED_CONDITIONS, and ilConditionHandler\UNIQUE_CONDITIONS.
Referenced by add(), assign(), edit(), and updateCondition().
|
protected |
Definition at line 126 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
Referenced by assign(), and updateCondition().
|
protected |
Definition at line 156 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 141 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 1133 of file class.ilConditionHandlerGUI.php.
References ilCourseObjective\_getObjectiveIds(), ilObject\_lookupType(), extractValueOptionsFromCondition(), ilObjectFactory\getInstanceByRefId(), ilCourseConstants\IL_CRS_VIEW_OBJECTIVE, ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation().
Referenced by initConditionTriggerForm().
|
protected |
Definition at line 167 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
Referenced by add(), addConditionTrigger(), assign(), and saveConditionTrigger().
ilConditionHandlerGUI::isTargetReferenced | ( | ) |
Check if target has refernce id.
Definition at line 296 of file class.ilConditionHandlerGUI.php.
References getTargetRefId().
|
protected |
Definition at line 698 of file class.ilConditionHandlerGUI.php.
References ILIAS\Repository\ctrl(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), getTargetId(), getTargetRefId(), getTargetType(), initCompulsoryForm(), and ILIAS\Repository\lng().
Referenced by deleteConditionTrigger(), edit(), editConditionTrigger(), saveCompulsoryForm(), updateCondition(), and updateConditionTrigger().
|
protected |
Definition at line 976 of file class.ilConditionHandlerGUI.php.
References $data, ilConditionHandler\_getPersistedConditionsOfTarget(), ILIAS\Repository\ctrl(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), getTargetId(), getTargetRefId(), getTargetType(), initCompulsoryForm(), listConditions(), ILIAS\Repository\lng(), ilConditionHandler\saveNumberOfRequiredTriggers(), and ilConditionHandler\updateObligatory().
|
protected |
Definition at line 753 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ilConditionHandler\calculatePersistedRequiredTriggers(), ILIAS\Repository\ctrl(), getTargetId(), getTargetRefId(), getTargetType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ilConditionHandler\updateObligatory().
Referenced by handleConditionTriggerTableActions().
|
protected |
switch ($this->getTargetType()) { case 'st': $this->ch_obj->setReferenceHandlingType((int) $form->getInput('ref_handling')); break; default: $this->ch_obj->setReferenceHandlingType(ilConditionHandler::UNIQUE_CONDITIONS); break; }
this has to be changed, if non referenced trigger are implemted $this->ch_obj->setOperator($form->getInput('operator')); $this->ch_obj->setObligatory((bool) $form->getInput('obligatory')); $this->ch_obj->setHiddenStatus(ilConditionHandler::lookupPersistedHiddenStatusByTarget($this->getTargetRefId())); $this->ch_obj->setValue('');
Save assigned sco's if ($this->ch_obj->getTriggerType() === 'sahs') { $olp = ilObjectLP::getInstance($this->ch_obj->getTriggerObjId()); $collection = $olp->getCollectionInstance(); if ($collection) { $collection->delete(); }
$items_ids = $this->initItemIdsFromPost(); if (count($items_ids)) { // #12901 $collection->activateEntries($items_ids->toArray()); } }
Definition at line 1279 of file class.ilConditionHandlerGUI.php.
References $data, addConditionTrigger(), ILIAS\Repository\ctrl(), extractValueOptionsFromInput(), getAutomaticValidation(), ilObjectFactory\getInstanceByRefId(), getTargetId(), getTargetRefId(), getTargetType(), initConditionTriggerForm(), initSourceIdFromQuery(), ILIAS\Repository\lng(), and ilConditionHandler\lookupPersistedHiddenStatusByTarget().
ilConditionHandlerGUI::selector | ( | ) |
Definition at line 481 of file class.ilConditionHandlerGUI.php.
References getConditionHandler(), getTargetRefId(), and ILIAS\Repository\lng().
Referenced by add(), addConditionTrigger(), and assign().
ilConditionHandlerGUI::setAutomaticValidation | ( | bool | $a_status | ) |
Definition at line 248 of file class.ilConditionHandlerGUI.php.
ilConditionHandlerGUI::setBackButtons | ( | array | $a_btn_arr | ) |
Definition at line 213 of file class.ilConditionHandlerGUI.php.
References ilSession\set().
ilConditionHandlerGUI::setTargetId | ( | int | $a_target_id | ) |
Definition at line 258 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
ilConditionHandlerGUI::setTargetRefId | ( | int | $a_target_ref_id | ) |
Definition at line 268 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
ilConditionHandlerGUI::setTargetTitle | ( | string | $a_target_title | ) |
Definition at line 288 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
ilConditionHandlerGUI::setTargetType | ( | string | $a_target_type | ) |
Definition at line 278 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
|
protected |
Definition at line 309 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ILIAS\Repository\ctrl(), getTargetId(), getTargetRefId(), ILIAS\Repository\lng(), ilConditionHandler\lookupObligatoryConditionsOfTarget(), ilConditionHandler\lookupPersistedHiddenStatusByTarget(), null, ILIAS\Repository\objectDefinition(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), and ilRadioGroupInputGUI\setValue().
|
static |
Definition at line 178 of file class.ilConditionHandlerGUI.php.
References $DIC, ilObject\_lookupType(), ilLPObjSettings\_mode2Text(), ilLanguage\loadLanguageModule(), ilCourseObjective\lookupObjectiveTitle(), ilConditionHandler\OPERATOR_LP, ilConditionHandler\OPERATOR_RESULT_RANGE_PERCENTAGE, and ilLanguage\txt().
Referenced by ilInfoScreenGUI\addPreconditionSection(), ilObjectListGUI\parseConditions(), and ILIAS\Conditions\Configuration\ConditionTriggerProvider\read().
ilConditionHandlerGUI::updateCondition | ( | ) |
Definition at line 383 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilLPStatusWrapper\_refreshStatus(), ILIAS\Repository\ctrl(), edit(), ilObjectLP\getInstance(), getTargetRefId(), getTargetType(), initConditionIdFromQuery(), initFormCondition(), initItemIdsFromPost(), listConditions(), ILIAS\Repository\lng(), and ilConditionHandler\UNIQUE_CONDITIONS.
|
protected |
switch ($this->getTargetType()) { case 'st': $condition_handler->setReferenceHandlingType((int) $form->getInput('ref_handling')); break; default: $condition_handler->setReferenceHandlingType(ilConditionHandler::UNIQUE_CONDITIONS); break; } $condition_handler->updateCondition($condition['id']);
Update relevant sco's if ($condition['trigger_type'] === 'sahs') { $olp = ilObjectLP::getInstance($condition['trigger_obj_id']); $collection = $olp->getCollectionInstance(); if ($collection) { $collection->delete(); } $item_ids = $this->initItemIdsFromPost(); if (count($item_ids)) { // #12901 $collection->activateEntries($item_ids->toArray()); } ilLPStatusWrapper::_refreshStatus($condition['trigger_obj_id']); } $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true); $this->ctrl->redirect($this, 'listConditions');
Definition at line 1220 of file class.ilConditionHandlerGUI.php.
References $data, ilConditionHandler\_getCondition(), ILIAS\Repository\ctrl(), editConditionTrigger(), extractValueOptionsFromInput(), getTargetRefId(), initConditionIdFromQuery(), initConditionTriggerForm(), listConditions(), and ILIAS\Repository\lng().
|
protected |
Definition at line 50 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 66 of file class.ilConditionHandlerGUI.php.
Referenced by getAutomaticValidation().
|
protected |
Definition at line 59 of file class.ilConditionHandlerGUI.php.
Referenced by getConditionHandler().
|
protected |
Definition at line 52 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 46 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 54 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 47 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 53 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 55 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 61 of file class.ilConditionHandlerGUI.php.
Referenced by getTargetId().
Definition at line 60 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 64 of file class.ilConditionHandlerGUI.php.
Referenced by getTargetRefId().
|
protected |
Definition at line 63 of file class.ilConditionHandlerGUI.php.
Referenced by getTargetTitle().
|
protected |
Definition at line 62 of file class.ilConditionHandlerGUI.php.
Referenced by getTargetType().
|
protected |
Definition at line 51 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 48 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 49 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 56 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 57 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 43 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 44 of file class.ilConditionHandlerGUI.php.
|
private |
Definition at line 42 of file class.ilConditionHandlerGUI.php.