25include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
   59                include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
   64                $this->ctrl->saveParameter($this,array(
"ref_id"));
 
   68                $this->lng->loadLanguageModule(
'crs');
 
   71                $this->tabs_gui =& $ilTabs;
 
   73                $this->course_id = $a_course_id;
 
   89                $ilTabs->setTabActive(
'crs_objectives');
 
   91                $cmd = $this->ctrl->getCmd();
 
   94                if (!
$cmd = $this->ctrl->getCmd())
 
  123                global $ilAccess,
$ilErr,$ilObjDataCache,$ilToolbar;
 
  126                if(!$ilAccess->checkAccess(
"write",
'',$this->course_obj->getRefId()))
 
  128                        $this->ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilErr->MESSAGE);
 
  131                $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_objectives.html',
'Modules/Course');
 
  133                $ilToolbar->addButton($this->lng->txt(
'crs_add_objective'),
 
  134                        $this->ctrl->getLinkTarget($this, 
"'create"));
 
  136                include_once(
'./Modules/Course/classes/class.ilCourseObjectivesTableGUI.php');
 
  138                $table->setTitle($this->lng->txt(
'crs_objectives'),
'',$this->lng->txt(
'crs_objectives'));
 
  141                $this->tpl->setVariable(
'OBJECTIVES_TABLE',$table->getHTML());
 
  152                global $ilAccess,
$ilErr,$ilObjDataCache;
 
  154                if(!$ilAccess->checkAccess(
"write",
'',$this->course_obj->getRefId()))
 
  156                        $this->ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilErr->MESSAGE);
 
  159                asort(
$_POST[
'position'],SORT_NUMERIC);
 
  162                foreach(
$_POST[
'position'] as $objective_id => $position)
 
  165                        $objective->writePosition($counter++);
 
  176                if(!$rbacsystem->checkAccess(
"write", $this->course_obj->getRefId()))
 
  178                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilErr->MESSAGE);
 
  180                if(!count(
$_POST[
'objective']))
 
  188                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_objectives.html",
'Modules/Course');
 
  193                $tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.crs_objectives_delete_row.html",
'Modules/Course');
 
  196                foreach(
$_POST[
'objective'] as $objective_id)
 
  200                        $tpl->setCurrentBlock(
"tbl_content");
 
  202                        $tpl->setVariable(
"TITLE",$objective_obj->getTitle());
 
  203                        $tpl->setVariable(
"DESCRIPTION",$objective_obj->getDescription());
 
  204                        $tpl->parseCurrentBlock();
 
  207                $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
  210                $tpl->setCurrentBlock(
"tbl_action_btn");
 
  211                $tpl->setVariable(
"BTN_NAME",
'deleteObjectives');
 
  212                $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
'delete'));
 
  213                $tpl->parseCurrentBlock();
 
  215                $tpl->setCurrentBlock(
"tbl_action_btn");
 
  216                $tpl->setVariable(
"BTN_NAME",
'listObjectives');
 
  217                $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
'cancel'));
 
  218                $tpl->parseCurrentBlock();
 
  220                $tpl->setCurrentBlock(
"tbl_action_row");
 
  221                $tpl->setVariable(
"COLUMN_COUNTS",1);
 
  223                $tpl->parseCurrentBlock();
 
  228                $tbl->setStyle(
'table',
'std');
 
  231                $tbl->setTitle($this->lng->txt(
"crs_objectives"),
"",$this->lng->txt(
"crs_objectives"));
 
  233                $tbl->setHeaderNames(array($this->lng->txt(
"title")));
 
  234                $tbl->setHeaderVars(array(
"title"), 
 
  235                                                        array(
"ref_id" => $this->course_obj->getRefId(),
 
  236                                                                  "cmdClass" => 
"ilcourseobjectivesgui",
 
  237                                                                  "cmdNode" => 
$_GET[
"cmdNode"]));
 
  238                $tbl->setColumnWidth(array(
"50%"));
 
  242                $tbl->setMaxCount(count(
$_POST[
'objective']));
 
  245                $tbl->disable(
"footer");
 
  246                $tbl->disable(
'sort');
 
  252                $this->tpl->setVariable(
"OBJECTIVES_TABLE", 
$tpl->get());
 
  266                if(!$rbacsystem->checkAccess(
"write", $this->course_obj->getRefId()))
 
  268                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilErr->MESSAGE);
 
  270                if(!count(
$_SESSION[
'crs_delete_objectives']))
 
  278                foreach(
$_SESSION[
'crs_delete_objectives'] as $objective_id)
 
  281                        $objective_obj->delete();
 
  298                global $ilAccess,
$ilErr,$ilTabs;
 
  300                $ilTabs->setSubTabActive(
'crs_objective_overview_question_assignment');
 
  302                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  304                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  307                include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestionsTableGUI.php');
 
  309                $table->setTitle($this->lng->txt(
'crs_objectives_edit_question_assignments'),
'',$this->lng->txt(
'crs_objectives'));
 
  314                $this->tpl->setContent($table->getHTML());
 
  325                include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php');
 
  329                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  331                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  338                foreach(
$_POST[
'self'] as $objective_id => $limit)
 
  341                        $max_points = $qst->getSelfAssessmentPoints();
 
  343                        if($limit < 0 or $limit > $max_points)
 
  350                foreach(
$_POST[
'final'] as $objective_id => $limit)
 
  353                        $max_points = $qst->getFinalTestPoints();
 
  355                        if($limit < 0 or $limit > $max_points)
 
  363                foreach(
$_POST[
'self'] as $objective_id => $limit)
 
  368                foreach(
$_POST[
'final'] as $objective_id => $limit)
 
  383                        $this->ilErr->raiseError(
"ilCourseObjectivesGUI: cannot create course object",$this->ilErr->MESSAGE);
 
  396                include_once 
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
 
  410                include_once 
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
 
  413                return $this->objectives_qst_obj;
 
  422                global $ilTabs, $ilHelp;
 
  426                        $ilHelp->setScreenIdComponent(
"crs");
 
  427                        $ilHelp->setScreenId(
"crs_objective");
 
  428                        $ilHelp->setSubScreenId($a_active);
 
  438                $ilTabs->addSubTabTarget(
"crs_objective_overview_objectives",
 
  439                                                                 $this->ctrl->getLinkTarget($this, 
"listObjectives"),
 
  440                                                                 array(
"listObjectives", 
"moveObjectiveUp", 
"moveObjectiveDown", 
"listAssignedLM"),
 
  444                include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php');
 
  448                        $ilTabs->addSubTabTarget(
"crs_objective_overview_question_assignment",
 
  449                                                                         $this->ctrl->getLinkTarget($this, 
"questionOverview"),
 
  450                                                                         "editQuestionAssignment",
 
  473                $this->ctrl->saveParameter($this,
'objective_id');
 
  475                if(!is_object($this->objective))
 
  483                $GLOBALS[
'tpl']->setContent($this->form->getHtml());
 
  484                #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 
  485                #$tpl->setContent($w_tpl->get()); 
  502                $this->ctrl->setParameter($this,
'objective_id',(
int) 
$_REQUEST[
'objective_id']);
 
  507                        $this->ctrl->redirect($this,
'listObjectives');
 
  510                if(!is_object($this->objective))
 
  518                $GLOBALS[
'tpl']->setContent($this->form->getHtml());
 
  519                #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 
  520                #$tpl->setContent($w_tpl->get()); 
  533                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  535                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  538                $this->ctrl->saveParameter($this,
'objective_id');
 
  542                if($this->form->checkInput())
 
  544                        $this->objective->setTitle($this->form->getInput(
'title'));
 
  545                        $this->objective->setDescription($this->form->getInput(
'description'));
 
  546                        $this->objective->setPasses(0);
 
  548                        if(!
$_GET[
'objective_id'])
 
  550                                $objective_id = $this->objective->add();
 
  555                                $this->objective->update();
 
  557                                $objective_id = 
$_GET[
'objective_id'];
 
  562                        $this->form->setValuesByPost();
 
  563                        return $this->
edit();
 
  566                if(
$_SESSION[
'objective_mode'] != self::MODE_CREATE)
 
  568                        $this->ctrl->returnToParent($this);
 
  571                $this->ctrl->setParameter($this,
'objective_id',$objective_id);
 
  572                $this->ctrl->redirect($this,
'materialAssignment');
 
  586                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  588                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  590                if(!
$_GET[
'objective_id'])
 
  593                        $this->ctrl->redirect($this,
'listObjectives');
 
  598                $this->ctrl->saveParameter($this,
'objective_id');
 
  602                include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterialAssignmentTableGUI.php');
 
  604                $table->setTitle($this->lng->txt(
'crs_objective_wiz_materials'),
 
  605                        '',$this->lng->txt(
'crs_objectives'));
 
  607                include_once(
'Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
 
  612                #$w_tpl->setVariable('WIZ_CONTENT',$table->getHTML()); 
  613                $GLOBALS[
'tpl']->setContent($table->getHTML());
 
  614                #$tpl->setContent($w_tpl->get()); 
  626                global $ilAccess,
$ilErr,$ilObjDataCache;
 
  628                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  630                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  632                if(!
$_GET[
'objective_id'])
 
  635                        $this->ctrl->redirect($this,
'listObjectives');
 
  639                $this->objectives_lm_obj->deleteAll();
 
  641                if(is_array(
$_POST[
'materials']))
 
  643                        foreach(
$_POST[
'materials'] as $node_id)
 
  645                                $obj_id = $ilObjDataCache->lookupObjId($node_id);
 
  646                                $type = $ilObjDataCache->lookupType($obj_id);
 
  648                                $this->objectives_lm_obj->setLMRefId($node_id);
 
  649                                $this->objectives_lm_obj->setLMObjId($obj_id);
 
  650                                $this->objectives_lm_obj->setType($type);
 
  651                                $this->objectives_lm_obj->add();
 
  654                if(is_array(
$_POST[
'chapters']))
 
  656                        foreach(
$_POST[
'chapters'] as $chapter)
 
  658                                include_once(
'./Modules/LearningModule/classes/class.ilLMObject.php');
 
  660                                list(
$ref_id,$chapter_id) = explode(
'_',$chapter);
 
  662                                $this->objectives_lm_obj->setLMRefId(
$ref_id);
 
  663                                $this->objectives_lm_obj->setLMObjId($chapter_id);
 
  665                                $this->objectives_lm_obj->add();
 
  671                if(
$_SESSION[
'objective_mode'] != self::MODE_CREATE)
 
  674                        $this->ctrl->returnToParent($this);
 
  699                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  701                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  703                if(!
$_GET[
'objective_id'])
 
  706                        $this->ctrl->redirect($this,
'listObjectives');
 
  711                $this->ctrl->saveParameter($this,
'objective_id');
 
  724                include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestionAssignmentTableGUI.php');
 
  727                        (
int) 
$_GET[
'objective_id'],
 
  729                $table->setTitle($this->lng->txt(
'crs_objective_wiz_self'),
 
  730                        '',$this->lng->txt(
'crs_objective'));
 
  735                $GLOBALS[
'tpl']->setContent($table->getHTML());
 
  736                #$w_tpl->setVariable('WIZ_CONTENT',$table->getHTML()); 
  737                #$tpl->setContent($w_tpl->get()); 
  749                global $ilAccess,
$ilErr,$ilObjDataCache;
 
  751                $checked_questions = 
$_POST[
'questions'] ? 
$_POST[
'questions'] : array();
 
  754                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  756                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  758                if(!
$_GET[
'objective_id'])
 
  761                        $this->ctrl->redirect($this,
'listObjectives');
 
  767                foreach($this->objectives_qst_obj->getSelfAssessmentQuestions() as $question)
 
  769                        $id = $question[
'ref_id'].
'_'.$question[
'question_id'];
 
  770                        if(!in_array($id,$checked_questions))
 
  772                                $this->objectives_qst_obj->delete($question[
'qst_ass_id']);
 
  776                foreach($checked_questions as $question_id)
 
  778                        list($test_ref_id,$qst_id) = explode(
'_',$question_id);
 
  779                        $test_obj_id = $ilObjDataCache->lookupObjId($test_ref_id);
 
  781                        if($this->objectives_qst_obj->isSelfAssessmentQuestion($qst_id))
 
  786                        $this->objectives_qst_obj->setTestRefId($test_ref_id);
 
  787                        $this->objectives_qst_obj->setTestObjId($test_obj_id);
 
  788                        $this->objectives_qst_obj->setQuestionId($qst_id);
 
  789                        $this->objectives_qst_obj->add();
 
  793                include_once 
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
 
  798                if($checked_questions)
 
  831                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  833                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  835                if(!
$_GET[
'objective_id'])
 
  838                        $this->ctrl->redirect($this,
'listObjectives');
 
  843                $this->ctrl->saveParameter($this,
'objective_id');
 
  850                $GLOBALS[
'tpl']->setContent($this->form->getHtml());
 
  851                #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 
  852                #$tpl->setContent($w_tpl->get()); 
  864                global $ilAccess,
$ilErr,$ilObjDataCache;
 
  866                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  868                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  870                if(!
$_GET[
'objective_id'])
 
  873                        $this->ctrl->redirect($this,
'listObjectives');
 
  878                if((
int) 
$_POST[
'limit'] < 1 or (
int) 
$_POST[
'limit'] > 100)
 
  885                foreach($this->objectives_qst_obj->getSelfAssessmentTests() as 
$test)
 
  888                        $this->objectives_qst_obj->setTestSuggestedLimit((
int) 
$_POST[
'limit']);
 
  889                        $this->objectives_qst_obj->updateTest(
$test[
'test_objective_id']);
 
  893                $this->ctrl->returnToParent($this);
 
  908                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
  910                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
  912                if(!
$_GET[
'objective_id'])
 
  915                        $this->ctrl->redirect($this,
'listObjectives');
 
  920                $this->ctrl->saveParameter($this,
'objective_id');
 
  932                include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestionAssignmentTableGUI.php');
 
  935                        (
int) 
$_GET[
'objective_id'],
 
  938                $table->setTitle($this->lng->txt(
'crs_objective_wiz_final'),
 
  939                        '',$this->lng->txt(
'crs_objective'));
 
  944                $GLOBALS[
'tpl']->setContent($table->getHTML());
 
  945                #$w_tpl->setVariable('WIZ_CONTENT',$table->getHTML()); 
  946                #$tpl->setContent($w_tpl->get()); 
  957                $tst_ref_id = $this->
getSettings()->getTestByType($a_tst_type);
 
  962                include_once 
'./Modules/Test/classes/class.ilObjTest.php';
 
  972                $this->ctrl->saveParameter($this,
'objective_id');
 
  973                $this->ctrl->setParameter($this,
'tt',  (
int) 
$_REQUEST[
'tt']);
 
  975                $this->test_type = (int) 
$_REQUEST[
'tt'];
 
  987                $GLOBALS[
'tpl']->setContent($form->getHTML());
 
  988                #$w_tpl->setVariable('WIZ_CONTENT',$form->getHTML()); 
  990                #$GLOBALS['tpl']->setContent($w_tpl->get()); 
  998                include_once 
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
 
 1000                                $this->course_obj->getId(),
 
 1005                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1007                $form->setFormAction($this->ctrl->getFormAction($this));
 
 1011                        $form->setTitle($this->lng->txt(
'crs_loc_form_random_limits_it'));
 
 1015                        $form->setTitle($this->lng->txt(
'crs_loc_form_random_limits_qt'));
 
 1018                $form->addCommandButton(
'saveRandom', $this->lng->txt(
'save'));
 
 1024                $ass_qpl = 
new ilRadioOption($this->lng->txt(
'crs_loc_rand_assign_qpl'),1);
 
 1029                $qpl->setValue($rnd->getQplSequence());
 
 1030                $ass_qpl->addSubItem($qpl);
 
 1032                #$num = new ilNumberInputGUI($this->lng->txt('crs_loc_num_qst'),'num_qst'); 
 1034                #$num->setMinValue(1); 
 1035                #$num->setRequired(true); 
 1036                #$ass_qpl->addSubItem($num); 
 1040                $per->setValue($rnd->getLimit());
 
 1042                $per->setMinValue(1);
 
 1043                $per->setMaxValue(100);
 
 1044                $per->setRequired(
true);
 
 1045                $ass_qpl->addSubItem($per);
 
 1054                include_once 
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
 
 1055                include_once 
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
 
 1057                $tst_ref_id = $this->
getSettings()->getTestByType($this->test_type);
 
 1075                $list->loadDefinitions();
 
 1077                include_once 
'./Modules/Test/classes/class.ilTestTaxonomyFilterLabelTranslater.php';
 
 1079                $translater->loadLabels($list);
 
 1081                $options[0] = $this->lng->txt(
'select_one');
 
 1082                foreach ($list as $definition)
 
 1084                        $title = $definition->getPoolTitle();
 
 1085                        $tax_id = $definition->getMappedFilterTaxId();
 
 1088                                $title .= (
' -> '. $translater->getTaxonomyTreeLabel($tax_id));
 
 1090                        $tax_node = $definition->getMappedFilterTaxNodeId();
 
 1093                                $title .= (
' -> ' .$translater->getTaxonomyNodeLabel($tax_node));
 
 1095                        $options[$definition->getId()] = $title;
 
 1105                $this->ctrl->saveParameter($this,
'objective_id');
 
 1106                $this->ctrl->setParameter($this,
'tt',(
int) 
$_REQUEST[
'tt']);
 
 1108                $this->test_type = (int) 
$_REQUEST[
'tt'];
 
 1111                if($form->checkInput())
 
 1114                        $qst->deleteByTestType(
 
 1121                        include_once 
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
 
 1123                                        $this->course_obj->getId(),
 
 1128                        $rnd->setLimit($form->getInput(
'per'));
 
 1129                        $rnd->setQplSequence($form->getInput(
'qpl'));
 
 1135                        $form->setValuesByPost();
 
 1143                        $this->ctrl->returnToParent($this);
 
 1147                        $this->ctrl->redirect($this,
'finalTestAssignment');
 
 1160                global $ilAccess,
$ilErr,$ilObjDataCache;
 
 1162                $checked_questions = 
$_POST[
'questions'] ? 
$_POST[
'questions'] : array();
 
 1165                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
 1167                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
 1169                if(!
$_GET[
'objective_id'])
 
 1172                        $this->ctrl->redirect($this,
'listObjectives');
 
 1178                foreach($this->objectives_qst_obj->getFinalTestQuestions() as $question)
 
 1180                        $id = $question[
'ref_id'].
'_'.$question[
'question_id'];
 
 1181                        if(!in_array($id,$checked_questions))
 
 1183                                $this->objectives_qst_obj->delete($question[
'qst_ass_id']);
 
 1187                foreach($checked_questions as $question_id)
 
 1189                        list($test_ref_id,$qst_id) = explode(
'_',$question_id);
 
 1190                        $test_obj_id = $ilObjDataCache->lookupObjId($test_ref_id);
 
 1192                        if($this->objectives_qst_obj->isFinalTestQuestion($qst_id))
 
 1198                        $this->objectives_qst_obj->setTestRefId($test_ref_id);
 
 1199                        $this->objectives_qst_obj->setTestObjId($test_obj_id);
 
 1200                        $this->objectives_qst_obj->setQuestionId($qst_id);
 
 1201                        $this->objectives_qst_obj->add();
 
 1205                include_once 
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
 
 1220                global $ilAccess, 
$ilErr;
 
 1222                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
 1224                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
 1226                if(!
$_GET[
'objective_id'])
 
 1229                        $this->ctrl->returnToParent($this);
 
 1231                $this->ctrl->saveParameter($this,
'objective_id');
 
 1235                $form = $this->initFormTestAssignment();
 
 1236                $GLOBALS[
'tpl']->setContent($form->getHtml());
 
 1250                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
 1252                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
 1254                if(!
$_GET[
'objective_id'])
 
 1257                        $this->ctrl->returnToParent($this);
 
 1262                $this->ctrl->saveParameter($this,
'objective_id');
 
 1269                $GLOBALS[
'tpl']->setContent($this->form->getHtml());
 
 1271                #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 
 1272                #$tpl->setContent($w_tpl->get()); 
 1284                global $ilAccess,
$ilErr,$ilObjDataCache;
 
 1286                if(!$ilAccess->checkAccess(
'write',
'',$this->course_obj->getRefId()))
 
 1288                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
 1290                if(!
$_GET[
'objective_id'])
 
 1293                        $this->ctrl->redirect($this,
'listObjectives');
 
 1298                if((
int) 
$_POST[
'limit'] < 1 or (
int) 
$_POST[
'limit'] > 100)
 
 1305                foreach($this->objectives_qst_obj->getFinalTests() as 
$test)
 
 1308                        $this->objectives_qst_obj->setTestSuggestedLimit((
int) 
$_POST[
'limit']);
 
 1309                        $this->objectives_qst_obj->updateTest(
$test[
'test_objective_id']);
 
 1312                if(
$_SESSION[
'objective_mode'] != self::MODE_CREATE)
 
 1320                $this->ctrl->returnToParent($this);
 
 1332                if(!is_object($this->form))
 
 1334                        include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
 
 1337                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 1338                $this->form->setTableWidth(
'100%');
 
 1343                        case 'selfAssessment':
 
 1344                                $this->form->setTitle($this->lng->txt(
'crs_objective_wiz_self_limit'));
 
 1345                                $this->form->addCommandButton(
'updateSelfAssessmentLimits',$this->lng->txt(
'crs_wiz_next'));
 
 1346                                $this->form->addCommandButton(
'selfAssessmentAssignment',$this->lng->txt(
'crs_wiz_back'));
 
 1348                                $tests = $this->objectives_qst_obj->getSelfAssessmentTests();
 
 1349                                $max_points = $this->objectives_qst_obj->getSelfAssessmentPoints();
 
 1354                                $this->form->setTitle($this->lng->txt(
'crs_objective_wiz_final_limit'));
 
 1355                                $this->form->addCommandButton(
'updateFinalTestLimits',$this->lng->txt(
'crs_wiz_next'));
 
 1356                                $this->form->addCommandButton(
'finalTestAssignment',$this->lng->txt(
'crs_wiz_back'));
 
 1358                                $tests = $this->objectives_qst_obj->getFinalTests();
 
 1359                                $max_points = $this->objectives_qst_obj->getFinalTestPoints();
 
 1364                $over = 
new ilCustomInputGUI($this->lng->txt(
'crs_objective_qst_summary'),
'');
 
 1366                $tpl = 
new ilTemplate(
'tpl.crs_objective_qst_summary.html',
true,
true,
'Modules/Course');
 
 1373                        $GLOBALS[
'ilLog']->write(__METHOD__.
': '.print_r(
$test,TRUE));
 
 1375                        $limit = 
$test[
'limit'];
 
 1377                        foreach($this->objectives_qst_obj->getQuestionsOfTest(
$test[
'obj_id']) as $question)
 
 1379                                $tpl->setCurrentBlock(
'qst');
 
 1380                                $tpl->setVariable(
'QST_TITLE',$question[
'title']);
 
 1381                                if(strlen($question[
'description']))
 
 1383                                        $tpl->setVariable(
'QST_DESCRIPTION',$question[
'description']);
 
 1385                                $tpl->setVariable(
'QST_POINTS',$question[
'points'].
' '.
 
 1386                                        $this->lng->txt(
'crs_objective_points'));
 
 1387                                $tpl->parseCurrentBlock();
 
 1389                        $tpl->setCurrentBlock(
'tst');
 
 1393                                $tpl->setVariable(
'TST_DESC',$desc);
 
 1396                        $tpl->setVariable(
'TST_ALT_IMG',$this->lng->txt(
'obj_tst'));
 
 1397                        $tpl->parseCurrentBlock();
 
 1400                $tpl->setVariable(
'TXT_ALL_POINTS',$this->lng->txt(
'crs_objective_all_points'));
 
 1401                $tpl->setVariable(
'TXT_POINTS',$this->lng->txt(
'crs_objective_points'));
 
 1402                $tpl->setVariable(
'POINTS',$max_points);
 
 1404                $over->setHtml(
$tpl->get());
 
 1405                $this->form->addItem($over);
 
 1409                $req->setValue($limit);
 
 1411                $req->setMinValue(1);
 
 1412                $req->setMaxValue(100);
 
 1413                $req->setRequired(
true);
 
 1416                        case 'selfAssessment':
 
 1417                                $req->setInfo($this->lng->txt(
'crs_obj_initial_req_info'));
 
 1421                                $req->setInfo($this->lng->txt(
'crs_obj_final_req_info'));
 
 1424                $this->form->addItem($req);
 
 1436                include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
 
 1443                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 1449                                $this->form->setTitle($this->lng->txt(
'crs_objective_wiz_title'));
 
 1450                                $this->form->addCommandButton(
'save',$this->lng->txt(
'crs_wiz_next'));
 
 1452                                #$this->form->addCommandButton('listObjectives',$this->lng->txt('cancel')); 
 1461                $title->setValue($this->objective->getTitle());
 
 1462                $title->setRequired(
true);
 
 1463                $title->setSize(40);
 
 1464                $title->setMaxLength(70);
 
 1465                $this->form->addItem($title);
 
 1468                $desc->setValue($this->objective->getDescription());
 
 1471                $this->form->addItem($desc);
 
 1486                        1 => $this->lng->txt(
'crs_objective_wiz_title'),
 
 1487                        2 => $this->lng->txt(
'crs_objective_wiz_materials'),
 
 1488                        3 => $this->lng->txt(
'crs_objective_wiz_self'),
 
 1489                        4 => $this->lng->txt(
'crs_objective_wiz_self_limit'),
 
 1490                        5 => $this->lng->txt(
'crs_objective_wiz_final'),
 
 1491                        6 => $this->lng->txt(
'crs_objective_wiz_final_limit'));
 
 1494                        1 => $this->lng->txt(
'crs_objective_wiz_title_info'),
 
 1495                        2 => $this->lng->txt(
'crs_objective_wiz_materials_info'),
 
 1496                        3 => $this->lng->txt(
'crs_objective_wiz_self_info'),
 
 1497                        4 => $this->lng->txt(
'crs_objective_wiz_self_limit_info'),
 
 1498                        5 => $this->lng->txt(
'crs_objective_wiz_final_info'),
 
 1499                        6 => $this->lng->txt(
'crs_objective_wiz_final_limit_info'));
 
 1502                        1 => $this->ctrl->getLinkTarget($this,
'edit'),
 
 1503                        2 => $this->ctrl->getLinkTarget($this,
'materialAssignment'),
 
 1504                        3 => $this->ctrl->getLinkTarget($this,
'selfAssessmentAssignment'),
 
 1505                        4 => $this->ctrl->getLinkTarget($this,
'selfAssessmentLimits'),
 
 1506                        5 => $this->ctrl->getLinkTarget($this,
'finalTestAssignment'),
 
 1507                        6 => $this->ctrl->getLinkTarget($this,
'finalTestLimits'));
 
 1513                include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
 
 1517                if(
$_SESSION[
'objective_mode'] == self::MODE_CREATE)
 
 1520                        $check_list->setHeading($this->lng->txt(
'crs_checklist_objective'));
 
 1526                        $check_list->setHeading($this->lng->txt(
'crs_checklist_objective'));
 
 1532                foreach(
$options as $step => $title)
 
 1539                        if($step == 3 and (!$this->
getSettings()->worksWithInitialTest() or $this->
getSettings()->hasSeparateInitialTests()))
 
 1543                        if($step == 4 and (!$this->
getSettings()->worksWithInitialTest() or $this->
getSettings()->hasSeparateInitialTests()))
 
 1547                        if($step == 5 and $this->
getSettings()->hasSeparateQualifiedTests())
 
 1551                        if($step == 6 and $this->
getSettings()->hasSeparateQualifiedTests())
 
 1566                        if(
$_SESSION[
'objective_mode'] == self::MODE_UPDATE)
 
 1569                                if($step == 4 and !count($this->objectives_qst_obj->getSelfAssessmentQuestions()))
 
 1573                                if($step == 6 and !count($this->objectives_qst_obj->getFinalTestQuestions()))
 
 1578                                if($step == 3 and !$this->
getSettings()->worksWithInitialTest())
 
 1582                                if($step == 4 and !$this->
getSettings()->worksWithInitialTest())
 
 1589                                        $item_link = $links[$step];
 
 1600                $GLOBALS[
"tpl"]->setRightContent($check_list->getHTML());
 
TableGUI for material assignments of course objectives.
class ilCourseObjectiveMaterials
static _getAssignableMaterials($a_container_id)
Get an array of course material ids that can be assigned to learning objectives No tst,...
TableGUI for question assignments of course objectives.
class ilcourseobjectiveQuestion
_hasTests($a_course_id)
@access public
static _updateTestLimits($a_objective_id, $a_status, $a_limit)
update test limits
static _getAssignableTests($a_container_ref_id)
Get assignable tests.
const TYPE_SELF_ASSESSMENT
static _getObjectiveIds($course_id, $a_activated_only=false)
class ilobjcourseobjectivesgui
updateMaterialAssignment()
update material assignment
getRandomTestQplOptions()
saveRandom()
Save random test settings.
saveSorting()
save position
__initQuestionObject($a_objective_id=0)
finalTestAssignment()
final test assignment
__initObjectivesObject($a_id=0)
getSettings()
Get settings.
initFormTitle($a_mode, $a_step_number)
init form title
setSubTabs($a_active="")
set sub tabs
updateSelfAssessmentLimits()
update self assessment limits
selfAssessmentLimits()
self assessment limits
updateFinalTestLimits()
update self assessment limits
finalSeparatedTestAssignment(ilPropertyFormGUI $form=null)
Show test assignment form.
__initLMObject($a_objective_id=0)
initWizard($a_step_number)
init wizard
updateFinalTestAssignment()
update self assessment assignment
questionOverview()
question overiew
listObjectives()
list objectives
isRandomTestType($a_tst_type=0)
initFormRandom()
show random test
saveQuestionOverview()
update question overview
selfAssessmentAssignment()
self assessment assignemnt
showRandomTestAssignment(ilPropertyFormGUI $form=null)
updateSelfAssessmentAssignment()
update self assessment assignment
ilCourseObjectivesGUI($a_course_id)
initFormLimits($a_mode)
init limit form
finalTestLimits()
self assessment limits
materialAssignment()
material assignment
& executeCommand()
execute command
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
const TYPE_TEST_QUALIFIED
static getInstanceByObjId($a_obj_id)
get singleton instance
static _lookupRandomTest($a_obj_id)
Returns the fact wether the test with passed obj id is a random questions test or not.
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
redirection script todo: (a better solution should control the processing via a xml file)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options