ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
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 string | LIST_MODE_UNDEFINED = 'undefined' |
const string | LIST_MODE_ALL = 'all' |
const string | 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, $target_obj, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObject\getId(), ilObjectFactory\getInstanceByRefId(), ilObject\getRefId(), ilObject\getTitle(), ilObject\getType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\objectDefinition(), ILIAS\Repository\refinery(), setTargetId(), setTargetRefId(), setTargetTitle(), setTargetType(), and ILIAS\Repository\toolbar().
ilConditionHandlerGUI::add | ( | ?ilPropertyFormGUI | $form = null | ) |
Definition at line 500 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 1028 of file class.ilConditionHandlerGUI.php.
References ILIAS\Repository\ctrl().
|
protected |
Definition at line 440 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), ilConditionHandler\lookupObligatoryConditionsOfTarget(), ilConditionHandler\saveNumberOfRequiredTriggers(), and ilConditionHandler\updateObligatory().
ilConditionHandlerGUI::assign | ( | ) |
assign new trigger condition to target
Definition at line 517 of file class.ilConditionHandlerGUI.php.
References ILIAS\UI\examples\Symbol\Glyph\Add\add(), ILIAS\Repository\ctrl(), ilObjectLP\getInstance(), ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\lng(), ilConditionHandler\lookupPersistedHiddenStatusByTarget(), and ilConditionHandler\UNIQUE_CONDITIONS.
|
protected |
Definition at line 797 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilConditionHandler\_getPersistedConditionsOfTarget(), ilObject\_lookupTitle(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 859 of file class.ilConditionHandlerGUI.php.
References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
ilConditionHandlerGUI::edit | ( | ?ilPropertyFormGUI | $form = null | ) |
Definition at line 367 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), and ILIAS\Repository\ctrl().
|
protected |
Definition at line 1041 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
ilConditionHandlerGUI::executeCommand | ( | ) |
Definition at line 227 of file class.ilConditionHandlerGUI.php.
References $DIC, $ilErr, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
|
protected |
Definition at line 1215 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 1200 of file class.ilConditionHandlerGUI.php.
References $data, and ilConditionHandler\OPERATOR_RESULT_RANGE_PERCENTAGE.
ilConditionHandlerGUI::getAutomaticValidation | ( | ) |
Definition at line 254 of file class.ilConditionHandlerGUI.php.
References $automatic_validation.
ilConditionHandlerGUI::getBackButtons | ( | ) |
Definition at line 219 of file class.ilConditionHandlerGUI.php.
References ilSession\get(), and ilSession\has().
|
protected |
Definition at line 209 of file class.ilConditionHandlerGUI.php.
References $ch_obj.
ilConditionHandlerGUI::getConditionsOfTarget | ( | ) |
Definition at line 579 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget().
ilConditionHandlerGUI::getTargetId | ( | ) |
Definition at line 264 of file class.ilConditionHandlerGUI.php.
References $target_id.
ilConditionHandlerGUI::getTargetRefId | ( | ) |
Definition at line 274 of file class.ilConditionHandlerGUI.php.
References $target_ref_id.
Referenced by isTargetReferenced().
ilConditionHandlerGUI::getTargetTitle | ( | ) |
Definition at line 302 of file class.ilConditionHandlerGUI.php.
References $target_title.
ilConditionHandlerGUI::getTargetType | ( | ) |
Definition at line 284 of file class.ilConditionHandlerGUI.php.
References $target_type.
|
protected |
Definition at line 735 of file class.ilConditionHandlerGUI.php.
References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 884 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ILIAS\Repository\ctrl(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilConditionHandler\lookupObligatoryConditionsOfTarget(), ilConditionHandler\lookupPersistedHiddenStatusByTarget(), ILIAS\Repository\objectDefinition(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 100 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 111 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http().
|
private |
Definition at line 1073 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilLPObjSettings\_mode2Text(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilConditionHandler\OPERATOR_LP, and ilConditionHandler\OPERATOR_RESULT_RANGE_PERCENTAGE.
|
private |
Definition at line 596 of file class.ilConditionHandlerGUI.php.
|
protected |
Definition at line 126 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http().
|
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().
|
protected |
Definition at line 1144 of file class.ilConditionHandlerGUI.php.
References ilCourseObjective\_getObjectiveIds(), ilObject\_lookupType(), ilObjectFactory\getInstanceByRefId(), ilCourseConstants\IL_CRS_VIEW_OBJECTIVE, ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
|
protected |
Definition at line 167 of file class.ilConditionHandlerGUI.php.
References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
ilConditionHandlerGUI::isTargetReferenced | ( | ) |
Check if target has refernce id.
Definition at line 297 of file class.ilConditionHandlerGUI.php.
References getTargetRefId().
|
protected |
Definition at line 699 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\getPersistedOptionalConditionsOfTarget(), and ILIAS\Repository\lng().
|
protected |
Definition at line 977 of file class.ilConditionHandlerGUI.php.
References $data, ilConditionHandler\_getPersistedConditionsOfTarget(), ILIAS\Repository\ctrl(), ilConditionHandler\getPersistedOptionalConditionsOfTarget(), ILIAS\Repository\lng(), ilConditionHandler\saveNumberOfRequiredTriggers(), and ilConditionHandler\updateObligatory().
|
protected |
Definition at line 754 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getPersistedConditionsOfTarget(), ilConditionHandler\calculatePersistedRequiredTriggers(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ilConditionHandler\updateObligatory().
|
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 1290 of file class.ilConditionHandlerGUI.php.
References $data, ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\lng(), and ilConditionHandler\lookupPersistedHiddenStatusByTarget().
ilConditionHandlerGUI::selector | ( | ) |
Definition at line 482 of file class.ilConditionHandlerGUI.php.
References ILIAS\Repository\lng().
ilConditionHandlerGUI::setAutomaticValidation | ( | bool | $a_status | ) |
Definition at line 249 of file class.ilConditionHandlerGUI.php.
ilConditionHandlerGUI::setBackButtons | ( | array | $a_btn_arr | ) |
Definition at line 214 of file class.ilConditionHandlerGUI.php.
References ilSession\set().
ilConditionHandlerGUI::setTargetId | ( | int | $a_target_id | ) |
Definition at line 259 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
ilConditionHandlerGUI::setTargetRefId | ( | int | $a_target_ref_id | ) |
Definition at line 269 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
ilConditionHandlerGUI::setTargetTitle | ( | string | $a_target_title | ) |
Definition at line 289 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
ilConditionHandlerGUI::setTargetType | ( | string | $a_target_type | ) |
Definition at line 279 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
|
protected |
Definition at line 310 of file class.ilConditionHandlerGUI.php.
|
static |
Definition at line 178 of file class.ilConditionHandlerGUI.php.
References $DIC, $lng, ilObject\_lookupType(), ilLPObjSettings\_mode2Text(), ilLanguage\loadLanguageModule(), ilCourseObjective\lookupObjectiveTitle(), ilConditionHandler\OPERATOR_LP, ilConditionHandler\OPERATOR_RESULT_RANGE_PERCENTAGE, and ilLanguage\txt().
Referenced by ilObjectListGUI\parseConditions(), and ILIAS\Conditions\Configuration\ConditionTriggerProvider\read().
ilConditionHandlerGUI::updateCondition | ( | ) |
Definition at line 384 of file class.ilConditionHandlerGUI.php.
References ilConditionHandler\_getCondition(), ilLPStatusWrapper\_refreshStatus(), ILIAS\Repository\ctrl(), ilObjectLP\getInstance(), 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 1231 of file class.ilConditionHandlerGUI.php.
References $data, ilConditionHandler\_getCondition(), ILIAS\Repository\ctrl(), 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.
Referenced by translateOperator().
|
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().
|
protected |
Definition at line 60 of file class.ilConditionHandlerGUI.php.
Referenced by __construct().
|
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.