3 declare(strict_types=1);
16 $this->ls_object = $ls_object;
17 $this->il_settings = $il_settings;
19 $this->lp_settings = $lp_settings;
20 $this->rbac_review = $rbac_review;
44 "<!DOCTYPE learning sequence PUBLIC \"-//ILIAS//DTD LearningSequence//EN\" \"" .
45 ILIAS_HTTP_PATH .
"/xml/ilias_lso_5_4.dtd\">" 49 "Export of ILIAS LearningSequence " .
50 $this->ls_object->getId() .
52 $this->il_settings->get(
"inst_id") .
59 $att[
"ref_id"] = $this->ls_object->getRefId();
66 $this->
xmlElement(
"title", null, $this->ls_object->getTitle());
71 $this->
xmlElement(
"description", null, $this->ls_object->getDescription());
76 $att[
'id'] =
'il_' . $this->il_settings->get(
"inst_id") .
'_usr_' . $this->ls_object->getOwner();
82 $ls_items = $this->ls_object->getLSItems();
86 foreach ($ls_items as $ls_item) {
87 $post_condition = $ls_item->getPostCondition();
88 $att[
"id"] = $ls_item->getRefId();
91 $this->
xmlElement(
"ls_item_pc_ref_id", null, $post_condition->getRefId());
92 $this->
xmlElement(
"ls_item_pc_condition_type", null, $post_condition->getConditionOperator());
93 $this->
xmlElement(
"ls_item_pc_value", null, $post_condition->getValue());
94 $this->
xmlElement(
"ls_item_type", null, $ls_item->getType());
95 $this->
xmlElement(
"ls_item_title", null, $ls_item->getTitle());
96 $this->
xmlElement(
"ls_item_description", null, $ls_item->getDescription());
97 $this->
xmlElement(
"ls_item_icon_path", null, $ls_item->getIconPath());
98 $this->
xmlElement(
"ls_item_is_online", null, (
string) $ls_item->isOnline());
99 $this->
xmlElement(
"ls_item_order_number", null, (
string) $ls_item->getOrderNumber());
109 $abstract_img = $this->
settings->getAbstractImage();
110 $extro_img = $this->
settings->getExtroImage();
115 $this->
xmlElement(
"abstract_img", null, $abstract_img);
116 $this->
xmlElement(
"extro_img", null, $extro_img);
123 if (!$this->il_settings->get(
"enable_tracking")) {
128 $this->ls_object->getId(),
129 (int) $this->lp_settings->getMode()
132 if (!is_null($collection)) {
133 $items = $collection->getItems();
135 foreach ($items as $item) {
136 $this->
xmlElement(
"lp_item_ref_id", null, $item);
140 $this->
xmlElement(
"lp_type", null, $this->lp_settings->getObjType());
141 $this->
xmlElement(
"lp_mode", null, $this->lp_settings->getMode());
150 return base64_encode(file_get_contents(
$path));
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
Class ilObjLearningSequence.
xmlDumpMem($format=true)
Returns xml document from memory.
static getInstanceByMode($a_obj_id, $a_mode)
xmlEndTag($tag)
Writes an endtag.
__construct(ilObjLearningSequence $ls_object, ilSetting $il_settings, ilLPObjSettings $lp_settings, ilRbacReview $rbac_review)
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
encodeImage(string $path=null)
class ilRbacReview Contains Review functions of core Rbac.