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) {
100 if ($objectiveId && $objtv[
'id'] != $objectiveId) {
104 $tpl->setCurrentBlock(
"objective_nolink_bl");
105 $tpl->setVariable(
"OBJECTIVE_NOLINK_TITLE", $objtv[
"title"]);
106 $tpl->parseCurrentBlock();
110 $tpl->setCurrentBlock(
"objective_bl");
111 $tpl->setVariable(
"OBJTV_ICON_URL", $objtv_icon);
112 $tpl->setVariable(
"OBJTV_ICON_ALT", $this->lng->txt(
"crs_objectives"));
114 if ($objtv[
"type"]) {
125 $DIC->ctrl()->setParameterByClass(
'ilObjTestGUI',
'ref_id', (
int)
$_GET[
'ref_id']);
128 $tpl->parseCurrentBlock();
131 $tpl->setCurrentBlock(
"objectives_bl");
133 $tpl->parseCurrentBlock();
141 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
142 include_once
"Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
144 $coll_objtv = $coll_objtv->getItems();
149 include_once
"Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
154 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
155 foreach ($coll_objtv as $objective_id) {
160 $tmp[$objective_id] = array(
161 "id" => $objective_id,
162 "title" =>
$title[
"title"],
163 "desc" =>
$title[
"description"],
170 if (array_key_exists($objective_id, $lo_results)) {
171 $lo_result = $lo_results[$objective_id];
172 $tmp[$objective_id][
"user_id"] = $lo_result[
"user_id"];
173 $tmp[$objective_id][
"result_perc"] = $lo_result[
"result_perc"];
174 $tmp[$objective_id][
"limit_perc"] = $lo_result[
"limit_perc"];
175 $tmp[$objective_id][
"status"] = $lo_result[
"status"];
176 $tmp[$objective_id][
"type"] = $lo_result[
"type"];
177 $tmp[$objective_id][
"initial"] = $lo_result[
"initial"];
182 foreach ($coll_objtv as $objtv_id) {
183 $res[] = $tmp[$objtv_id];
194 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
197 foreach ($lur->getCourseResultsForUserPresentation() as $objective_id => $types) {
213 $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...
foreach($_POST as $key=> $value) $res
getHTML($objectiveId=null)
special template class to simplify handling of ITX/PEAR
getHeaderLangVar($objectiveId)
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