4 require_once
'Services/Container/classes/class.ilContainerObjectiveGUI.php';
66 public function getHTML($objectiveId = null)
68 $this->lng->loadLanguageModule(
'crs');
70 $tpl =
new ilTemplate(
'tpl.tst_lo_status.html',
true,
true,
'Modules/Test');
72 $tpl->setCurrentBlock(
'objectives_progress_header');
73 $tpl->setVariable(
'OBJECTIVES_PROGRESS_HEADER', $this->lng->txt($this->getHeaderLangVar($objectiveId)));
74 $tpl->parseCurrentBlock();
87 return 'tst_objective_progress_header';
90 return 'tst_objectives_progress_header';
95 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
97 $has_initial_test = (bool)$loc_settings->getInitialTest();
99 foreach($loStatusData as $objtv)
101 if($objectiveId && $objtv[
'id'] != $objectiveId)
106 $tpl->setCurrentBlock(
"objective_nolink_bl");
107 $tpl->setVariable(
"OBJECTIVE_NOLINK_TITLE", $objtv[
"title"]);
108 $tpl->parseCurrentBlock();
112 $tpl->setCurrentBlock(
"objective_bl");
113 $tpl->setVariable(
"OBJTV_ICON_URL", $objtv_icon);
114 $tpl->setVariable(
"OBJTV_ICON_ALT", $this->lng->txt(
"crs_objectives"));
118 $tpl->setVariable(
"LP_OBJTV_PROGRESS",
127 $DIC->ctrl()->setParameterByClass(
'ilObjTestGUI',
'ref_id', (
int)
$_GET[
'ref_id']);
130 $tpl->parseCurrentBlock();
133 $tpl->setCurrentBlock(
"objectives_bl");
135 $tpl->parseCurrentBlock();
143 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
144 include_once
"Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
146 $coll_objtv = $coll_objtv->getItems();
152 include_once
"Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
157 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
158 foreach($coll_objtv as $objective_id)
164 $tmp[$objective_id] =
array(
165 "id" => $objective_id,
166 "title" =>
$title[
"title"],
167 "desc" =>
$title[
"description"],
174 if(array_key_exists($objective_id, $lo_results))
176 $lo_result = $lo_results[$objective_id];
177 $tmp[$objective_id][
"user_id"] = $lo_result[
"user_id"];
178 $tmp[$objective_id][
"result_perc"] = $lo_result[
"result_perc"];
179 $tmp[$objective_id][
"limit_perc"] = $lo_result[
"limit_perc"];
180 $tmp[$objective_id][
"status"] = $lo_result[
"status"];
181 $tmp[$objective_id][
"type"] = $lo_result[
"type"];
182 $tmp[$objective_id][
"initial"] = $lo_result[
"initial"];
187 foreach($coll_objtv as $objtv_id)
189 $res[] = $tmp[$objtv_id];
200 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
203 foreach($lur->getCourseResultsForUserPresentation() as $objective_id => $types)
224 $result[
"initial_status"] = $initial_status;
getUsersObjectivesStatus($crsObjId, $usrId)
static getInstanceByObjId($a_obj_id)
get singleton instance
static getInstance($a_container_id)
Get instance by container id.
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
LP collection of objectives.
renderStatus($tpl, $objectiveId, $loStatusData)
__construct(ilLanguage $lng)
getUsersObjectivesResults($crsObjId, $usrId)
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...
getHTML($objectiveId=null)
special template class to simplify handling of ITX/PEAR
getHeaderLangVar($objectiveId)
Create styles array
The data for the language used.
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.
const TYPE_TEST_QUALIFIED