4 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
36 $this->container = $a_container_obj;
70 public function initForm($a_as_multi_assignment = FALSE)
72 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
74 $form->setTitle($this->lng->txt(
'crs_loc_tst_assignment'));
75 $form->setFormAction($this->ctrl->getFormAction($this->getGUI()));
77 if($a_as_multi_assignment)
79 $form->addCommandButton(
'saveMultiTestAssignment', $this->lng->txt(
'save'));
83 $form->addCommandButton(
'saveTest', $this->lng->txt(
'save'));
89 $form->setTitle($this->lng->txt(
'crs_loc_settings_itest_tbl'));
93 $form->setTitle($this->lng->txt(
'crs_loc_settings_qtest_tbl'));
102 $cr_mode->setValue(self::TEST_NEW);
104 $new =
new ilRadioOption($this->lng->txt(
'crs_loc_form_tst_new'),self::TEST_NEW);
109 $new->setInfo($this->lng->txt(
"crs_loc_form_tst_new_initial_info"));
113 $new->setInfo($this->lng->txt(
"crs_loc_form_tst_new_qualified_info"));
121 $ti->setRequired(
true);
122 $new->addSubItem($ti);
128 $new->addSubItem($ta);
131 include_once
'./Modules/Test/classes/class.ilObjTest.php';
132 $this->lng->loadLanguageModule(
'assessment');
137 $this->lng->txt(
'tst_question_set_type_random'),
140 $qst->addOption($random);
143 $this->lng->txt(
'tst_question_set_type_fixed'),
146 $qst->addOption($fixed);
147 $new->addSubItem($qst);
148 $cr_mode->addOption(
$new);
151 $existing =
new ilRadioOption($this->lng->txt(
'crs_loc_form_assign'),self::TEST_ASSIGN);
156 $existing->setInfo($this->lng->txt(
"crs_loc_form_assign_initial_info"));
160 $existing->setInfo($this->lng->txt(
"crs_loc_form_assign_qualified_info"));
166 $existing->setDisabled(
true);
168 $cr_mode->addOption($existing);
171 $options[
''] = $this->lng->txt(
'select_one');
172 foreach((
array) $assignable as $tst_ref_id)
177 $selectable =
new ilSelectInputGUI($this->lng->txt(
'crs_loc_form_available_tsts'),
'tst');
180 $existing->addSubItem($selectable);
182 $form->addItem($cr_mode);
185 if($a_as_multi_assignment)
187 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
190 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
194 $options[
''] = $this->lng->txt(
'select_one');
195 foreach($objective_ids as $oid)
197 $already_assigned_tst = $assignments->getTestByObjective($oid, $this->
getTestType());
198 if(!$already_assigned_tst)
204 $objective =
new ilSelectInputGUI($this->lng->txt(
'crs_objectives'),
'objective');
207 $form->addItem($objective);
220 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
224 foreach(
$GLOBALS[
'tree']->getChildsByType($this->
getContainer()->getRefId(),
'tst') as $tree_node)
226 if(!in_array($tree_node[
'child'], $assignments->getTests()))
228 $tests[] = $tree_node[
'child'];
static getInstanceByObjId($a_obj_id)
get singleton instance
This class represents an option in a radio group.
static getInstance($a_container_id)
Get instance by container id.
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
Class ilObject Basic functions for all objects.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getObjectiveIds($course_id, $a_activated_only=false)
static _lookupTitle($a_id)
lookup object title
if(!is_array($argv)) $options
static _lookupObjId($a_id)
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
setMaxLength($a_maxlength)
Set Max Length.
Create styles array
The data for the language used.
This class represents a text area property in a property form.
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
const TYPE_TEST_QUALIFIED