示例#1
0
 /**
  * display status panel
  */
 function displayStatusPanel()
 {
     include_once "./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php";
     $checklist = new ilChecklistGUI();
     $checklist->setHeading($this->lng->txt("overall_status"));
     $OK = "<font color=\"green\"><strong>OK</strong></font>";
     //$this->tpl->addBlockFile("STATUS_PANEL","status_panel","tpl.status_panel.html", "setup");
     $this->tpl->setVariable("TXT_OVERALL_STATUS", $this->lng->txt("overall_status"));
     // display status
     if ($this->setup->getClient()->status) {
         foreach ($this->setup->getClient()->status as $key => $val) {
             $status = $val["status"] ? $OK : "&nbsp;";
             //				$this->tpl->setCurrentBlock("status_row");
             //				$this->tpl->setVariable("TXT_STEP", $this->lng->txt("step_".$key));
             //				$this->tpl->setVariable("TXT_STATUS",$status);
             //				$this->tpl->setVariable("TXT_COMMENT",$val["comment"]);
             //				$this->tpl->parseCurrentBlock();
             $checklist->addEntry($this->lng->txt("step_" . $key), "", $val["status"] ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NO_STATUS, false, $val["comment"]);
         }
     }
     $this->tpl->setVariable("STATUS_PANEL", $checklist->getHTML());
 }
示例#2
0
 /**
  * Get html
  */
 public function getHTML()
 {
     include_once "./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php";
     $list = new ilChecklistGUI();
     $list->setHeading($this->lng->txt('crs_objective_status_configure'));
     // Step 1
     // course settings
     $done = $this->getSettingsStatus();
     $list->addEntry($this->lng->txt('crs_objective_status_settings'), $this->ctrl->getLinkTarget($this->getCmdClass(), 'settings'), $done ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NOT_OK, $this->section == self::SECTION_SETTINGS, $this->getErrorMessages(self::SECTION_SETTINGS));
     // Step 1.1
     $done = $this->getObjectivesAvailableStatus();
     $list->addEntry($this->lng->txt('crs_objective_status_objective_creation'), $done ? $this->ctrl->getLinkTarget($this->getCmdClass(), 'listObjectives') : $this->ctrl->getLinkTarget($this->getCmdClass(), 'showObjectiveCreation'), $done ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NOT_OK, $this->section == self::SECTION_OBJECTIVES_NEW, $this->getErrorMessages(self::SECTION_OBJECTIVES_NEW));
     // Step 2
     // course material
     $done = $this->getMaterialsStatus(true);
     $this->ctrl->setParameterByClass('ilobjcoursegui', 'cmd', 'enableAdministrationPanel');
     $list->addEntry($this->lng->txt('crs_objective_status_materials'), $this->ctrl->getLinkTargetByClass('ilobjcoursegui', ''), $done ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NOT_OK, $this->section == self::SECTION_MATERIALS, $this->getErrorMessages(self::SECTION_MATERIALS));
     // Step 3
     // course itest
     if (ilLOSettings::getInstanceByObjId($this->getParentObject()->getId())->worksWithInitialTest()) {
         $done = $this->getInitialTestStatus();
         $command = $this->getSettings()->hasSeparateInitialTests() ? 'testsOverview' : 'testOverview';
         $this->ctrl->setParameter($this->getCmdClass(), 'tt', ilLOSettings::TYPE_TEST_INITIAL);
         $list->addEntry($this->lng->txt('crs_objective_status_itest'), $this->ctrl->getLinkTarget($this->getCmdClass(), $command), $done ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NOT_OK, $this->section == self::SECTION_ITES, $this->getErrorMessages(self::SECTION_ITES));
     }
     // Step 4
     // course qtest
     $done = $this->getQualifiedTestStatus();
     $command = $this->getSettings()->hasSeparateQualifiedTests() ? 'testsOverview' : 'testOverview';
     $this->ctrl->setParameter($this->getCmdClass(), 'tt', ilLOSettings::TYPE_TEST_QUALIFIED);
     $list->addEntry($this->lng->txt('crs_objective_status_qtest'), $this->ctrl->getLinkTarget($this->getCmdClass(), $command), $done ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NOT_OK, $this->section == self::SECTION_QTEST, $this->getErrorMessages(self::SECTION_QTEST));
     // Step 5
     // course qtest
     $done = $this->getObjectivesStatus();
     $list->addEntry($this->lng->txt('crs_objective_status_objectives'), $this->ctrl->getLinkTarget($this->getCmdClass(), 'listObjectives'), $done ? ilChecklistGUI::STATUS_OK : ilChecklistGUI::STATUS_NOT_OK, $this->section == self::SECTION_OBJECTIVES, $this->getErrorMessages(self::SECTION_OBJECTIVES));
     return $list->getHTML();
 }
 /**
  * init wizard
  * @access protected
  * @param string mode 'create' or 'edit'
  * @return
  */
 protected function initWizard($a_step_number)
 {
     $options = array(1 => $this->lng->txt('crs_objective_wiz_title'), 2 => $this->lng->txt('crs_objective_wiz_materials'), 3 => $this->lng->txt('crs_objective_wiz_self'), 4 => $this->lng->txt('crs_objective_wiz_self_limit'), 5 => $this->lng->txt('crs_objective_wiz_final'), 6 => $this->lng->txt('crs_objective_wiz_final_limit'));
     $info = array(1 => $this->lng->txt('crs_objective_wiz_title_info'), 2 => $this->lng->txt('crs_objective_wiz_materials_info'), 3 => $this->lng->txt('crs_objective_wiz_self_info'), 4 => $this->lng->txt('crs_objective_wiz_self_limit_info'), 5 => $this->lng->txt('crs_objective_wiz_final_info'), 6 => $this->lng->txt('crs_objective_wiz_final_limit_info'));
     $links = array(1 => $this->ctrl->getLinkTarget($this, 'edit'), 2 => $this->ctrl->getLinkTarget($this, 'materialAssignment'), 3 => $this->ctrl->getLinkTarget($this, 'selfAssessmentAssignment'), 4 => $this->ctrl->getLinkTarget($this, 'selfAssessmentLimits'), 5 => $this->ctrl->getLinkTarget($this, 'finalTestAssignment'), 6 => $this->ctrl->getLinkTarget($this, 'finalTestLimits'));
     // checklist gui start
     include_once "./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php";
     $check_list = new ilChecklistGUI();
     // checklist gui end
     if ($_SESSION['objective_mode'] == self::MODE_CREATE) {
         // checklist gui start
         $check_list->setHeading($this->lng->txt('crs_add_objective'));
         // checklist gui end
     } else {
         // checklist gui start
         $check_list->setHeading($this->lng->txt('crs_update_objective'));
         // checklist gui end
     }
     // end-patch lok
     $num = 0;
     foreach ($options as $step => $title) {
         // checklist gui start
         $item_link = "";
         // checklist gui end
         // begin-patch lok
         if ($step == 3 and !$this->getSettings()->worksWithInitialTest()) {
             continue;
         }
         if ($step == 4 and !$this->getSettings()->worksWithInitialTest()) {
             continue;
         }
         if ($step == 4 and $this->isRandomTestType(ilLOSettings::TYPE_TEST_INITIAL)) {
             continue;
         }
         if ($step == 6 and $this->isRandomTestType(ilLOSettings::TYPE_TEST_QUALIFIED)) {
             continue;
         }
         $num++;
         // end-patch lok
         if ($_SESSION['objective_mode'] == self::MODE_UPDATE) {
             $hide_link = false;
             if ($step == 4 and !count($this->objectives_qst_obj->getSelfAssessmentQuestions())) {
                 $hide_link = true;
             }
             if ($step == 6 and !count($this->objectives_qst_obj->getFinalTestQuestions())) {
                 $hide_link = true;
             }
             // begin-patch lok
             if ($step == 3 and !$this->getSettings()->worksWithInitialTest()) {
                 $hide_link = true;
             }
             if ($step == 4 and !$this->getSettings()->worksWithInitialTest()) {
                 $hide_link = true;
             }
             if (!$hide_link) {
                 // checklist gui start
                 $item_link = $links[$step];
                 // checklist gui end
             }
         }
         // checklist gui start
         $check_list->addEntry($title, $item_link, ilChecklistGUI::STATUS_NO_STATUS, $step == $a_step_number);
         // checklist gui end
     }
     // checklist gui start
     $GLOBALS["tpl"]->setRightContent($check_list->getHTML());
     // checklist gui end
 }