4 require_once
"./Services/Badge/interfaces/interface.ilBadgeTypeGUI.php";
22 $this->parent_ref_id = (int)$a_parent_ref_id;
24 $lng->loadLanguageModule(
"trac");
26 include_once
"Services/Form/classes/class.ilRepositorySelector2InputGUI.php";
30 $exp->setSkipRootNode(
true);
31 $exp->setRootId($this->parent_ref_id);
32 $exp->setTypeWhiteList($this->
getLPTypes($this->parent_ref_id));
37 $mode = $olp->getModeText($olp->getCurrentMode());
38 if(in_array($olp->getCurrentMode(), $invalid_modes))
40 $mode =
"<strong>$mode</strong>";
45 $subitems->setRequired(
true);
55 $root = $tree->getNodeData($a_parent_ref_id);
56 $sub_items = $tree->getSubTree($root);
57 array_shift($sub_items);
59 include_once
"Services/Object/classes/class.ilObjectLP.php";
60 foreach($sub_items as $node)
66 if(
sizeof($modes) > 1)
68 $res[] = $node[
"type"];
80 if(is_array($a_config[
"subitems"]))
83 $items->setValue($a_config[
"subitems"]);
132 include_once
"Services/Object/classes/class.ilObjectLP.php";
133 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
134 include_once
"Services/Tracking/classes/class.ilObjUserTracking.php";
170 return $invalid_modes;
179 include_once
"Services/Object/classes/class.ilObjectLP.php";
180 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
181 include_once
"Services/Tracking/classes/class.ilObjUserTracking.php";
183 $invalid_modes = self::getInvalidLPModes();
189 if(in_array($olp->getCurrentMode(), $invalid_modes))
197 $mess = sprintf($lng->txt(
"badge_course_lp_invalid"), implode(
", ", $invalid));
getLPTypes($a_parent_ref_id)
importConfigToForm(ilPropertyFormGUI $a_form, array $a_config)
Set form values.
static getTypeClass($a_type)
const LP_MODE_MANUAL_BY_TUTOR
static isSupportedObjectType($a_type)
const LP_MODE_COLLECTION_MANUAL
static _lookupTitle($a_id)
lookup object title
const LP_MODE_COLLECTION_TLT
initConfigForm(ilPropertyFormGUI $a_form, $a_parent_ref_id)
Add custom fields to form.
static getInvalidLPModes()
Get invalid lp modes.
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _lookupObjId($a_id)
Badge type gui interface.
Create styles array
The data for the language used.
validateForm(ilPropertyFormGUI $a_form)
Custom form validation.
const LP_MODE_DEACTIVATED
const LP_MODE_COLLECTION_MOBS
static getInstance($a_obj_id)
getConfigFromForm(ilPropertyFormGUI $a_form)
Export values to DB.