43 $this->parent_obj = $a_parent;
49 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
61 return self::$instance;
63 return self::$instance =
new self($a_parent);
77 $this->section = $a_section;
91 return (array) $this->failures_by_section[$a_section];
101 $this->failures_by_section[$a_section][] = $a_failure_msg_key;
110 $this->cmd_class = $a_cmd_class;
149 #if(!$this->getMaterialsStatus(false)) 151 # return 'materials'; 155 return 'showObjectiveCreation';
162 return 'testOverview';
168 return 'testOverview';
172 return 'listObjectives';
174 return 'listObjectives';
183 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
185 $list->setHeading($this->lng->txt(
'crs_objective_status_configure'));
192 $list->addEntry($this->lng->txt(
'crs_objective_status_settings'),
193 $this->ctrl->getLinkTarget($this->
getCmdClass(),
'settings'),
197 ($this->section == self::SECTION_SETTINGS),
205 $list->addEntry($this->lng->txt(
'crs_objective_status_objective_creation'),
207 ? $this->ctrl->getLinkTarget($this->
getCmdClass(),
'listObjectives')
208 : $this->ctrl->getLinkTarget($this->
getCmdClass(),
'showObjectiveCreation'),
212 ($this->section == self::SECTION_OBJECTIVES_NEW),
220 $this->ctrl->setParameterByClass(
'ilobjcoursegui',
'cmd',
'enableAdministrationPanel');
221 $list->addEntry($this->lng->txt(
'crs_objective_status_materials'),
222 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegui',
''),
226 ($this->section == self::SECTION_MATERIALS),
237 $this->ctrl->setParameter($this->
getCmdClass(),
'tt', 1);
239 $list->addEntry($this->lng->txt(
'crs_objective_status_itest'),
240 $this->ctrl->getLinkTarget($this->
getCmdClass(),
'testOverview'),
244 ($this->section == self::SECTION_ITES),
253 $this->ctrl->setParameter($this->
getCmdClass(),
'tt', 2);
255 $list->addEntry($this->lng->txt(
'crs_objective_status_qtest'),
256 $this->ctrl->getLinkTarget($this->
getCmdClass(),
'testOverview'),
260 ($this->section == self::SECTION_QTEST),
270 $list->addEntry($this->lng->txt(
'crs_objective_status_objectives'),
271 $this->ctrl->getLinkTarget($this->
getCmdClass(),
'listObjectives'),
275 ($this->section == self::SECTION_OBJECTIVES),
279 return $list->getHTML();
293 foreach($this->
getFailures($a_section) as $failure_code)
295 $mess[] = $this->lng->txt($failure_code);
325 foreach((array) $childs as $tnode)
327 if($tnode[
'type'] ==
'rolf')
331 if($tnode[
'child'] == $this->
getSettings()->getInitialTest())
335 if($tnode[
'child'] == $this->
getSettings()->getQualifiedTest())
343 $this->
appendFailure(self::SECTION_MATERIALS,
'crs_loc_err_stat_no_materials');
351 if(!
$GLOBALS[
'tree']->isInTree($tst_ref))
355 $this->
appendFailure(self::SECTION_ITES,
'crs_loc_err_stat_no_it');
364 $tst_ref = $this->
getSettings()->getQualifiedTest();
365 if(!
$GLOBALS[
'tree']->isInTree($tst_ref))
369 $this->
appendFailure(self::SECTION_QTEST,
'crs_loc_err_stat_no_qt');
382 include_once
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
387 include_once
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
389 $this->parent_obj->getId(),
403 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
422 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
428 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_lo');
434 include_once
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
436 if(!count($obj->getMaterials()))
440 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_mat');
453 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_qst');
463 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_qst');
472 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_nr_tries_exceeded');
495 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
497 $tst = $factory->getInstanceByRefId($qt,
false);
503 $tries = $tst->getNrOfTries();
512 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
515 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$obj_tries);
516 return $obj_tries <= $tries;
getQualifiedTestStatus($a_set_errors=true)
static getInstanceByObjId($a_obj_id)
get singleton instance
getFailures($a_section)
Get failures by section.
getMaterialsStatus($a_set_errors=true)
Get status of materials.
static lookupMaxPasses($a_objective_id)
lookupQuestionsAssigned($a_test_ref_id)
Check if questions are assigned.
Presentation of the status of single steps during the configuration process.
Class ilObject Basic functions for all objects.
static _getObjectiveIds($course_id, $a_activated_only=false)
getObjectivesAvailableStatus()
Get objectives.
getFirstFailedStep()
Get first failed step.
class ilCourseObjectiveMaterials
static lookupSequence($a_container_id, $a_objective_id, $a_test_id)
setCmdClass($a_cmd_class)
Command class.
static lookupRandomTest($a_test_obj_id)
Check if test is a random test.
static getInstance(ilObject $a_parent)
Get instance.
static _lookupObjId($a_id)
appendFailure($a_section, $a_failure_msg_key)
Append failure.
setSection($a_section)
Set current section.
const SECTION_OBJECTIVES_NEW
getParentObject()
Get parent object.
getCmdClass()
Get cmd class.
static _getCountObjectives($a_obj_id, $a_activated_only=false)
get count objectives
getErrorMessages($a_section)
Get error messages.
const TYPE_TEST_QUALIFIED
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
__construct(ilObject $a_parent)
Constructor.
getInitialTestStatus($a_set_errors=true)
static lookupQuestionsByObjective($a_test_id, $a_objective)
getSettingsStatus()
Check if course is lo confgured.
getObjectivesStatus($a_set_errors=true)