25include_once(
"./Services/Container/classes/class.ilContainerContentGUI.php");
 
   68        $this->tabs = 
$DIC->tabs();
 
   69        $this->access = 
$DIC->access();
 
   70        $this->
user = $DIC->user();
 
   72        $this->ctrl = 
$DIC->ctrl();
 
   73        $this->toolbar = 
$DIC->toolbar();
 
   77        parent::__construct($a_container_gui);
 
  132        include_once 
'Services/Object/classes/class.ilObjectListGUIFactory.php';
 
  134        $tpl = 
new ilTemplate(
"tpl.container_page.html", 
true, 
true, 
"Services/Container");
 
  138            include_once 
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
 
  140                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  142                $ilToolbar->addButton(
 
  143                    $lng->txt(
'crs_reset_results'),
 
  158        include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
  163        if (!$is_manage && !$is_order) {
 
  173            include_once 
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
 
  176            include_once 
'./Modules/Test/classes/class.ilObjTestAccess.php';
 
  180                $this->loc_settings->getInitialTest() &&
 
  181                $this->loc_settings->isGeneralInitialTestVisible() &&
 
  182                !$this->loc_settings->isInitialTestStart() &&
 
  185                $this->output_html .= $this->
renderTest($this->loc_settings->getInitialTest(), 
null, 
true, 
true);
 
  187                $this->loc_settings->getQualifiedTest() &&
 
  188                $this->loc_settings->isGeneralQualifiedTestVisible()
 
  190                $this->output_html .= $this->
renderTest($this->loc_settings->getQualifiedTest(), 
null, 
false, 
true);
 
  199        include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
  205                if (!$is_manage && !$is_order) {
 
  211        $tpl->setVariable(
'CONTAINER_PAGE_CONTENT', $this->output_html);
 
  228        include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
 
  234        $info_tpl = 
new ilTemplate(
'tpl.crs_objectives_view_info_table.html', 
true, 
true, 
'Modules/Course');
 
  235        $info_tpl->setVariable(
"INFO_STRING", 
$lng->txt(
'crs_objectives_info_' . $status));
 
  237        $this->output_html .= $info_tpl->get();
 
  255        $has_container_page = 
false;
 
  259                $has_container_page = 
true;
 
  266        include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
  271        include_once(
'./Modules/Course/classes/class.ilCourseObjectiveListGUI.php');
 
  273        $this->objective_list_gui->setContainerObject($this->
getContainerGUI());
 
  274        if (
$ilSetting->get(
"icon_position_in_lists") == 
"item_rows") {
 
  275            $this->objective_list_gui->enableIcon(
true);
 
  280            include_once 
"Services/Accordion/classes/class.ilAccordionGUI.php";
 
  282            $acc->setUseSessionStorage(
true);
 
  283            $acc->setAllowMultiOpened(
true);
 
  285            $acc->setId(
"crsobjtv_" . $this->container_obj->getId());
 
  287            $this->renderer->addCustomBlock(
'lobj', 
$lng->txt(
'crs_objectives'));
 
  294        $has_lo_page = 
false;
 
  296        foreach ($objective_ids as $objective_id) {
 
  297            include_once 
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
 
  301                    !isset($lur_data[$objective_id]) or
 
  303                        $this->container_obj->getId(),
 
  312            if (
$html = $this->
renderObjective($objective_id, $has_lo_page, $acc, $lur_data[$objective_id])) {
 
  313                $this->renderer->addItemToBlock(
'lobj', 
'lobj', $objective_id, 
$html);
 
  319        if (!$a_is_order && $obj_cnt > 1) {
 
  320            $this->
showButton(
"", 
$lng->txt(
"crs_show_all_obj"), 
"", 
"crs_show_all_obj_btn");
 
  321            $this->
showButton(
"", 
$lng->txt(
"crs_hide_all_obj"), 
"", 
"crs_hide_all_obj_btn");
 
  322            $acc->setShowAllElement(
"crs_show_all_obj_btn");
 
  323            $acc->setHideAllElement(
"crs_hide_all_obj_btn");
 
  326        if (!$has_container_page && $has_lo_page) {
 
  328            include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  330                "LOCATION_CONTENT_STYLESHEET",
 
  333            $GLOBALS[
"tpl"]->setCurrentBlock(
"SyntaxStyle");
 
  335                "LOCATION_SYNTAX_STYLESHEET",
 
  338            $GLOBALS[
"tpl"]->parseCurrentBlock();
 
  345            $this->output_html .= 
$output_html . $this->renderer->getHTML();
 
  347            $this->renderer->resetDetails();
 
  351            $this->output_html .= 
"<div class='ilCrsObjAcc'>" . $acc->getHTML() . 
"</div>";
 
  383    protected function renderTest($a_test_ref_id, $a_objective_id, $a_is_initial = 
false, $a_add_border = 
false, $a_lo_result = array())
 
  386        if ($a_test_ref_id) {
 
  387            $node_data = 
$GLOBALS[
'tree']->getNodeData($a_test_ref_id);
 
  389        if (!$node_data[
'child']) {
 
  394        if ($a_objective_id) {
 
  400            $node_data[
'objective_id'] = $a_objective_id;
 
  401            $node_data[
'objective_status'] =
 
  415                            ? $this->lng->txt(
'crs_loc_itest_info')
 
  416                            : $this->lng->txt(
'crs_loc_qtest_info')
 
  420            $node_data[
'objective_id'] = 0;
 
  423        $node_data[
'title'] = 
$title;
 
  425        return "<div class='ilContObjectivesViewTestItem'>" . $this->
renderItem($node_data) . 
"</div>";
 
  435    public function showMaterials($a_tpl, $a_mode = 
null, $a_is_manage = 
false, $a_as_accordion = 
false)
 
  442        if (is_array($this->items[
"_all"])) {
 
  449            foreach ($this->items[
"_all"] as $k => $item_data) {
 
  450                if ($a_mode == self::MATERIALS_TESTS and $item_data[
'type'] != 
'tst') {
 
  453                if ($item_data[
'type'] == 
'itgr') {
 
  458                    include_once 
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
 
  459                    include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
  466                if ($this->rendered_items[$item_data[
"child"]] !== 
true &&
 
  467                    !$this->renderer->hasItem($item_data[
"child"])) {
 
  468                    $this->rendered_items[$item_data[
'child']] = 
true;
 
  471                    $html = $this->
renderItem($item_data, $position++, $a_mode == self::MATERIALS_TESTS ? 
false : 
true);
 
  473                        $item_r[] = array(
"html" => 
$html, 
"id" => $item_data[
"child"], 
"type" => $item_data[
"type"]);
 
  479            if (count($item_r) > 0) {
 
  480                if (!$a_as_accordion) {
 
  486                            $this->renderer->addTypeBlock($block_id);
 
  491                            $this->renderer->addCustomBlock($block_id, 
$lng->txt(
'crs_other_resources'));
 
  497                            $this->renderer->addCustomBlock($block_id, 
$lng->txt(
'content'));
 
  502                    if ($a_mode != self::MATERIALS_TESTS) {
 
  506                    foreach ($item_r as 
$h) {
 
  507                        if (!$this->renderer->hasItem(
$h[
"id"])) {
 
  508                            $this->renderer->addItemToBlock($block_id, 
$h[
"type"], 
$h[
"id"], 
$h[
"html"]);
 
  512                    $this->output_html .= $this->renderer->getHTML();
 
  520                            $txt = 
$lng->txt(
'crs_other_resources');
 
  524                    include_once 
"Services/Accordion/classes/class.ilAccordionGUI.php";
 
  526                    $acc->setId(
"crsobjtvmat" . $a_mode . 
"_" . $this->container_obj->getId());
 
  528                    $acc_content = array();
 
  529                    foreach ($item_r as 
$h) {
 
  530                        $acc_content[] = 
$h[
"html"];
 
  534                    $this->output_html .= $acc->getHTML();
 
  542        $objective_map = array();
 
  543        include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
  547            include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
 
  548            foreach ($objective_ids as $objective_id) {
 
  550                    $objective_map[
"material"][$mat_ref_id][] = $objective_id;
 
  552                    if (!isset($objective_map[
"names"][$objective_id])) {
 
  554                        $objective_map[
"names"][$objective_id] = $objective->getTitle();
 
  560            $tst = $this->loc_settings->getInitialTest();
 
  562                $objective_map[
"test_i"] = $tst;
 
  564            $tst = $this->loc_settings->getQualifiedTest();
 
  566                $objective_map[
"test_q"] = $tst;
 
  570            include_once 
'Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
  571            include_once 
'Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
 
  575                $objective_map[
"test_ass"][$ass->getTestRefId()][$ass->getAssignmentType()][] = 
$title;
 
  579                $objective_map[
"test_ass"][$ass->getTestRefId()][$ass->getAssignmentType()][] = 
$title;
 
  583        return $objective_map;
 
  591        $item_ref_id = $a_item[
"ref_id"];
 
  593        if (is_array($this->objective_map)) {
 
  595            if (isset($this->objective_map[
"material"][$item_ref_id])) {
 
  597                foreach ($this->objective_map[
"material"][$item_ref_id] as $objective_id) {
 
  598                    $ilCtrl->setParameterByClass(
'ilcourseobjectivesgui', 
'objective_id', $objective_id);
 
  599                    $url = 
$ilCtrl->getLinkTargetByClass(array(
'illoeditorgui', 
'ilcourseobjectivesgui'), 
'edit');
 
  600                    $ilCtrl->setParameterByClass(
'ilcourseobjectivesgui', 
'objective_id', 
'');
 
  603                        'desc' => 
$lng->txt(
'crs_loc_tab_materials') . 
': ',
 
  606                        'name' => $this->objective_map[
"names"][$objective_id]
 
  610            if ($this->objective_map[
"test_i"] == $item_ref_id) {
 
  611                $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 1);
 
  615                    'link' => 
$ilCtrl->getLinkTargetByClass(
'illoeditorgui', 
'testOverview'),
 
  616                    'name' => 
$lng->txt(
'crs_loc_tab_itest')
 
  618                $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 0);
 
  620            if ($this->objective_map[
"test_q"] == $item_ref_id) {
 
  621                $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 2);
 
  625                    'link' => 
$ilCtrl->getLinkTargetByClass(
'illoeditorgui', 
'testOverview'),
 
  626                    'name' => 
$lng->txt(
'crs_loc_tab_qtest')
 
  628                $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 0);
 
  632            if (is_array($this->objective_map[
"test_ass"][$item_ref_id])) {
 
  633                foreach ($this->objective_map[
"test_ass"][$item_ref_id] as 
$type => $items) {
 
  635                        $caption = 
$lng->txt(
'crs_loc_tab_itest');
 
  636                        $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 1);
 
  638                        $caption = 
$lng->txt(
'crs_loc_tab_qtest');
 
  639                        $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 2);
 
  641                    foreach ($items as $objtv_title) {
 
  645                            'link' => 
$ilCtrl->getLinkTargetByClass(
'illoeditorgui', 
'testsOverview'),
 
  646                            'name' => $caption . 
" (" . $this->lng->txt(
"crs_loc_learning_objective") . 
": " . $objtv_title . 
")" 
  649                    $ilCtrl->setParameterByClass(
'illoeditorgui', 
'tt', 0);
 
  653            if (
sizeof($details)) {
 
  672        if ($a_item[
'objective_id']) {
 
  676            if ($this->loc_settings->getQualifiedTest() == $a_item[
'ref_id']) {
 
  679                include_once 
'./Services/AccessControl/classes/class.ilConditionHandler.php';
 
  681                if (!$fullfilled || $a_item[
'objective_status']) {
 
  685            include_once 
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
 
  689                $a_item[
'objective_id'],
 
  695            if (
$res[
'is_final']) {
 
  699                    $this->lng->txt(
'crs_loc_passes_reached'),
 
  703            } elseif ($this->loc_settings->getQualifiedTest() == $a_item[
'ref_id']) {
 
  704                include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
  710                        $this->lng->txt(
'crs_loc_passes_left'),
 
  711                        (($poss_pass - 
$res[
'tries']) > 0) ? ($poss_pass - 
$res[
'tries']) : 1,
 
  719    protected function updateResult($a_res, $a_item_ref_id, $a_objective_id, $a_user_id)
 
  721        if ($this->loc_settings->getQualifiedTest() == $a_item_ref_id) {
 
  723            include_once 
'./Modules/Test/classes/class.ilObjTest.php';
 
  724            include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
  731                include_once 
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
 
  737                    ($a_res[
'tries'] > 0) ? --$a_res[
'tries'] : 0;
 
  738                    $a_res[
'is_final'] = 0;
 
  760        include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
 
  763        include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
 
  764        include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
 
  770        include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
 
  775        foreach ($objectives_lm_obj->getMaterials() as $item) {
 
  776            $sort_map[$item[
"lm_ass_id"]] = $item[
"position"];
 
  782        $sort_content = array();
 
  784        foreach ($items as $item) {
 
  790            $item_list_gui2->enableIcon(
true);
 
  792            if ($is_order || $a_accordion) {
 
  793                $item_list_gui2->enableCommands(
true, 
true);
 
  794                $item_list_gui2->enableProperties(
false);
 
  797            $chapters = $objectives_lm_obj->getChapters();
 
  798            if (count($chapters)) {
 
  799                $has_sections = 
false;
 
  800                foreach ($chapters as $chapter) {
 
  801                    if ($chapter[
'ref_id'] != $item[
'child']) {
 
  804                    $has_sections = 
true;
 
  806                    include_once 
'./Modules/LearningModule/classes/class.ilLMObject.php';
 
  809                        " (" . 
$lng->txt(
'obj_' . $chapter[
'type']) . 
")";
 
  811                    $item_list_gui2->setDefaultCommandParameters(array(
 
  812                        "obj_id" => $chapter[
'obj_id'],
 
  813                        "focus_id" => $chapter[
'obj_id'],
 
  814                        "focus_return" => $this->container_obj->getRefId()));
 
  817                        $item_list_gui2->setPositionInputField(
 
  818                            "[lobj][" . $a_objective_id . 
"][" . $chapter[
'lm_ass_id'] . 
"]",
 
  819                            sprintf(
'%d', $chapter[
'position']*10)
 
  823                    $sub_item_html = $item_list_gui2->getListItemHTML(
 
  831                    $sort_key = str_pad($chapter[
'position'], 5, 0, STR_PAD_LEFT) . 
"_" . strtolower(
$title) . 
"_" . $chapter[
'lm_ass_id'];
 
  832                    $sort_content[$sort_key] = $sub_item_html;
 
  836            $this->rendered_items[$item[
'child']] = 
true;
 
  838            if ($lm_ass_id = $objectives_lm_obj->isAssigned($item[
'ref_id'], 
true)) {
 
  840                    $item_list_gui2->setPositionInputField(
 
  841                        "[lobj][" . $a_objective_id . 
"][" . $lm_ass_id . 
"]",
 
  842                        sprintf(
'%d', $sort_map[$lm_ass_id]*10)
 
  846                $sub_item_html = $item_list_gui2->getListItemHTML(
 
  854                $sort_key = str_pad($sort_map[$lm_ass_id], 5, 0, STR_PAD_LEFT) . 
"_" . strtolower($item[
'title']) . 
"_" . $lm_ass_id;
 
  855                $sort_content[$sort_key]  = $sub_item_html;
 
  860            $this->objective_list_gui->enableCommands(
false);
 
  862            $this->objective_list_gui->enableCommands(
true);
 
  866            $this->objective_list_gui->setPositionInputField(
 
  867                "[lobj][" . $a_objective_id . 
"][0]",
 
  868                $objective->__getPosition()*10
 
  872        ksort($sort_content);
 
  875            foreach ($sort_content as $sub_item_html) {
 
  876                $this->objective_list_gui->addSubItemHTML($sub_item_html);
 
  879            return $this->objective_list_gui->getObjectiveListItemHTML(
 
  882                $objective->getTitle(),
 
  883                $objective->getDescription(),
 
  884                ($is_manage || $is_order)
 
  887            $acc_content = $sort_content;
 
  889            $initial_shown = 
false;
 
  892            include_once 
'./Modules/Test/classes/class.ilObjTestAccess.php';
 
  895                $initial_test_obj_id &&
 
  906                $initial_shown = 
true;
 
  907            } elseif ($this->
getSettings()->hasSeparateQualifiedTests()) {
 
  935            include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
 
  937                $a_has_lo_page = 
true;
 
  939                include_once 
'Modules/Course/classes/Objectives/class.ilLOPageGUI.php';
 
  940                $page_gui = 
new ilLOPageGUI($objective->getObjectiveId());
 
  942                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  944                $page_gui->setPresentationTitle(
"");
 
  945                $page_gui->setTemplateOutput(
false);
 
  946                $page_gui->setHeader(
"");
 
  948                $co_page = 
"<div class='ilContObjectiveIntro'>" . $page_gui->showPage() . 
"</div>";
 
  951            $a_accordion->addItem(
 
  955                (isset(
$_GET[
"oobj"]) && (
int) 
$_GET[
"oobj"] == $objective->getObjectiveId())
 
  977        include_once 
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
 
  992        include_once 
"Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
 
  995        include_once 
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
 
  997        foreach ($lur->getCourseResultsForUserPresentation() as $objective_id => $types) {
 
 1013            $result[
"initial_status"] = $initial_status;
 
 1039    public static function renderProgressBar($a_perc_result = 
null, $a_perc_limit = 
null, $a_css = 
null, $a_caption = 
null, $a_url = 
null, $a_tt_id = 
null, $a_tt_txt = 
null, $a_next_step = 
null, $a_sub = 
false, $a_sub_style = 30)
 
 1041        $tpl = 
new ilTemplate(
"tpl.objective_progressbar.html", 
true, 
true, 
"Services/Container");
 
 1043        if ($a_perc_result !== 
null) {
 
 1044            $tpl->setCurrentBlock(
"statusbar_bl");
 
 1045            $tpl->setVariable(
"PERC_STATUS", $a_perc_result);
 
 1046            $tpl->setVariable(
"PERC_WIDTH", $a_perc_result);
 
 1047            $tpl->setVariable(
"PERC_COLOR", $a_css);
 
 1048            if ($a_perc_limit) {
 
 1050                $limit_pos = (99-(int) $a_perc_limit)*-1;
 
 1051                $tpl->setVariable(
"LIMIT_POS", $limit_pos);
 
 1055                $tpl->setVariable(
"TT_ID", $a_tt_id);
 
 1057            $tpl->parseCurrentBlock();
 
 1062                include_once 
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
 
 1064                $button->setCaption($a_caption, 
false);
 
 1065                $button->setUrl($a_url);
 
 1067                $tpl->setCurrentBlock(
"statustxt_bl");
 
 1068                $tpl->setVariable(
"TXT_PROGRESS_STATUS", $button->render());
 
 1069                $tpl->parseCurrentBlock();
 
 1071                $tpl->setCurrentBlock(
"statustxt_no_link_bl");
 
 1072                $tpl->setVariable(
"TXT_PROGRESS_STATUS_NO_LINK", $a_caption);
 
 1073                $tpl->parseCurrentBlock();
 
 1078            $tpl->setCurrentBlock(
"nstep_bl");
 
 1079            $tpl->setVariable(
"TXT_NEXT_STEP", $a_next_step);
 
 1080            $tpl->parseCurrentBlock();
 
 1085            include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
 
 1090            $tpl->setVariable(
"SUB_STYLE", 
' style="padding-left: ' . $a_sub_style . 
'px;"');
 
 1091            $tpl->setVariable(
"SUB_INIT", $a_sub);
 
 1108    public static function buildObjectiveProgressBar($a_has_initial_test, $a_objective_id, array $a_lo_result, $a_list_mode = 
false, $a_sub = 
false, $a_tt_suffix = 
null)
 
 1116        $tooltip_id = 
"crsobjtvusr_" . $a_objective_id . 
"_" . $a_lo_result[
"type"] . 
"_" . ((int) $a_sub);
 
 1117        if ($a_tt_suffix !== 
null) {
 
 1118            $tooltip_id .= 
"_" . $a_tt_suffix;
 
 1122            $lng->txt(
"crs_loc_tt_info"),
 
 1123            $a_lo_result[
"result_perc"],
 
 1124            $a_lo_result[
"limit_perc"]
 
 1128        include_once 
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
 
 1129        include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
 1136        $next_step = $progress_txt = $bar_color = $test_url = $initial_sub = 
null;
 
 1138        if ($is_qualified ||
 
 1139            $is_qualified_initial) {
 
 1140            $progress_txt = 
$lng->txt(
"crs_loc_progress_result_qtest");
 
 1141            $tt_txt = 
$lng->txt(
"crs_loc_tab_qtest") . 
": " . $tt_txt;
 
 1143            if ($has_completed) {
 
 1144                $next_step = 
$lng->txt(
"crs_loc_progress_objective_complete");
 
 1145                $bar_color = 
"ilCourseObjectiveProgressBarCompleted";
 
 1148                if ($is_qualified &&
 
 1149                    $a_has_initial_test &&
 
 1150                    is_array($a_lo_result[
"initial"])) {
 
 1151                    $a_lo_result[
"initial"][
"itest"] = $a_lo_result[
"itest"];
 
 1157                $next_step = 
$lng->txt(
"crs_loc_progress_do_qualifying_again");
 
 1158                $bar_color = 
"ilCourseObjectiveProgressBarFailed";
 
 1163            if ($a_lo_result[
"status"]) {
 
 1164                $progress_txt = 
$lng->txt(
"crs_loc_progress_result_itest");
 
 1165                $tt_txt = 
$lng->txt(
"crs_loc_tab_itest") . 
": " . $tt_txt;
 
 1167                $bar_color = 
"ilCourseObjectiveProgressBarNeutral";
 
 1168                $next_step = $has_completed
 
 1169                    ? 
$lng->txt(
"crs_loc_progress_do_qualifying")
 
 1170                    : 
$lng->txt(
"crs_loc_suggested");
 
 1174                $next_step = (bool) $a_has_initial_test
 
 1175                    ? 
$lng->txt(
"crs_loc_progress_no_result_do_initial")
 
 1176                    : 
$lng->txt(
"crs_loc_progress_no_result_no_initial");
 
 1182        if ($a_lo_result[
"qtest"]) {
 
 1186        if (!$test_url && $a_lo_result[
"itest"]) {
 
 1191            $a_lo_result[
"result_perc"],
 
 1192            $a_lo_result[
"limit_perc"],
 
 1210        $tpl = 
new ilTemplate(
"tpl.objective_accordion_title.html", 
true, 
true, 
"Services/Container");
 
 1215                self::buildObjectiveProgressBar(
 
 1216                    (
bool) $this->loc_settings->worksWithInitialTest(),
 
 1225        $tpl->setVariable(
"TITLE", $this->lng->txt(
"crs_loc_learning_objective") . 
": " . trim($a_objective->
getTitle()));
 
 1236        $tpl = 
new ilTemplate(
"tpl.objective_accordion_content.html", 
true, 
true, 
"Services/Container");
 
 1237        foreach ($a_items as $item) {
 
 1238            $tpl->setCurrentBlock(
"items_bl");
 
 1239            $tpl->setVariable(
"ITEM", $item);
 
 1240            $tpl->parseCurrentBlock();
 
 1252    protected function showButton($a_cmd, $a_text, $a_target = 
'', $a_id = 
"")
 
 1258        $ilToolbar->addButton(
 
 1260            $ilCtrl->getLinkTarget($this->getContainerGUI(), $a_cmd),
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
const IL_OBJECTIVE_STATUS_EMPTY
Accordion user interface class.
static _checkAllConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type="", $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
Parent class of all container content GUIs.
initRenderer()
Init container renderer.
getContainerObject()
Get container object.
getContainerGUI()
Get container GUI object.
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
getItemGroupsHTML($a_pos=0)
Get item groups HTML.
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
clearAdminCommandsDetermination()
cleaer administration commands determination
GUI class for course objective view.
renderObjective($a_objective_id, &$a_has_lo_page, ilAccordionGUI $a_accordion=null, array $a_lo_result=null)
render objective
parseLOUserResults()
Parse learning objective results.
buildAccordionTitle(ilCourseObjective $a_objective, array $a_lo_result=null)
showButton($a_cmd, $a_text, $a_target='', $a_id="")
show action button
static buildObjectiveProgressBar($a_has_initial_test, $a_objective_id, array $a_lo_result, $a_list_mode=false, $a_sub=false, $a_tt_suffix=null)
Render progressbar(s) for given objective and result data.
addItemDetails(ilObjectListGUI $a_item_list_gui, array $a_item)
addFooterRow()
add footer row
buildAccordionContent(array $a_items)
__construct($a_container_gui)
Constructor.
getDetailsLevel($a_objective_id)
get details level
updateResult($a_res, $a_item_ref_id, $a_objective_id, $a_user_id)
showMaterials($a_tpl, $a_mode=null, $a_is_manage=false, $a_as_accordion=false)
Show all other (no assigned tests, no assigned materials) materials.
renderTest($a_test_ref_id, $a_objective_id, $a_is_initial=false, $a_add_border=false, $a_lo_result=array())
showObjectives($a_tpl, $a_is_order=false)
show objectives
getMainContent()
Impementation of abstract method getMainContent.
showStatus($tpl)
show status
static renderProgressBar($a_perc_result=null, $a_perc_limit=null, $a_css=null, $a_caption=null, $a_url=null, $a_tt_id=null, $a_tt_txt=null, $a_next_step=null, $a_sub=false, $a_sub_style=30)
Render progress bar(s)
initDetails()
init details
getTestAssignments()
Get test assignments object.
List gui for course objectives.
class ilCourseObjectiveMaterials
static _getAssignedMaterials($a_objective_id)
get assigned materials
static getStatus($a_usr_id, $a_crs_id)
get status of user
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
static lookupMaxPasses($a_objective_id)
static _getObjectiveIds($course_id, $a_activated_only=false)
static _lookupTitle($a_obj_id)
Lookup title.
(Course) learning objective page GUI class
const TYPE_TEST_QUALIFIED
const TYPE_TEST_UNDEFINED
static getInstanceByObjId($a_obj_id)
get singleton instance
static getInstance($a_container_id)
Get instance by container id.
static lookupRunExistsForObjective($a_test_id, $a_objective_id, $a_user_id)
@global type $ilDB
static hasResults($a_container_id, $a_user_id)
static lookupResult($a_course_obj_id, $a_user_id, $a_objective_id, $a_tst_type)
Lookup user result.
static hasActiveRun($a_container_id, $a_test_ref_id, $a_objective_id)
static getTestResultLinkForUser($a_test_ref_id, $a_user_id)
static getSyntaxStylePath()
get syntax style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static checkCondition($a_obj_id, $a_operator, $a_value, $a_usr_id)
check condition
static isParticipantsLastPassActive($testRefId, $userId)
static getItemsByObjective($a_objective_id)
Get objective items.
setConditionTarget($a_ref_id, $a_obj_id, $a_target_type)
enableCommands($a_status, $a_std_only=false)
En/disable commands.
setDefaultCommandParameters(array $a_params)
enableProperties($a_status)
En/disable properties.
disableTitleLink($a_status)
enableItemDetailLinks($a_status)
enable item detail links E.g Direct links to chapters or pages
addCustomProperty( $a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
setItemDetailLinks($a_detail_links, $a_intro_txt='')
set items detail links
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
special template class to simplify handling of ITX/PEAR
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
foreach($_POST as $key=> $value) $res