40 include_once
'./Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
41 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
57 $this->current_user_id = $a_tracked_user;
64 return $this->current_user_id;
74 $this->ctrl->setReturn($this,
"");
75 switch($this->ctrl->getNextClass())
78 $cmd = $this->ctrl->getCmd();
87 $this->type = $a_type;
100 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
103 include_once
'./Services/Tracking/classes/class.ilLPFilter.php';
104 $this->filter =
new ilLPFilter($ilUser->getId());
106 include_once
'./Services/Tracking/classes/class.ilLPFilterGUI.php';
107 $this->filter_gui =
new ilLPFilterGUI($ilUser->getId());
124 $this->ctrl->returnToParent($this);
142 global $ilObjDataCache;
144 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
146 $this->writer->xmlHeader();
147 $this->writer->xmlStartTag(
'LearningProgress');
148 $this->writer->xmlElement(
'Title',null,$this->lng->txt(
'learning_progress'));
152 $this->writer->xmlElement(
'Header',null,$header);
155 $this->writer->xmlElement(
'Footer',null,
'powered by ILIAS');
158 include_once
'Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
159 $this->details_obj_id = $ilObjDataCache->lookupObjId($this->
getRefId());
160 $item_list =& ilLPItemListFactory::_getInstance(0,$this->details_obj_id,$ilObjDataCache->lookupType($this->details_obj_id));
164 $item_list->setCurrentUser($this->current_user_id);
165 $item_list->readUserInfo();
166 $item_list->renderObjectInfoXML($this->writer,
true,
true);
170 $item_list->renderObjectInfoXML($this->writer,
false,
false);
173 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
179 $this->writer->xmlEndTag(
'LearningProgress');
187 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
189 global $ilObjDataCache,$ilUser;
199 $all_users = array_merge($completed,$in_progress,$not_attempted,$failed);
200 $all_users = $this->
__sort($all_users,
'usr_data',
'lastname',
'usr_id');
204 $all_users = array($this->current_user_id);
209 $this->writer->xmlStartTag(
'Items');
210 $this->writer->xmlStartTag(
'ItemHeader');
211 $this->writer->xmlElement(
'HeaderTitle',null,$this->lng->txt(
'trac_objects'));
214 include_once
'Modules/Course/classes/class.ilCourseItems.php';
217 $this->writer->xmlElement(
'HeaderInfo',null,$this->lng->txt(
'trac_head_timing'));
219 $this->writer->xmlEndTag(
'ItemHeader');
222 $this->container_row_counter = 0;
223 foreach($all_users as $user)
225 $this->writer->xmlStartTag(
'Item');
227 $this->writer->xmlEndTag(
'Item');
229 $this->writer->xmlEndTag(
'Items');
233 global $ilObjDataCache,$ilUser,$ilAccess;
235 include_once
'Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
237 $item_list =& ilLPItemListFactory::_getInstanceByRefId($a_parent_id,$a_item_id,
$type);
238 if($this->has_timings)
240 $item_list->readTimings();
241 $item_list->enable(
'timings');
243 $item_list->setCurrentUser($a_usr_id);
244 $item_list->readUserInfo();
245 $item_list->setIndentLevel($level);
248 $item_list->renderObjectDetailsXML($this->writer);
250 if(
$type ==
'sahs_item' or
251 $type ==
'objective' or
257 include_once
'./Services/Tracking/classes/class.ilLPCollectionCache.php';
260 switch($item_list->getMode())
263 $this->writer->xmlStartTag(
'Item');
265 $this->writer->xmlEndTag(
'Item');
269 $this->writer->xmlStartTag(
'Item');
271 $this->writer->xmlEndTag(
'Item');
275 if(!$ilAccess->checkAccess(
'read',
'',$child_id))
279 $this->writer->xmlStartTag(
'Item');
281 $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($child_id)),$level + 2);
282 $this->writer->xmlEndTag(
'Item');
290 include_once
'Services/Transformation/classes/class.ilXML2FO.php';
293 $xml2FO->setXSLTLocation($this->tpl->getTemplatePath(
'learning_progress_fo.xsl',
'Services/Tracking'));
294 $xml2FO->setXMLString($this->writer->xmlDumpMem());
295 $xml2FO->transform();
297 $this->fo_string = $xml2FO->getFOString();
298 #var_dump("<pre>",htmlentities($this->fo_string),"<pre>");
306 include_once
'./Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
315 $ilLog->write(__METHOD__.
': '.$e->getMessage());
316 $this->ctrl->returnToParent($this);
322 $ilLog->write(__METHOD__.
': '.$e->getMessage());
323 $this->ctrl->returnToParent($this);
330 global $ilObjDataCache,$ilUser;
333 $this->tpl =
new ilTemplate(
'tpl.lp_pdf_list.xml',
true,
true,
'Services/Tracking');
336 $this->tpl->setVariable(
"FILTER",$this->filter_gui->getFO());
337 $this->filter->setRequiredPermission(
'read');
338 $type = $this->filter->getFilterType();
339 $this->tpl->setVariable(
"TXT_OBJS",$this->lng->txt(
'objs_'.$type));
342 $objs = $this->filter->getObjects();
343 $sorted_objs = $this->
__sort(array_keys($objs),
'object_data',
'title',
'obj_id');
346 foreach($sorted_objs as $object_id)
348 $item_list =& ilLPItemListFactory::_getInstance(0,$object_id,$ilObjDataCache->lookupType($object_id));
350 $item_list->readUserInfo();
351 $item_list->renderSimpleProgressFO();
360 global $ilObjDataCache,$ilUser;
363 $this->tpl =
new ilTemplate(
'tpl.lp_pdf_list.xml',
true,
true,
'Services/Tracking');
366 $this->tpl->setVariable(
"FILTER",$this->filter_gui->getFO());
367 $this->filter->setRequiredPermission(
'read');
368 $type = $this->filter->getFilterType();
369 $this->tpl->setVariable(
"TXT_OBJS",$this->lng->txt(
'objs_'.$type));
372 $objs = $this->filter->getObjects();
373 $sorted_objs = $this->
__sort(array_keys($objs),
'object_data',
'title',
'obj_id');
376 foreach($sorted_objs as $object_id)
378 $item_list =& ilLPItemListFactory::_getInstance(0,$object_id,$ilObjDataCache->lookupType($object_id));
379 #$item_list->setCurrentUser($this->tracked_user->getId());
381 $item_list->readUserInfo();
382 $item_list->renderObjectListFO();
392 global $ilUser,$ilObjDataCache;
394 $this->tpl->setVariable(
"LEARNING_PROGRESS_OF",$this->lng->txt(
'learning_progress'));
399 $this->tpl->setVariable(
"USER_FULLNAME",
$name[
'lastname'].
', '.
$name[
'firstname']);
412 include_once
'./Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
422 $ilLog->write(__METHOD__.
': '.$e->getMessage());
423 $this->ctrl->returnToParent($this);
429 $ilLog->write(__METHOD__.
': '.$e->getMessage());
430 $this->ctrl->returnToParent($this);