4 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
46 $this->parent_obj = $a_parent;
53 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
65 return self::$instance;
67 return self::$instance =
new self($a_parent);
94 $this->section = $a_section;
108 return (
array) $this->failures_by_section[$a_section];
118 $this->failures_by_section[$a_section][] = $a_failure_msg_key;
127 $this->cmd_class = $a_cmd_class;
166 #if(!$this->getMaterialsStatus(false)) 168 # return 'materials'; 172 return 'showObjectiveCreation';
179 if($this->
getSettings()->hasSeparateInitialTests())
181 return 'testsOverview';
185 return 'testOverview';
192 if($this->
getSettings()->hasSeparateQualifiedTests())
194 return 'testsOverview';
198 return 'testOverview';
203 return 'listObjectives';
205 return 'listObjectives';
214 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
216 $list->setHeading($this->lng->txt(
'crs_objective_status_configure'));
223 $list->addEntry($this->lng->txt(
'crs_objective_status_settings'),
224 $this->ctrl->getLinkTarget($this->
getCmdClass(),
'settings'),
228 ($this->section == self::SECTION_SETTINGS),
236 $list->addEntry($this->lng->txt(
'crs_objective_status_objective_creation'),
238 ? $this->ctrl->getLinkTarget($this->
getCmdClass(),
'listObjectives')
239 : $this->ctrl->getLinkTarget($this->
getCmdClass(),
'showObjectiveCreation'),
243 ($this->section == self::SECTION_OBJECTIVES_NEW),
251 $this->ctrl->setParameterByClass(
'ilobjcoursegui',
'cmd',
'enableAdministrationPanel');
252 $list->addEntry($this->lng->txt(
'crs_objective_status_materials'),
253 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegui',
''),
257 ($this->section == self::SECTION_MATERIALS),
268 $command = $this->
getSettings()->hasSeparateInitialTests() ?
274 $this->lng->txt(
'crs_objective_status_itest'),
275 $this->ctrl->getLinkTarget($this->
getCmdClass(),$command),
279 ($this->section == self::SECTION_ITES),
288 $command = $this->
getSettings()->hasSeparateQualifiedTests() ?
293 $list->addEntry($this->lng->txt(
'crs_objective_status_qtest'),
294 $this->ctrl->getLinkTarget($this->
getCmdClass(),$command),
298 ($this->section == self::SECTION_QTEST),
308 $list->addEntry($this->lng->txt(
'crs_objective_status_objectives'),
309 $this->ctrl->getLinkTarget($this->
getCmdClass(),
'listObjectives'),
313 ($this->section == self::SECTION_OBJECTIVES),
317 return $list->getHTML();
331 foreach($this->
getFailures($a_section) as $failure_code)
333 $mess[] = $this->lng->txt($failure_code);
358 if(!
$ret && $a_set_errors)
360 $this->
appendFailure(self::SECTION_OBJECTIVES_NEW,
'crs_no_objectives_created');
372 foreach((
array) $childs as $tnode)
374 if($tnode[
'type'] ==
'rolf')
378 if($tnode[
'child'] == $this->
getSettings()->getInitialTest())
382 if($tnode[
'child'] == $this->
getSettings()->getQualifiedTest())
390 $this->
appendFailure(self::SECTION_MATERIALS,
'crs_loc_err_stat_no_materials');
402 if($this->
getSettings()->hasSeparateInitialTests())
407 if(!
$GLOBALS[
'tree']->isInTree($tst_ref))
411 $this->
appendFailure(self::SECTION_ITES,
'crs_loc_err_stat_no_it');
419 $this->
appendFailure(self::SECTION_ITES,
'crs_loc_err_stat_tst_offline');
430 if(!
$GLOBALS[
'tree']->isInTree($tst_ref))
434 $this->
appendFailure(self::SECTION_ITES,
'crs_loc_err_stat_no_it');
442 $this->
appendFailure(self::SECTION_ITES,
'crs_loc_err_stat_tst_offline');
456 if($this->
getSettings()->hasSeparateQualifiedTests())
461 if(!
$GLOBALS[
'tree']->isInTree($tst_ref))
465 $this->
appendFailure(self::SECTION_QTEST,
'crs_loc_err_stat_no_qt');
473 $this->
appendFailure(self::SECTION_QTEST,
'crs_loc_err_stat_tst_offline');
480 $tst_ref = $this->
getSettings()->getQualifiedTest();
481 if(!
$GLOBALS[
'tree']->isInTree($tst_ref))
485 $this->
appendFailure(self::SECTION_QTEST,
'crs_loc_err_stat_no_qt');
493 $this->
appendFailure(self::SECTION_QTEST,
'crs_loc_err_stat_tst_offline');
506 include_once
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
511 include_once
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
513 $this->parent_obj->getId(),
527 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
546 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
552 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_lo');
558 include_once
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
560 if(!count($obj->getMaterials()))
564 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_mat');
577 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_qst');
587 $this->
appendFailure(self::SECTION_OBJECTIVES,
'crs_loc_err_no_active_qst');
620 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
622 $tst = $factory->getInstanceByRefId($qt,
false);
628 $tries = $tst->getNrOfTries();
637 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
640 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$obj_tries);
641 return $obj_tries <= $tries;
650 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
getQualifiedTestStatus($a_set_errors=true)
Check status of qualified test.
static getInstanceByObjId($a_obj_id)
get singleton instance
getFailures($a_section)
Get failures by section.
static getInstance($a_container_id)
Get instance by container id.
getObjectivesAvailableStatus($a_set_errors=false)
getMaterialsStatus($a_set_errors=true)
Get status of materials.
static lookupMaxPasses($a_objective_id)
checkTestOnline($a_ref_id)
Check if test is online.
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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getObjectiveIds($course_id, $a_activated_only=false)
static _isOnline($a_obj_id)
returns the objects's ONline status
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
Create styles array
The data for the language used.
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
__construct(ilObject $a_parent)
Constructor.
getInitialTestStatus($a_set_errors=true)
Get initial test status.
static lookupQuestionsByObjective($a_test_id, $a_objective)
getSettingsStatus()
Check if course is lo confgured.
getObjectivesStatus($a_set_errors=true)