4 require_once
"./Services/Badge/interfaces/interface.ilBadgeTypeGUI.php";
24 $this->parent_ref_id = (int) $a_parent_ref_id;
26 $lng->loadLanguageModule(
"trac");
28 include_once
"Services/Form/classes/class.ilRepositorySelector2InputGUI.php";
32 $exp->setSkipRootNode(
true);
33 $exp->setRootId($this->parent_ref_id);
35 $exp->setSelectableTypes(
$white);
36 if (!in_array(
"fold",
$white)) {
39 $exp->setTypeWhiteList(
$white);
44 $mode = $olp->getModeText($olp->getCurrentMode());
45 if (in_array($olp->getCurrentMode(), $invalid_modes)) {
46 $mode =
"<strong>$mode</strong>";
51 $subitems->setRequired(
true);
65 array_shift($sub_items);
67 include_once
"Services/Object/classes/class.ilObjectLP.php";
68 foreach ($sub_items as $node) {
72 if (
sizeof($modes) > 1) {
73 $res[] = $node[
"type"];
88 if (is_array($a_config[
"subitems"])) {
90 $items->setValue($a_config[
"subitems"]);
128 return array(
"subitems" => $a_form->
getInput(
"subitems"));
139 include_once
"Services/Object/classes/class.ilObjectLP.php";
140 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
141 include_once
"Services/Tracking/classes/class.ilObjUserTracking.php";
176 return $invalid_modes;
187 include_once
"Services/Object/classes/class.ilObjectLP.php";
188 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
189 include_once
"Services/Tracking/classes/class.ilObjUserTracking.php";
191 $invalid_modes = self::getInvalidLPModes();
193 foreach ($a_form->
getInput(
"subitems") as $ref_id) {
196 if (in_array($olp->getCurrentMode(), $invalid_modes)) {
201 if (
sizeof($invalid)) {
202 $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
foreach($_POST as $key=> $value) $res
static _lookupObjId($a_id)
Badge type gui interface.
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.