31    public function create($a_upload = 
false)
 
   33        parent::create($a_upload);
 
   39    public function delete($a_delete_meta_data = 
true)
 
   44        $this->tree = 
new ilTree($this->getLmId());
 
   45        $this->tree->setTableNames(
'lm_tree', 
'lm_data');
 
   46        $this->tree->setTreeTablePK(
"lm_id");
 
   47        $node_data = $this->tree->getNodeData($this->
getId());
 
   48        $this->
delete_rec($this->tree, $a_delete_meta_data);
 
   49        $this->tree->deleteTree($node_data);
 
   55    private function delete_rec(&$a_tree, $a_delete_meta_data = 
true)
 
   57        $childs = $a_tree->getChilds($this->
getId());
 
   58        foreach ($childs as $child) {
 
   60            if (is_object($obj)) {
 
   61                if ($obj->getType() == 
"st") {
 
   62                    $obj->delete_rec($a_tree, $a_delete_meta_data);
 
   64                if ($obj->getType() == 
"pg") {
 
   65                    $obj->delete($a_delete_meta_data);
 
   70        parent::delete($a_delete_meta_data);
 
   76    public function copy($a_target_lm)
 
   80        if ($this->
getLMId() != $a_target_lm->getId()) {
 
   81            $chap->setImportId(
"il__st_" . $this->
getId());
 
   83        $chap->setLMId($a_target_lm->getId());
 
   84        $chap->setType($this->
getType());
 
   87        $a_copied_nodes[$this->
getId()] = $chap->getId();
 
   91        $new_md = $md->cloneMD($a_target_lm->getId(), $chap->getId(), $this->getType());
 
  106    public function exportXML(&$a_xml_writer, $a_inst, &$expLog)
 
  108        $expLog->write(date(
"[y-m-d H:i:s] ") . 
"Structure Object " . $this->
getId());
 
  110        $a_xml_writer->xmlStartTag(
"StructureObject", $attrs);
 
  124        $a_xml_writer->xmlEndTag(
"StructureObject");
 
  137        $md2xml->setExportMode(
true);
 
  138        $md2xml->startExport();
 
  139        $a_xml_writer->appendXML($md2xml->getXML());
 
  144        if ($a_tag == 
"Identifier" && $a_param == 
"Entry") {
 
  145            $a_value = 
"il_" . IL_INST_ID . 
"_st_" . $this->
getId();
 
  157        $a_mode = self::CHAPTER_TITLE,
 
  158        $a_include_numbers = 
false,
 
  159        $a_time_scheduled_activation = 
false,
 
  160        $a_force_content = 
false,
 
  163        $a_include_short = 
false 
  179        if ($a_include_short) {
 
  188        $languages = $ot->getLanguages();
 
  190        if ($a_lang != 
"-" && $ot->getContentActivated() && isset($languages[$a_lang])) {
 
  193            if ($a_include_short) {
 
  194                $trans_title = trim($lmobjtrans->getShortTitle());
 
  196            if ($trans_title == 
"") {
 
  197                $trans_title = $lmobjtrans->getTitle();
 
  199            if ($trans_title != 
"") {
 
  206        if ($a_include_numbers) {
 
  208            if (
$tree->isInTree($a_st_id)) {
 
  212                $query = 
"SELECT * FROM lm_tree WHERE child = " .
 
  213                    $ilDB->quote($a_st_id, 
"integer") . 
" AND lm_id = " .
 
  214                    $ilDB->quote($a_lm_id, 
"integer");
 
  217                $depth = $tree_node[
"depth"];
 
  219                $nr = 
$tree->getChildSequenceNumber($tree_node, 
"st") . 
" ";
 
  220                for (
$i = $depth - 1; 
$i > 1; 
$i--) {
 
  222                    $query = 
"SELECT * FROM lm_tree WHERE child = " .
 
  223                        $ilDB->quote($tree_node[
"parent"], 
"integer") . 
" AND lm_id = " .
 
  224                        $ilDB->quote($a_lm_id, 
"integer");
 
  227                    $seq = 
$tree->getChildSequenceNumber($tree_node, 
"st");
 
  229                    $nr = $seq . 
"." . $nr;
 
  247        $this->tree = 
new ilTree($this->getLmId());
 
  248        $this->tree->setTableNames(
'lm_tree', 
'lm_data');
 
  249        $this->tree->setTreeTablePK(
"lm_id");
 
  251        $childs = $this->tree->getChilds($this->
getId());
 
  252        foreach ($childs as $child) {
 
  253            if ($child[
"type"] != 
"pg") {
 
  271        $this->tree = 
new ilTree($this->getLmId());
 
  272        $this->tree->setTableNames(
'lm_tree', 
'lm_data');
 
  273        $this->tree->setTreeTablePK(
"lm_id");
 
  275        $childs = $this->tree->getChilds($this->
getId());
 
  276        foreach ($childs as $child) {
 
  277            if ($child[
"type"] != 
"st") {
 
  286            $structure_obj->exportXML($a_xml_writer, $a_inst, $expLog);
 
  287            unset($structure_obj);
 
  302        $attrs[
"font-family"] = 
"Times";
 
  303        $attrs[
"font-size"] = 
"14pt";
 
  304        $a_xml_writer->xmlElement(
"fo:block", $attrs, $this->
getTitle());
 
  318        $this->tree = 
new ilTree($this->getLmId());
 
  319        $this->tree->setTableNames(
'lm_tree', 
'lm_data');
 
  320        $this->tree->setTreeTablePK(
"lm_id");
 
  322        $childs = $this->tree->getChilds($this->
getId());
 
  323        foreach ($childs as $child) {
 
  324            if ($child[
"type"] != 
"pg") {
 
  330            $page_obj->exportFO($a_xml_writer);
 
  343        $tree->setTableNames(
'lm_tree', 
'lm_data');
 
  344        $tree->setTreeTablePK(
"lm_id");
 
  347        $ndata = 
$tree->getNodeData(
$tree->readRootId());
 
  348        $childs = 
$tree->getSubtree($ndata);
 
  349        foreach ($childs as $child) {
 
  350            if ($child[
"type"] == 
"st") {
 
  351                $chapters[] = $child;
 
An exception for terminatinating execution or to throw for unit testing.
static removeScreenIdsOfChapter($a_chap, $a_module_id=0)
Remove screen ids of chapter.
Translation information on lm object.
static copy($a_source_id, $a_target_id)
Copy all translations of an object.
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static _lookupShortTitle($a_obj_id)
Lookup short title.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
getTitle()
get title of lm object
static _lookupTitle($a_obj_id)
Lookup title.
static _exportXMLAlias(&$a_xml_writer, $a_id, $a_inst=0)
export page alias to xml
static getInstance($a_tree_id)
Get Instance.
static getInstance($a_obj_id)
Get instance.
exportXML(&$a_xml_writer, $a_inst, &$expLog)
export object to xml (see ilias_co.dtd)
exportXMLMetaData(&$a_xml_writer)
export structure objects meta data to xml (see ilias_co.dtd)
__construct(&$a_content_obj, $a_id=0)
Constructor @access public.
static getChapterList($a_lm_id)
export (sub)structure objects of structure object (see ilias_co.dtd)
exportFO(&$a_xml_writer)
export object to fo
delete_rec(&$a_tree, $a_delete_meta_data=true)
Delete sub tree.
exportXMLPageObjects(&$a_xml_writer, $a_inst=0)
export page objects of structure object (see ilias_co.dtd)
exportXMLStructureObjects(&$a_xml_writer, $a_inst, &$expLog)
export (sub)structure objects of structure object (see ilias_co.dtd)
modifyExportIdentifier($a_tag, $a_param, $a_value)
static _getPresentationTitle( $a_st_id, $a_mode=self::CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
get presentation title
copy($a_target_lm)
copy chapter
exportFOPageObjects(&$a_xml_writer)
export page objects of structure object (see ilias_co.dtd)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc