4include_once 
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
 
   46        $this->parent_obj = $a_parent;
 
   53        include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
   63        if (self::$instance) {
 
   66        return self::$instance = 
new self($a_parent);
 
   93        $this->section = $a_section;
 
  107        return (array) $this->failures_by_section[$a_section];
 
  117        $this->failures_by_section[$a_section][] = $a_failure_msg_key;
 
  126        $this->cmd_class = $a_cmd_class;
 
  164        #if(!$this->getMaterialsStatus(false)) 
  166        #       return 'materials'; 
  169            return 'showObjectiveCreation';
 
  171        if ($this->
getSettings()->worksWithInitialTest()) {
 
  174                if ($this->
getSettings()->hasSeparateInitialTests()) {
 
  175                    return 'testsOverview';
 
  177                    return 'testOverview';
 
  183            if ($this->
getSettings()->hasSeparateQualifiedTests()) {
 
  184                return 'testsOverview';
 
  186                return 'testOverview';
 
  190            return 'listObjectives';
 
  192        return 'listObjectives';
 
  201        include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
 
  203        $list->setHeading($this->lng->txt(
'crs_objective_status_configure'));
 
  211            $this->lng->txt(
'crs_objective_status_settings'),
 
  212            $this->ctrl->getLinkTarget($this->getCmdClass(), 
'settings'),
 
  216            ($this->section == self::SECTION_SETTINGS),
 
  217            $this->getErrorMessages(self::SECTION_SETTINGS)
 
  225            $this->lng->txt(
'crs_objective_status_objective_creation'),
 
  227                ? $this->ctrl->getLinkTarget($this->getCmdClass(), 
'listObjectives')
 
  228                : $this->ctrl->getLinkTarget($this->getCmdClass(), 
'showObjectiveCreation'),
 
  232            ($this->section == self::SECTION_OBJECTIVES_NEW),
 
  233            $this->getErrorMessages(self::SECTION_OBJECTIVES_NEW)
 
  240        $this->ctrl->setParameterByClass(
'ilobjcoursegui', 
'cmd', 
'enableAdministrationPanel');
 
  242            $this->lng->txt(
'crs_objective_status_materials'),
 
  243            $this->ctrl->getLinkTargetByClass(
'ilobjcoursegui', 
''),
 
  247            ($this->section == self::SECTION_MATERIALS),
 
  248            $this->getErrorMessages(self::SECTION_MATERIALS)
 
  257            $command = $this->
getSettings()->hasSeparateInitialTests() ?
 
  263                $this->lng->txt(
'crs_objective_status_itest'),
 
  264                $this->ctrl->getLinkTarget($this->getCmdClass(), $command),
 
  268                ($this->section == self::SECTION_ITES),
 
  269                $this->getErrorMessages(self::SECTION_ITES)
 
  277        $command = $this->
getSettings()->hasSeparateQualifiedTests() ?
 
  283            $this->lng->txt(
'crs_objective_status_qtest'),
 
  284            $this->ctrl->getLinkTarget($this->getCmdClass(), $command),
 
  288            ($this->section == self::SECTION_QTEST),
 
  289            $this->getErrorMessages(self::SECTION_QTEST)
 
  299            $this->lng->txt(
'crs_objective_status_objectives'),
 
  300            $this->ctrl->getLinkTarget($this->getCmdClass(), 
'listObjectives'),
 
  304            ($this->section == self::SECTION_OBJECTIVES),
 
  305            $this->getErrorMessages(self::SECTION_OBJECTIVES)
 
  308        return $list->getHTML();
 
  322        foreach ($this->
getFailures($a_section) as $failure_code) {
 
  323            $mess[] = $this->lng->txt($failure_code);
 
  348        if (!
$ret && $a_set_errors) {
 
  349            $this->
appendFailure(self::SECTION_OBJECTIVES_NEW, 
'crs_no_objectives_created');
 
  361        foreach ((array) $childs as $tnode) {
 
  362            if ($tnode[
'type'] == 
'rolf') {
 
  365            if ($tnode[
'child'] == $this->
getSettings()->getInitialTest()) {
 
  368            if ($tnode[
'child'] == $this->
getSettings()->getQualifiedTest()) {
 
  374            $this->
appendFailure(self::SECTION_MATERIALS, 
'crs_loc_err_stat_no_materials');
 
  386        if ($this->
getSettings()->hasSeparateInitialTests()) {
 
  389                if (!
$GLOBALS[
'tree']->isInTree($tst_ref)) {
 
  391                        $this->
appendFailure(self::SECTION_ITES, 
'crs_loc_err_stat_no_it');
 
  397                        $this->
appendFailure(self::SECTION_ITES, 
'crs_loc_err_stat_tst_offline');
 
  407        if (!
$GLOBALS[
'tree']->isInTree($tst_ref)) {
 
  409                $this->
appendFailure(self::SECTION_ITES, 
'crs_loc_err_stat_no_it');
 
  415                $this->
appendFailure(self::SECTION_ITES, 
'crs_loc_err_stat_tst_offline');
 
  429        if ($this->
getSettings()->hasSeparateQualifiedTests()) {
 
  432                if (!
$GLOBALS[
'tree']->isInTree($tst_ref)) {
 
  434                        $this->
appendFailure(self::SECTION_QTEST, 
'crs_loc_err_stat_no_qt');
 
  440                        $this->
appendFailure(self::SECTION_QTEST, 
'crs_loc_err_stat_tst_offline');
 
  447        $tst_ref = $this->
getSettings()->getQualifiedTest();
 
  448        if (!
$GLOBALS[
'tree']->isInTree($tst_ref)) {
 
  450                $this->
appendFailure(self::SECTION_QTEST, 
'crs_loc_err_stat_no_qt');
 
  456                $this->
appendFailure(self::SECTION_QTEST, 
'crs_loc_err_stat_tst_offline');
 
  469        include_once 
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
 
  472                include_once 
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
 
  474                    $this->parent_obj->getId(),
 
  484                include_once 
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
 
  501        include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
  505                $this->
appendFailure(self::SECTION_OBJECTIVES, 
'crs_loc_err_no_active_lo');
 
  510            include_once 
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
 
  512            if (!count($obj->getMaterials())) {
 
  514                    $this->
appendFailure(self::SECTION_OBJECTIVES, 
'crs_loc_err_no_active_mat');
 
  524                    $this->
appendFailure(self::SECTION_OBJECTIVES, 
'crs_loc_err_no_active_qst');
 
  532                $this->
appendFailure(self::SECTION_OBJECTIVES, 
'crs_loc_err_no_active_qst');
 
  564        include_once 
'./Services/Object/classes/class.ilObjectFactory.php';
 
  566        $tst = 
$factory->getInstanceByRefId($qt, 
false);
 
  571        $tries = $tst->getNrOfTries();
 
  578            include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
  581        $GLOBALS[
'ilLog']->write(__METHOD__ . 
': ' . $obj_tries);
 
  582        return $obj_tries <= $tries;
 
  591        include_once 
'./Modules/Test/classes/class.ilObjTestAccess.php';
 
An exception for terminatinating execution or to throw for unit testing.
class ilCourseObjectiveMaterials
static lookupQuestionsByObjective($a_test_id, $a_objective)
static _getCountObjectives($a_obj_id, $a_activated_only=false)
get count objectives
static lookupMaxPasses($a_objective_id)
static _getObjectiveIds($course_id, $a_activated_only=false)
Presentation of the status of single steps during the configuration process.
getSettingsStatus()
Check if course is lo confgured.
lookupQuestionsAssigned($a_test_ref_id)
Check if questions are assigned.
checkTestOnline($a_ref_id)
Check if test is online.
const SECTION_OBJECTIVES_NEW
getMaterialsStatus($a_set_errors=true)
Get status of materials.
getInitialTestStatus($a_set_errors=true)
Get initial test status.
getQualifiedTestStatus($a_set_errors=true)
Check status of qualified test.
static getInstance(ilObject $a_parent)
Get instance.
setSection($a_section)
Set current section.
getFirstFailedStep()
Get first failed step.
getFailures($a_section)
Get failures by section.
getCmdClass()
Get cmd class.
setCmdClass($a_cmd_class)
Command class.
getObjectivesAvailableStatus($a_set_errors=false)
getParentObject()
Get parent object.
getObjectivesStatus($a_set_errors=true)
getErrorMessages($a_section)
Get error messages.
__construct(ilObject $a_parent)
Constructor.
appendFailure($a_section, $a_failure_msg_key)
Append failure.
static lookupSequences($a_container_id, $a_objective_id, $a_test_id)
Lookup sequence ids @global type $ilDB.
const TYPE_TEST_QUALIFIED
static getInstanceByObjId($a_obj_id)
get singleton instance
static getInstance($a_container_id)
Get instance by container id.
static lookupRandomTest($a_test_obj_id)
Check if test is a random test.
static _isOnline($a_obj_id)
returns the objects's ONline status
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(isset($_REQUEST['delete'])) $list