25 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
68 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
73 $this->ctrl->saveParameter($this,
array(
"ref_id"));
75 $this->logger =
$GLOBALS[
'DIC']->logger()->crs();
78 $this->lng->loadLanguageModule(
'crs');
81 $this->tabs_gui = $ilTabs;
83 $this->course_id = $a_course_id;
98 $ilTabs->setTabActive(
'crs_objectives');
100 $cmd = $this->ctrl->getCmd();
103 if (!$cmd = $this->ctrl->getCmd()) {
131 global $ilAccess,
$ilErr,$ilObjDataCache,$ilToolbar;
133 $_SESSION[
'objective_mode'] = self::MODE_UNDEFINED;
134 if (!$ilAccess->checkAccess(
"write",
'', $this->course_obj->getRefId())) {
135 $this->ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilErr->MESSAGE);
138 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_objectives.html',
'Modules/Course');
140 $ilToolbar->addButton(
141 $this->lng->txt(
'crs_add_objective'),
142 $this->ctrl->getLinkTarget($this,
"'create")
145 include_once(
'./Modules/Course/classes/class.ilCourseObjectivesTableGUI.php');
147 $table->setTitle($this->lng->txt(
'crs_objectives'),
'', $this->lng->txt(
'crs_objectives'));
150 $this->tpl->setVariable(
'OBJECTIVES_TABLE',
$table->getHTML());
161 global $ilAccess,
$ilErr,$ilObjDataCache;
163 if (!$ilAccess->checkAccess(
"write",
'', $this->course_obj->getRefId())) {
164 $this->ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilErr->MESSAGE);
167 asort(
$_POST[
'position'], SORT_NUMERIC);
170 foreach (
$_POST[
'position'] as $objective_id => $position) {
172 $objective->writePosition(
$counter++);
183 if (!$rbacsystem->checkAccess(
"write", $this->course_obj->getRefId())) {
184 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilErr->MESSAGE);
186 if (!count(
$_POST[
'objective'])) {
193 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_objectives.html",
'Modules/Course');
198 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.crs_objectives_delete_row.html",
'Modules/Course');
201 foreach (
$_POST[
'objective'] as $objective_id) {
204 $tpl->setCurrentBlock(
"tbl_content");
206 $tpl->setVariable(
"TITLE", $objective_obj->getTitle());
207 $tpl->setVariable(
"DESCRIPTION", $objective_obj->getDescription());
208 $tpl->parseCurrentBlock();
211 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
214 $tpl->setCurrentBlock(
"tbl_action_btn");
215 $tpl->setVariable(
"BTN_NAME",
'deleteObjectives');
216 $tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
'delete'));
217 $tpl->parseCurrentBlock();
219 $tpl->setCurrentBlock(
"tbl_action_btn");
220 $tpl->setVariable(
"BTN_NAME",
'listObjectives');
221 $tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
'cancel'));
222 $tpl->parseCurrentBlock();
224 $tpl->setCurrentBlock(
"tbl_action_row");
225 $tpl->setVariable(
"COLUMN_COUNTS", 1);
227 $tpl->parseCurrentBlock();
232 $tbl->setStyle(
'table',
'std');
235 $tbl->setTitle($this->lng->txt(
"crs_objectives"),
"", $this->lng->txt(
"crs_objectives"));
237 $tbl->setHeaderNames(
array($this->lng->txt(
"title")));
240 array(
"ref_id" => $this->course_obj->getRefId(),
241 "cmdClass" =>
"ilcourseobjectivesgui",
242 "cmdNode" =>
$_GET[
"cmdNode"])
248 $tbl->setMaxCount(count(
$_POST[
'objective']));
251 $tbl->disable(
"footer");
252 $tbl->disable(
'sort');
255 $tbl->setTemplate($tpl);
258 $this->tpl->setVariable(
"OBJECTIVES_TABLE", $tpl->get());
272 if (!$rbacsystem->checkAccess(
"write", $this->course_obj->getRefId())) {
273 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilErr->MESSAGE);
275 if (!count(
$_SESSION[
'crs_delete_objectives'])) {
282 foreach (
$_SESSION[
'crs_delete_objectives'] as $objective_id) {
284 $objective_obj->delete();
301 global $ilAccess,
$ilErr,$ilTabs;
303 $ilTabs->setSubTabActive(
'crs_objective_overview_question_assignment');
305 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
306 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
309 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestionsTableGUI.php');
311 $table->setTitle($this->lng->txt(
'crs_objectives_edit_question_assignments'),
'', $this->lng->txt(
'crs_objectives'));
316 $this->tpl->setContent(
$table->getHTML());
327 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php');
331 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
332 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
339 foreach (
$_POST[
'self'] as $objective_id => $limit) {
341 $max_points = $qst->getSelfAssessmentPoints();
343 if ($limit < 0 or $limit > $max_points) {
349 foreach (
$_POST[
'final'] as $objective_id => $limit) {
351 $max_points = $qst->getFinalTestPoints();
353 if ($limit < 0 or $limit > $max_points) {
360 foreach (
$_POST[
'self'] as $objective_id => $limit) {
364 foreach (
$_POST[
'final'] as $objective_id => $limit) {
377 $this->ilErr->raiseError(
"ilCourseObjectivesGUI: cannot create course object", $this->ilErr->MESSAGE);
390 include_once
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
404 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
407 return $this->objectives_qst_obj;
416 global $ilTabs, $ilHelp;
418 if ($a_active !=
"") {
419 $ilHelp->setScreenIdComponent(
"crs");
420 $ilHelp->setScreenId(
"crs_objective");
421 $ilHelp->setSubScreenId($a_active);
431 $ilTabs->addSubTabTarget(
432 "crs_objective_overview_objectives",
433 $this->ctrl->getLinkTarget($this,
"listObjectives"),
434 array(
"listObjectives",
"moveObjectiveUp",
"moveObjectiveDown",
"listAssignedLM"),
439 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php');
442 $ilTabs->addSubTabTarget(
443 "crs_objective_overview_question_assignment",
444 $this->ctrl->getLinkTarget($this,
"questionOverview"),
445 "editQuestionAssignment",
467 $_SESSION[
'objective_mode'] = self::MODE_CREATE;
469 $this->ctrl->saveParameter($this,
'objective_id');
471 if (!is_object($this->objective)) {
478 $GLOBALS[
'tpl']->setContent($this->form->getHtml());
479 #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 480 #$tpl->setContent($w_tpl->get()); 493 $_SESSION[
'objective_mode'] = self::MODE_UPDATE;
497 $this->ctrl->setParameter($this,
'objective_id', (
int) $_REQUEST[
'objective_id']);
499 if (!$_REQUEST[
'objective_id']) {
501 $this->ctrl->redirect($this,
'listObjectives');
504 if (!is_object($this->objective)) {
505 $this->objective =
new ilCourseObjective($this->course_obj, (
int) $_REQUEST[
'objective_id']);
511 $GLOBALS[
'tpl']->setContent($this->form->getHtml());
512 #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 513 #$tpl->setContent($w_tpl->get()); 526 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
527 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
530 $this->ctrl->saveParameter($this,
'objective_id');
532 $this->objective =
new ilCourseObjective($this->course_obj, (
int) $_REQUEST[
'objective_id']);
534 if ($this->form->checkInput()) {
535 $this->objective->setTitle($this->form->getInput(
'title'));
536 $this->objective->setDescription($this->form->getInput(
'description'));
537 $this->objective->setPasses(0);
539 if (!
$_GET[
'objective_id']) {
540 $objective_id = $this->objective->add();
543 $this->objective->update();
545 $objective_id =
$_GET[
'objective_id'];
548 if ((
int)
$_GET[
'objective_id']) {
549 $this->form->setValuesByPost();
550 return $this->
edit();
552 $this->form->setValuesByPost();
557 if (
$_SESSION[
'objective_mode'] != self::MODE_CREATE) {
558 $this->ctrl->returnToParent($this);
561 $this->ctrl->setParameter($this,
'objective_id', $objective_id);
562 $this->ctrl->redirect($this,
'materialAssignment');
576 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
577 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
579 if (!
$_GET[
'objective_id']) {
581 $this->ctrl->redirect($this,
'listObjectives');
586 $this->ctrl->saveParameter($this,
'objective_id');
590 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterialAssignmentTableGUI.php');
593 $this->lng->txt(
'crs_objective_wiz_materials'),
595 $this->lng->txt(
'crs_objectives')
598 include_once(
'Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
603 #$w_tpl->setVariable('WIZ_CONTENT',$table->getHTML()); 605 #$tpl->setContent($w_tpl->get()); 617 global $ilAccess,
$ilErr,$ilObjDataCache;
619 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
620 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
622 if (!
$_GET[
'objective_id']) {
624 $this->ctrl->redirect($this,
'listObjectives');
628 $this->objectives_lm_obj->deleteAll();
630 if (is_array(
$_POST[
'materials'])) {
631 foreach (
$_POST[
'materials'] as $node_id) {
632 $obj_id = $ilObjDataCache->lookupObjId($node_id);
633 $type = $ilObjDataCache->lookupType($obj_id);
635 $this->objectives_lm_obj->setLMRefId($node_id);
636 $this->objectives_lm_obj->setLMObjId($obj_id);
637 $this->objectives_lm_obj->setType(
$type);
638 $this->objectives_lm_obj->add();
641 if (is_array(
$_POST[
'chapters'])) {
642 foreach (
$_POST[
'chapters'] as $chapter) {
643 include_once(
'./Modules/LearningModule/classes/class.ilLMObject.php');
645 list($ref_id, $chapter_id) = explode(
'_', $chapter);
647 $this->objectives_lm_obj->setLMRefId($ref_id);
648 $this->objectives_lm_obj->setLMObjId($chapter_id);
650 $this->objectives_lm_obj->add();
656 if (
$_SESSION[
'objective_mode'] != self::MODE_CREATE) {
658 $this->ctrl->returnToParent($this);
662 if ($this->
getSettings()->worksWithInitialTest()) {
680 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
681 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
683 if (!
$_GET[
'objective_id']) {
685 $this->ctrl->redirect($this,
'listObjectives');
690 $this->ctrl->saveParameter($this,
'objective_id');
702 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestionAssignmentTableGUI.php');
706 (
int) $_GET[
'objective_id'],
710 $this->lng->txt(
'crs_objective_wiz_self'),
712 $this->lng->txt(
'crs_objective')
719 #$w_tpl->setVariable('WIZ_CONTENT',$table->getHTML()); 720 #$tpl->setContent($w_tpl->get()); 732 global $ilAccess,
$ilErr,$ilObjDataCache;
737 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
738 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
740 if (!
$_GET[
'objective_id']) {
742 $this->ctrl->redirect($this,
'listObjectives');
748 foreach ($this->objectives_qst_obj->getSelfAssessmentQuestions() as $question) {
749 $id = $question[
'ref_id'] .
'_' . $question[
'question_id'];
750 if (!in_array(
$id, $checked_questions)) {
751 $this->objectives_qst_obj->delete($question[
'qst_ass_id']);
755 foreach ($checked_questions as $question_id) {
756 list($test_ref_id, $qst_id) = explode(
'_', $question_id);
757 $test_obj_id = $ilObjDataCache->lookupObjId($test_ref_id);
759 if ($this->objectives_qst_obj->isSelfAssessmentQuestion($qst_id)) {
763 $this->objectives_qst_obj->setTestRefId($test_ref_id);
764 $this->objectives_qst_obj->setTestObjId($test_obj_id);
765 $this->objectives_qst_obj->setQuestionId($qst_id);
766 $this->objectives_qst_obj->add();
770 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
775 if ($checked_questions) {
781 case self::MODE_CREATE:
785 case self::MODE_UPDATE:
804 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
805 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
807 if (!
$_GET[
'objective_id']) {
809 $this->ctrl->redirect($this,
'listObjectives');
814 $this->ctrl->saveParameter($this,
'objective_id');
821 $GLOBALS[
'tpl']->setContent($this->form->getHtml());
822 #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 823 #$tpl->setContent($w_tpl->get()); 835 global $ilAccess,
$ilErr,$ilObjDataCache;
837 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
838 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
840 if (!
$_GET[
'objective_id']) {
842 $this->ctrl->redirect($this,
'listObjectives');
847 if ((
int)
$_POST[
'limit'] < 1 or (
int)
$_POST[
'limit'] > 100) {
853 foreach ($this->objectives_qst_obj->getSelfAssessmentTests() as
$test) {
855 $this->objectives_qst_obj->setTestSuggestedLimit((
int)
$_POST[
'limit']);
856 $this->objectives_qst_obj->updateTest(
$test[
'test_objective_id']);
860 $this->ctrl->returnToParent($this);
875 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
876 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
878 if (!
$_GET[
'objective_id']) {
880 $this->ctrl->redirect($this,
'listObjectives');
885 $this->ctrl->saveParameter($this,
'objective_id');
896 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveQuestionAssignmentTableGUI.php');
900 (
int) $_GET[
'objective_id'],
905 $this->lng->txt(
'crs_objective_wiz_final'),
907 $this->lng->txt(
'crs_objective')
914 #$w_tpl->setVariable('WIZ_CONTENT',$table->getHTML()); 915 #$tpl->setContent($w_tpl->get()); 925 $tst_ref_id = $this->
getSettings()->getTestByType($a_tst_type);
929 include_once
'./Modules/Test/classes/class.ilObjTest.php';
939 $this->ctrl->saveParameter($this,
'objective_id');
940 $this->ctrl->setParameter($this,
'tt', (
int) $_REQUEST[
'tt']);
942 $this->test_type = (int) $_REQUEST[
'tt'];
954 #$w_tpl->setVariable('WIZ_CONTENT',$form->getHTML()); 956 #$GLOBALS['tpl']->setContent($w_tpl->get()); 964 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
966 $form->setFormAction($this->ctrl->getFormAction($this));
969 $form->setTitle($this->lng->txt(
'crs_loc_form_random_limits_it'));
971 $form->setTitle($this->lng->txt(
'crs_loc_form_random_limits_qt'));
974 $form->addCommandButton(
'saveRandom', $this->lng->txt(
'save'));
980 $ass_qpl =
new ilRadioOption($this->lng->txt(
'crs_loc_rand_assign_qpl'), 1);
985 $qpl->setMulti(
true,
false);
986 $qpl->setOptions($this->getRandomTestQplOptions());
989 $this->course_obj->getId(),
990 (int) $_REQUEST[
'objective_id'],
995 $qpl->setValue($sequences[0]);
996 $qpl->setMultiValues($sequences);
997 $ass_qpl->addSubItem($qpl);
1003 $this->course_obj->getId(),
1004 (int) $_REQUEST[
'objective_id'],
1009 $per->setMinValue(1);
1010 $per->setMaxValue(100);
1011 $per->setRequired(
true);
1012 $ass_qpl->addSubItem($per);
1019 protected function getRandomTestQplOptions()
1021 include_once
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
1022 include_once
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
1024 $tst_ref_id = $this->
getSettings()->getTestByType($this->test_type);
1040 $list->loadDefinitions();
1042 include_once
'./Modules/Test/classes/class.ilTestTaxonomyFilterLabelTranslater.php';
1044 $translater->loadLabels(
$list);
1046 $options[0] = $this->lng->txt(
'select_one');
1047 foreach (
$list as $definition) {
1049 $title = $definition->getPoolTitle();
1051 $filterTitle =
array();
1052 $filterTitle[] = $translater->getTaxonomyFilterLabel($definition->getMappedTaxonomyFilter());
1053 $filterTitle[] = $translater->getTypeFilterLabel($definition->getTypeFilter());
1054 if (!empty($filterTitle)) {
1055 $title .=
' -> ' . implode(
' / ', $filterTitle);
1057 #$tax_id = $definition->getMappedFilterTaxId(); 1060 # $title .= (' -> '. $translater->getTaxonomyTreeLabel($tax_id)); 1062 #$tax_node = $definition->getMappedFilterTaxNodeId(); 1065 # $title .= (' -> ' .$translater->getTaxonomyNodeLabel($tax_node)); 1078 $this->ctrl->saveParameter($this,
'objective_id');
1079 $this->ctrl->setParameter($this,
'tt', (
int) $_REQUEST[
'tt']);
1081 $this->test_type = (int) $_REQUEST[
'tt'];
1088 if (
$form->checkInput()) {
1090 $this->course_obj->getId(),
1091 (int) $_REQUEST[
'objective_id'],
1096 $qst->deleteByTestType(
1101 $ref_id = $this->
getSettings()->getTestByType($this->test_type);
1102 foreach (array_unique((
array)
$form->getInput(
'qpl')) as $qpl_id) {
1103 include_once
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
1105 $this->course_obj->getId(),
1106 (int) $_REQUEST[
'objective_id'],
1110 $rnd->setLimit(
$form->getInput(
'per'));
1115 $form->setValuesByPost();
1122 $this->ctrl->returnToParent($this);
1124 $this->ctrl->redirect($this,
'finalTestAssignment');
1137 global $ilAccess,
$ilErr,$ilObjDataCache;
1142 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
1143 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
1145 if (!
$_GET[
'objective_id']) {
1147 $this->ctrl->redirect($this,
'listObjectives');
1153 foreach ($this->objectives_qst_obj->getFinalTestQuestions() as $question) {
1154 $id = $question[
'ref_id'] .
'_' . $question[
'question_id'];
1155 if (!in_array(
$id, $checked_questions)) {
1156 $this->objectives_qst_obj->delete($question[
'qst_ass_id']);
1160 foreach ($checked_questions as $question_id) {
1161 list($test_ref_id, $qst_id) = explode(
'_', $question_id);
1162 $test_obj_id = $ilObjDataCache->lookupObjId($test_ref_id);
1164 if ($this->objectives_qst_obj->isFinalTestQuestion($qst_id)) {
1169 $this->objectives_qst_obj->setTestRefId($test_ref_id);
1170 $this->objectives_qst_obj->setTestObjId($test_obj_id);
1171 $this->objectives_qst_obj->setQuestionId($qst_id);
1172 $this->objectives_qst_obj->add();
1176 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
1191 global $ilAccess,
$ilErr;
1193 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
1194 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
1196 if (!
$_GET[
'objective_id']) {
1198 $this->ctrl->returnToParent($this);
1200 $this->ctrl->saveParameter($this,
'objective_id');
1204 $form = $this->initFormTestAssignment();
1219 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
1220 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
1222 if (!
$_GET[
'objective_id']) {
1224 $this->ctrl->returnToParent($this);
1229 $this->ctrl->saveParameter($this,
'objective_id');
1236 $GLOBALS[
'tpl']->setContent($this->form->getHtml());
1238 #$w_tpl->setVariable('WIZ_CONTENT',$this->form->getHtml()); 1239 #$tpl->setContent($w_tpl->get()); 1251 global $ilAccess,
$ilErr,$ilObjDataCache;
1253 if (!$ilAccess->checkAccess(
'write',
'', $this->course_obj->getRefId())) {
1254 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
1256 if (!
$_GET[
'objective_id']) {
1258 $this->ctrl->redirect($this,
'listObjectives');
1263 if ((
int)
$_POST[
'limit'] < 1 or (
int)
$_POST[
'limit'] > 100) {
1269 foreach ($this->objectives_qst_obj->getFinalTests() as
$test) {
1271 $this->objectives_qst_obj->setTestSuggestedLimit((
int)
$_POST[
'limit']);
1272 $this->objectives_qst_obj->updateTest(
$test[
'test_objective_id']);
1275 if (
$_SESSION[
'objective_mode'] != self::MODE_CREATE) {
1280 $this->ctrl->returnToParent($this);
1292 if (!is_object($this->form)) {
1293 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1296 $this->form->setFormAction($this->ctrl->getFormAction($this));
1297 $this->form->setTableWidth(
'100%');
1301 case 'selfAssessment':
1302 $this->form->setTitle($this->lng->txt(
'crs_objective_wiz_self_limit'));
1303 $this->form->addCommandButton(
'updateSelfAssessmentLimits', $this->lng->txt(
'crs_wiz_next'));
1304 $this->form->addCommandButton(
'selfAssessmentAssignment', $this->lng->txt(
'crs_wiz_back'));
1306 $tests = $this->objectives_qst_obj->getSelfAssessmentTests();
1307 $max_points = $this->objectives_qst_obj->getSelfAssessmentPoints();
1312 $this->form->setTitle($this->lng->txt(
'crs_objective_wiz_final_limit'));
1313 $this->form->addCommandButton(
'updateFinalTestLimits', $this->lng->txt(
'crs_wiz_next'));
1314 $this->form->addCommandButton(
'finalTestAssignment', $this->lng->txt(
'crs_wiz_back'));
1316 $tests = $this->objectives_qst_obj->getFinalTests();
1317 $max_points = $this->objectives_qst_obj->getFinalTestPoints();
1322 $over =
new ilCustomInputGUI($this->lng->txt(
'crs_objective_qst_summary'),
'');
1324 $tpl =
new ilTemplate(
'tpl.crs_objective_qst_summary.html',
true,
true,
'Modules/Course');
1329 foreach ($tests as
$test) {
1330 $GLOBALS[
'ilLog']->write(__METHOD__ .
': ' . print_r($test,
true));
1332 $limit = $test[
'limit'];
1334 foreach ($this->objectives_qst_obj->getQuestionsOfTest($test[
'obj_id']) as $question) {
1335 $tpl->setCurrentBlock(
'qst');
1336 $tpl->setVariable(
'QST_TITLE', $question[
'title']);
1337 if (strlen($question[
'description'])) {
1338 $tpl->setVariable(
'QST_DESCRIPTION', $question[
'description']);
1340 $tpl->setVariable(
'QST_POINTS', $question[
'points'] .
' ' .
1341 $this->lng->txt(
'crs_objective_points'));
1342 $tpl->parseCurrentBlock();
1344 $tpl->setCurrentBlock(
'tst');
1347 $tpl->setVariable(
'TST_DESC', $desc);
1350 $tpl->setVariable(
'TST_ALT_IMG', $this->lng->txt(
'obj_tst'));
1351 $tpl->parseCurrentBlock();
1354 $tpl->setVariable(
'TXT_ALL_POINTS', $this->lng->txt(
'crs_objective_all_points'));
1355 $tpl->setVariable(
'TXT_POINTS', $this->lng->txt(
'crs_objective_points'));
1356 $tpl->setVariable(
'POINTS', $max_points);
1359 $this->form->addItem($over);
1363 $req->setValue($limit);
1365 $req->setMinValue(1);
1366 $req->setMaxValue(100);
1367 $req->setRequired(
true);
1369 case 'selfAssessment':
1370 $req->setInfo($this->lng->txt(
'crs_obj_initial_req_info'));
1374 $req->setInfo($this->lng->txt(
'crs_obj_final_req_info'));
1377 $this->form->addItem(
$req);
1389 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1394 $this->form =
new ilPropertyFormGUI();
1395 $this->form->setFormAction($this->ctrl->getFormAction($this));
1400 $this->form->setTitle($this->lng->txt(
'crs_objective_wiz_title'));
1401 $this->form->addCommandButton(
'save', $this->lng->txt(
'crs_wiz_next'));
1403 #$this->form->addCommandButton('listObjectives',$this->lng->txt('cancel')); 1412 $title->setValue($this->objective->getTitle());
1413 $title->setRequired(
true);
1415 $title->setMaxLength(70);
1416 $this->form->addItem(
$title);
1419 $desc->
setValue($this->objective->getDescription());
1422 $this->form->addItem($desc);
1436 1 => $this->lng->txt(
'crs_objective_wiz_title'),
1437 2 => $this->lng->txt(
'crs_objective_wiz_materials'),
1438 3 => $this->lng->txt(
'crs_objective_wiz_self'),
1439 4 => $this->lng->txt(
'crs_objective_wiz_self_limit'),
1440 5 => $this->lng->txt(
'crs_objective_wiz_final'),
1441 6 => $this->lng->txt(
'crs_objective_wiz_final_limit'));
1444 1 => $this->lng->txt(
'crs_objective_wiz_title_info'),
1445 2 => $this->lng->txt(
'crs_objective_wiz_materials_info'),
1446 3 => $this->lng->txt(
'crs_objective_wiz_self_info'),
1447 4 => $this->lng->txt(
'crs_objective_wiz_self_limit_info'),
1448 5 => $this->lng->txt(
'crs_objective_wiz_final_info'),
1449 6 => $this->lng->txt(
'crs_objective_wiz_final_limit_info'));
1452 1 => $this->ctrl->getLinkTarget($this,
'edit'),
1453 2 => $this->ctrl->getLinkTarget($this,
'materialAssignment'),
1454 3 => $this->ctrl->getLinkTarget($this,
'selfAssessmentAssignment'),
1455 4 => $this->ctrl->getLinkTarget($this,
'selfAssessmentLimits'),
1456 5 => $this->ctrl->getLinkTarget($this,
'finalTestAssignment'),
1457 6 => $this->ctrl->getLinkTarget($this,
'finalTestLimits'));
1463 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1467 if (
$_SESSION[
'objective_mode'] == self::MODE_CREATE) {
1469 $check_list->setHeading($this->lng->txt(
'crs_checklist_objective'));
1473 $check_list->setHeading($this->lng->txt(
'crs_checklist_objective'));
1485 if ($step == 3 and (!$this->
getSettings()->worksWithInitialTest() or $this->
getSettings()->hasSeparateInitialTests())) {
1488 if ($step == 4 and (!$this->
getSettings()->worksWithInitialTest() or $this->
getSettings()->hasSeparateInitialTests())) {
1491 if ($step == 5 and $this->
getSettings()->hasSeparateQualifiedTests()) {
1494 if ($step == 6 and $this->
getSettings()->hasSeparateQualifiedTests()) {
1506 if (
$_SESSION[
'objective_mode'] == self::MODE_UPDATE) {
1508 if ($step == 4 and !count($this->objectives_qst_obj->getSelfAssessmentQuestions())) {
1511 if ($step == 6 and !count($this->objectives_qst_obj->getFinalTestQuestions())) {
1515 if ($step == 3 and !$this->
getSettings()->worksWithInitialTest()) {
1518 if ($step == 4 and !$this->
getSettings()->worksWithInitialTest()) {
1523 $item_link = $links[$step];
1534 $GLOBALS[
"tpl"]->setRightContent($check_list->getHTML());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initFormRandom()
show random test
saveQuestionOverview()
update question overview
materialAssignment()
material assignment
static getInstanceByObjId($a_obj_id)
get singleton instance
selfAssessmentAssignment()
self assessment assignemnt
This class represents an option in a radio group.
if(isset($_REQUEST['delete'])) $list
__construct($a_course_id)
Constructor.
initFormTitle($a_mode, $a_step_number)
init form title
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
const TYPE_SELF_ASSESSMENT
updateMaterialAssignment()
update material assignment
listObjectives()
list objectives
updateSelfAssessmentLimits()
update self assessment limits
initWizard($a_step_number)
init wizard
questionOverview()
question overiew
static _lookupRandomTest($a_obj_id)
Returns the fact wether the test with passed obj id is a random questions test or not...
saveRandom()
Save random test settings.
updateFinalTestLimits()
update self assessment limits
deleteForObjectiveAndTestType($a_course_id, $a_objective_id, $a_tst_type)
Delete assignment for objective id and test type.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(!array_key_exists('StateId', $_REQUEST)) $id
setValue($a_value)
Set Value.
static _getObjectiveIds($course_id, $a_activated_only=false)
executeCommand()
execute command
finalTestLimits()
self assessment limits
static _lookupTitle($a_id)
lookup object title
TableGUI for material assignments of course objectives.
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...
isRandomTestType($a_tst_type=0)
static _hasTests($a_course_id)
public
__initQuestionObject($a_objective_id=0)
showRandomTestAssignment(ilPropertyFormGUI $form=null)
finalTestAssignment()
final test assignment
updateFinalTestAssignment()
update self assessment assignment
class ilCourseObjectiveMaterials
updateSelfAssessmentAssignment()
update self assessment assignment
class ilobjcourseobjectivesgui
if(isset($_POST['submit'])) $form
finalSeparatedTestAssignment(ilPropertyFormGUI $form=null)
Show test assignment form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupDescription($a_id)
lookup object description
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
setSubTabs($a_active="")
set sub tabs
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
initFormLimits($a_mode)
init limit form
static lookupSequencesByType($a_container_id, $a_objective_id, $a_test_id, $a_test_type)
Lookup sequence ids type $ilDB.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getSettings()
Get settings.
static _getAssignableMaterials($a_container_id)
Get an array of course material ids that can be assigned to learning objectives No tst...
saveSorting()
save position
This class represents a text area property in a property form.
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 _updateTestLimits($a_objective_id, $a_status, $a_limit)
update test limits
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
const TYPE_TEST_QUALIFIED
static lookupLimit($a_container_id, $a_objective_id, $a_test_type)
lookup limit type $ilDB
if(empty($password)) $table
__initLMObject($a_objective_id=0)
TableGUI for question assignments of course objectives.
class ilcourseobjectiveQuestion
__initObjectivesObject($a_id=0)
selfAssessmentLimits()
self assessment limits
static _getAssignableTests($a_container_ref_id)
Get assignable tests.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options