ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjContentObject Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjContentObject:
+ Collaboration diagram for ilObjContentObject:

Public Member Functions

 create (bool $a_no_meta_data=false)
 create content object More...
 
 read ()
 
 setLayoutPerPage (bool $a_val)
 
 getLayoutPerPage ()
 
 setDisableDefaultFeedback (bool $a_val)
 Set disable default feedback for questions. More...
 
 getDisableDefaultFeedback ()
 
 setProgressIcons (bool $a_val)
 
 getProgressIcons ()
 
 setStoreTries (bool $a_val)
 
 getStoreTries ()
 
 setRestrictForwardNavigation (bool $a_val)
 
 getRestrictForwardNavigation ()
 
 getTree ()
 
 update ()
 
 updateAutoGlossaries ()
 
 import ()
 if implemented, this function should be called from an Out/GUI-Object More...
 
 createLMTree ()
 
 setAutoGlossaries (array $a_val)
 
 getAutoGlossaries ()
 
 removeAutoGlossary (int $a_glo_id)
 
 setForTranslation (bool $a_val)
 Set for translation (lm has been imported for translation purposes) More...
 
 getForTranslation ()
 
 getLMTree ()
 
 createImportDirectory ()
 creates data directory for import files (data_dir/lm_data/lm_<id>/import, depending on data directory that is set in ILIAS setup/ini) More...
 
 getDataDirectory ()
 
 getImportDirectory ()
 
 setImportDirectory (string $a_import_dir)
 
 createExportDirectory (string $a_type="xml")
 creates data directory for export files (data_dir/lm_data/lm_<id>/export, depending on data directory that is set in ILIAS setup/ini) More...
 
 getExportDirectory (string $a_type="xml")
 
 getLayout ()
 
 setLayout (string $a_layout)
 
 getPageHeader ()
 get page header mode (ilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER) More...
 
 setPageHeader (string $a_pg_header=ilLMObject::CHAPTER_TITLE)
 set page header mode More...
 
 getTOCMode ()
 get toc mode ("chapters" | "pages") More...
 
 setTOCMode (string $a_toc_mode="chapters")
 set toc mode More...
 
 setActiveLMMenu (bool $a_act_lm_menu)
 
 isActiveLMMenu ()
 
 setActiveTOC (bool $a_toc)
 
 isActiveTOC ()
 
 setActiveNumbering (bool $a_num)
 
 isActiveNumbering ()
 
 setActivePrintView (bool $a_print)
 
 isActivePrintView ()
 
 setActivePreventGlossaryAppendix (bool $a_print)
 
 isActivePreventGlossaryAppendix ()
 
 setHideHeaderFooterPrint (bool $a_val)
 Set hide header footer in print mode. More...
 
 getHideHeaderFooterPrint ()
 
 setPublicNotes (bool $a_pub_notes)
 
 publicNotes ()
 
 setCleanFrames (bool $a_clean)
 
 cleanFrames ()
 
 setHeaderPage (int $a_pg)
 
 getHeaderPage ()
 
 setFooterPage (int $a_pg)
 
 getFooterPage ()
 
 readProperties ()
 
 updateProperties ()
 
 createProperties ()
 create new properties record More...
 
 checkTree ()
 
 fixTree ()
 
 checkStructure ()
 Check tree (this has been copied from fixTree due to a bug fixing, should be reorganised) More...
 
 exportXML (ilXmlWriter $a_xml_writer, int $a_inst, string $a_target_dir, ilLog $expLog)
 
 exportXMLMetaData (ilXmlWriter $a_xml_writer)
 
 exportXMLStructureObjects (ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
 
 exportXMLPageObjects (ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
 
 exportXMLMediaObjects (ilXmlWriter $a_xml_writer, int $a_inst, string $a_target_dir, ilLog $expLog)
 
 exportFileItems (string $a_target_dir, ilLog $expLog)
 
 exportXMLProperties (ilXmlWriter $a_xml_writer, ilLog $expLog)
 
 getExportFiles ()
 
 executeDragDrop (int $source_id, int $target_id, bool $first_child, bool $as_subitem=false, string $movecopy="move")
 
 validatePages ()
 Validate all pages. More...
 
 copyAllPagesAndChapters (ilObjLearningModule $a_target_obj, int $a_copy_id=0)
 
 autoLinkGlossaryTerms (int $a_glo_ref_id)
 
 setRating (bool $a_value)
 
 hasRating ()
 
 setRatingPages (bool $a_value)
 
 hasRatingPages ()
 
 isInfoEnabled ()
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static writeHeaderPage (int $a_lm_id, int $a_page_id)
 
static writeFooterPage (int $a_lm_id, int $a_page_id)
 
static _moveLMStyles (int $a_from_style, int $a_to_style)
 move learning modules from one style to another More...
 
static _lookupRestrictForwardNavigation (int $a_obj_id)
 
static _lookupStyleSheetId (int $a_cont_obj_id)
 
static _lookupContObjIdByStyleId (int $a_style_id)
 
static _lookupDisableDefaultFeedback (int $a_id)
 
static _lookupStoreTries (int $a_id)
 
static _getNrOfAssignedLMs (int $a_style_id)
 gets the number of learning modules assigned to a content style More...
 
static _getNrLMsIndividualStyles ()
 get number of learning modules with individual styles More...
 
static _getNrLMsNoStyle ()
 get number of learning modules assigned no style More...
 
static _deleteStyleAssignments (int $a_style_id)
 delete all style references to style More...
 
static getAvailableLayouts ()
 get all available lm layouts More...
 
static _checkPreconditionsOfPage (int $cont_ref_id, int $cont_obj_id, int $page_id)
 checks whether the preconditions of a page are fulfilled or not More...
 
static _getMissingPreconditionsOfPage (int $cont_ref_id, int $cont_obj_id, int $page_id)
 gets all missing preconditions of page More...
 
static _getMissingPreconditionsTopChapter (int $cont_obj_ref_id, int $cont_obj_id, int $page_id)
 get top chapter of page for that any precondition is missing More...
 
static hasSuccessorPage (int $a_cont_obj_id, int $a_page_id)
 checks if page has a successor page More...
 
static lookupAutoGlossaries (int $a_lm_id)
 
static isOnlineHelpModule (int $a_id, bool $a_as_obj_id=false)
 Is module an online module. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Data Fields

ilLMTree $lm_tree
 
string $layout = ''
 
int $style_id = 0
 
string $pg_header = ''
 
bool $online = false
 
bool $for_translation = false
 
array $auto_glossaries = array()
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 doMDUpdateListener (string $a_element)
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Static Protected Member Functions

static _lookup (int $a_obj_id, string $a_field)
 

Protected Attributes

ILIAS Notes Service $notes
 
array $q_ids = []
 
array $mob_ids = []
 
array $file_ids = []
 
array $public_export_file = []
 
int $header_page = 0
 
int $footer_page = 0
 
bool $user_comments = false
 
bool $clean_frames = false
 
bool $pub_notes = false
 
bool $hide_header_footer_print = false
 
bool $prevent_glossary_appendix_active = false
 
bool $print_view_active = false
 
bool $numbering = false
 
bool $toc_active = false
 
bool $lm_menu_active = false
 
string $toc_mode = ''
 
bool $restrict_forw_nav = false
 
bool $store_tries = false
 
bool $progr_icons = false
 
bool $disable_def_feedback = false
 
bool $layout_per_page = false
 
ilObjUser $user
 
ilLocatorGUI $locator
 
bool $rating = false
 
bool $rating_pages = false
 
ilObjLearningModule $lm
 
ILIAS Style Content DomainService $content_style_domain
 
LOMServices $lom_services
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Private Attributes

string $import_dir = ''
 
ilGlobalTemplateInterface $main_tpl
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Sascha Hofmann sasch.nosp@m.ahof.nosp@m.mann@.nosp@m.gmx..nosp@m.de

Definition at line 25 of file class.ilObjContentObject.php.

Member Function Documentation

◆ _checkPreconditionsOfPage()

static ilObjContentObject::_checkPreconditionsOfPage ( int  $cont_ref_id,
int  $cont_obj_id,
int  $page_id 
)
static

checks whether the preconditions of a page are fulfilled or not

Definition at line 973 of file class.ilObjContentObject.php.

977 : bool {
978 $lm_tree = new ilTree($cont_obj_id);
979 $lm_tree->setTableNames('lm_tree', 'lm_data');
980 $lm_tree->setTreeTablePK("lm_id");
981
982 if ($lm_tree->isInTree($page_id)) {
984 foreach ($path as $node) {
985 if ($node["type"] == "st") {
986 if (!ilConditionHandler::_checkAllConditionsOfTarget($cont_ref_id, $node["child"], "st")) {
987 return false;
988 }
989 }
990 }
991 }
992
993 return true;
994 }
static _checkAllConditionsOfTarget(int $a_target_ref_id, int $a_target_id, string $a_target_type="", int $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
isInTree(?int $a_node_id)
get all information of a node.
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table
setTableNames(string $a_table_tree, string $a_table_obj_data, string $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
$path
Definition: ltiservices.php:30

References $path, ilConditionHandler\_checkAllConditionsOfTarget(), ilTree\getPathFull(), and ilTree\readRootId().

Referenced by ilLMNavigationRendererGUI\addDropdown(), ilLMContentRendererGUI\determineStatus(), ilLMPresentationGUI\showPrintView(), and ilLMPresentationGUI\showPrintViewSelection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _deleteStyleAssignments()

static ilObjContentObject::_deleteStyleAssignments ( int  $a_style_id)
static

delete all style references to style

Definition at line 690 of file class.ilObjContentObject.php.

692 : void {
693 global $DIC;
694
695 $ilDB = $DIC->database();
696
697 $q = "UPDATE content_object SET " .
698 " stylesheet = " . $ilDB->quote(0, "integer") .
699 " WHERE stylesheet = " . $ilDB->quote($a_style_id, "integer");
700
701 $ilDB->manipulate($q);
702 }
global $DIC
Definition: shib_login.php:26
$q
Definition: shib_logout.php:23

Referenced by ilObjStyleSheet\delete().

+ Here is the caller graph for this function:

◆ _getMissingPreconditionsOfPage()

static ilObjContentObject::_getMissingPreconditionsOfPage ( int  $cont_ref_id,
int  $cont_obj_id,
int  $page_id 
)
static

gets all missing preconditions of page

Definition at line 999 of file class.ilObjContentObject.php.

1003 : array {
1004 $lm_tree = new ilTree($cont_obj_id);
1005 $lm_tree->setTableNames('lm_tree', 'lm_data');
1006 $lm_tree->setTreeTablePK("lm_id");
1007
1008 $conds = array();
1009 if ($lm_tree->isInTree($page_id)) {
1010 // get full path of page
1011 $path = $lm_tree->getPathFull($page_id, $lm_tree->readRootId());
1012 foreach ($path as $node) {
1013 if ($node["type"] == "st") {
1014 // get all preconditions of upper chapters
1015 $tconds = ilConditionHandler::_getPersistedConditionsOfTarget($cont_ref_id, $node["child"], "st");
1016 foreach ($tconds as $tcond) {
1017 // store all missing preconditions
1019 $conds[] = $tcond;
1020 }
1021 }
1022 }
1023 }
1024 }
1025
1026 return $conds;
1027 }
static _getPersistedConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_target_type="")
get all persisted conditions of target object
static _checkCondition(array $condition, int $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...

Referenced by ilLMContentRendererGUI\renderPreconditionsOfPage().

+ Here is the caller graph for this function:

◆ _getMissingPreconditionsTopChapter()

static ilObjContentObject::_getMissingPreconditionsTopChapter ( int  $cont_obj_ref_id,
int  $cont_obj_id,
int  $page_id 
)
static

get top chapter of page for that any precondition is missing

Definition at line 1032 of file class.ilObjContentObject.php.

1036 : int {
1037 $lm_tree = new ilTree($cont_obj_id);
1038 $lm_tree->setTableNames('lm_tree', 'lm_data');
1039 $lm_tree->setTreeTablePK("lm_id");
1040
1041 if ($lm_tree->isInTree($page_id)) {
1042 // get full path of page
1043 $path = $lm_tree->getPathFull($page_id, $lm_tree->readRootId());
1044 foreach ($path as $node) {
1045 if ($node["type"] == "st") {
1046 // get all preconditions of upper chapters
1047 $tconds = ilConditionHandler::_getPersistedConditionsOfTarget($cont_obj_ref_id, $node["child"], "st");
1048 foreach ($tconds as $tcond) {
1049 // look for missing precondition
1051 return (int) $node["child"];
1052 }
1053 }
1054 }
1055 }
1056 }
1057
1058 return 0;
1059 }

References $path, ilConditionHandler\_checkCondition(), ilConditionHandler\_getPersistedConditionsOfTarget(), ilTree\getPathFull(), and ilTree\readRootId().

Referenced by ilLMContentRendererGUI\renderPreconditionsOfPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getNrLMsIndividualStyles()

static ilObjContentObject::_getNrLMsIndividualStyles ( )
static

get number of learning modules with individual styles

Definition at line 654 of file class.ilObjContentObject.php.

654 : int
655 {
656 global $DIC;
657
658 $ilDB = $DIC->database();
659
660 // joining with style table (not perfectly nice)
661 $q = "SELECT count(*) as cnt FROM content_object, style_data " .
662 " WHERE stylesheet = style_data.id " .
663 " AND standard = " . $ilDB->quote(0, "integer");
664 $cset = $ilDB->query($q);
665 $crow = $ilDB->fetchAssoc($cset);
666
667 return (int) $crow["cnt"];
668 }

References $DIC, $ilDB, and $q.

◆ _getNrLMsNoStyle()

static ilObjContentObject::_getNrLMsNoStyle ( )
static

get number of learning modules assigned no style

Definition at line 673 of file class.ilObjContentObject.php.

673 : int
674 {
675 global $DIC;
676
677 $ilDB = $DIC->database();
678
679 $q = "SELECT count(*) as cnt FROM content_object " .
680 " WHERE stylesheet = " . $ilDB->quote(0, "integer");
681 $cset = $ilDB->query($q);
682 $crow = $ilDB->fetchAssoc($cset);
683
684 return (int) $crow["cnt"];
685 }

References $DIC, $ilDB, and $q.

◆ _getNrOfAssignedLMs()

static ilObjContentObject::_getNrOfAssignedLMs ( int  $a_style_id)
static

gets the number of learning modules assigned to a content style

Definition at line 636 of file class.ilObjContentObject.php.

636 : int
637 {
638 global $DIC;
639
640 $ilDB = $DIC->database();
641
642 $q = "SELECT count(*) as cnt FROM content_object " .
643 " WHERE stylesheet = " . $ilDB->quote($a_style_id, "integer");
644 $cset = $ilDB->query($q);
645 $crow = $ilDB->fetchAssoc($cset);
646
647 return (int) ($crow["cnt"] ?? 0);
648 }

References $DIC, $ilDB, and $q.

◆ _lookup()

static ilObjContentObject::_lookup ( int  $a_obj_id,
string  $a_field 
)
staticprotected

Definition at line 551 of file class.ilObjContentObject.php.

554 : string {
555 global $DIC;
556
557 $ilDB = $DIC->database();
558
559 $q = "SELECT " . $a_field . " FROM content_object " .
560 " WHERE id = " . $ilDB->quote($a_obj_id, "integer");
561
562 $res = $ilDB->query($q);
563 $rec = $ilDB->fetchAssoc($res);
564
565 return $rec[$a_field];
566 }
$res
Definition: ltiservices.php:69

◆ _lookupContObjIdByStyleId()

static ilObjContentObject::_lookupContObjIdByStyleId ( int  $a_style_id)
static

Definition at line 588 of file class.ilObjContentObject.php.

588 : array
589 {
590 global $DIC;
591
592 $ilDB = $DIC->database();
593
594 $q = "SELECT id FROM content_object " .
595 " WHERE stylesheet = " . $ilDB->quote($a_style_id, "integer");
596 $res = $ilDB->query($q);
597 $obj_ids = array();
598 while ($cont = $ilDB->fetchAssoc($res)) {
599 $obj_ids[] = (int) $cont["id"];
600 }
601 return $obj_ids;
602 }

References $DIC, $ilDB, $q, $res, and ILIAS\Repository\int().

Referenced by ilObjStyleSheet\_getClonableContentStyles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupDisableDefaultFeedback()

static ilObjContentObject::_lookupDisableDefaultFeedback ( int  $a_id)
static

Definition at line 604 of file class.ilObjContentObject.php.

604 : bool
605 {
606 global $DIC;
607
608 $ilDB = $DIC->database();
609
610 $q = "SELECT disable_def_feedback FROM content_object " .
611 " WHERE id = " . $ilDB->quote($a_id, "integer");
612 $res = $ilDB->query($q);
613 $rec = $ilDB->fetchAssoc($res);
614
615 return (bool) ($rec["disable_def_feedback"] ?? false);
616 }

References $DIC, $ilDB, $q, and $res.

Referenced by ilLMPageConfig\configureByObjectId(), and ilLMPageGUI\onFeedbackEditingForwarding().

+ Here is the caller graph for this function:

◆ _lookupRestrictForwardNavigation()

static ilObjContentObject::_lookupRestrictForwardNavigation ( int  $a_obj_id)
static

Definition at line 568 of file class.ilObjContentObject.php.

570 : string {
571 return self::_lookup($a_obj_id, "restrict_forw_nav");
572 }
static _lookup(int $a_obj_id, string $a_field)

Referenced by ilLMPageGUI\processAnswer().

+ Here is the caller graph for this function:

◆ _lookupStoreTries()

static ilObjContentObject::_lookupStoreTries ( int  $a_id)
static

Definition at line 618 of file class.ilObjContentObject.php.

618 : bool
619 {
620 global $DIC;
621
622 $ilDB = $DIC->database();
623
624 $q = "SELECT store_tries FROM content_object " .
625 " WHERE id = " . $ilDB->quote($a_id, "integer");
626 $res = $ilDB->query($q);
627 $rec = $ilDB->fetchAssoc($res);
628
629 return (bool) ($rec["store_tries"] ?? false);
630 }

References $DIC, $ilDB, $q, and $res.

Referenced by ilLMPageGUI\__construct().

+ Here is the caller graph for this function:

◆ _lookupStyleSheetId()

static ilObjContentObject::_lookupStyleSheetId ( int  $a_cont_obj_id)
static

Definition at line 574 of file class.ilObjContentObject.php.

574 : int
575 {
576 global $DIC;
577
578 $ilDB = $DIC->database();
579
580 $q = "SELECT stylesheet FROM content_object " .
581 " WHERE id = " . $ilDB->quote($a_cont_obj_id, "integer");
582 $res = $ilDB->query($q);
583 $sheet = $ilDB->fetchAssoc($res);
584
585 return (int) $sheet["stylesheet"];
586 }

References $DIC, $ilDB, $q, and $res.

Referenced by ilPCParagraphGUI\setStyle().

+ Here is the caller graph for this function:

◆ _moveLMStyles()

static ilObjContentObject::_moveLMStyles ( int  $a_from_style,
int  $a_to_style 
)
static

move learning modules from one style to another

Definition at line 518 of file class.ilObjContentObject.php.

521 : void {
522 global $DIC;
523
524 $ilDB = $DIC->database();
525
526 if ($a_from_style < 0) { // change / delete all individual styles
527 $q = "SELECT stylesheet FROM content_object, style_data " .
528 " WHERE content_object.stylesheet = style_data.id " .
529 " AND style_data.standard = " . $ilDB->quote(0, "integer") .
530 " AND content_object.stylesheet > " . $ilDB->quote(0, "integer");
531 $style_set = $ilDB->query($q);
532 while ($style_rec = $ilDB->fetchAssoc($style_set)) {
533 // assign learning modules to new style
534 $q = "UPDATE content_object SET " .
535 " stylesheet = " . $ilDB->quote($a_to_style, "integer") .
536 " WHERE stylesheet = " . $ilDB->quote($style_rec["stylesheet"], "integer");
537 $ilDB->manipulate($q);
538
539 // delete style
540 $style_obj = ilObjectFactory::getInstanceByObjId($style_rec["stylesheet"]);
541 $style_obj->delete();
542 }
543 } else {
544 $q = "UPDATE content_object SET " .
545 " stylesheet = " . $ilDB->quote($a_to_style, "integer") .
546 " WHERE stylesheet = " . $ilDB->quote($a_from_style, "integer");
547 $ilDB->manipulate($q);
548 }
549 }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id

References $ilDB, $q, and ilObjectFactory\getInstanceByObjId().

Referenced by ilContentStyleSettingsGUI\moveIndividualStyles(), and ilContentStyleSettingsGUI\moveLMStyles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autoLinkGlossaryTerms()

ilObjContentObject::autoLinkGlossaryTerms ( int  $a_glo_ref_id)

Definition at line 1955 of file class.ilObjContentObject.php.

1957 : void {
1958 // get terms
1959 $terms = ilGlossaryTerm::getTermList([$a_glo_ref_id]);
1960
1961 // each get page: get content
1962 $pages = ilLMPage::getAllPages($this->getType(), $this->getId());
1963
1964 // determine terms that occur in the page
1965 $found_pages = array();
1966 foreach ($pages as $p) {
1967 $pg = new ilLMPage($p["id"]);
1968 $c = $pg->getXMLContent();
1969 foreach ($terms as $t) {
1970 if (is_int(stripos($c, $t["term"]))) {
1971 $found_pages[$p["id"]]["terms"][] = $t;
1972 if (!is_object($found_pages[$p["id"]]["page"] ?? null)) {
1973 $found_pages[$p["id"]]["page"] = $pg;
1974 }
1975 }
1976 }
1977 reset($terms);
1978 }
1979
1980 // ilPCParagraph autoLinkGlossariesPage with page and terms
1981 foreach ($found_pages as $id => $fp) {
1982 ilPCParagraph::autoLinkGlossariesPage($fp["page"], $fp["terms"]);
1983 }
1984 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getTermList(array $a_glo_ref_id, string $searchterm="", string $a_first_letter="", string $a_def="", int $a_tax_node=0, bool $a_add_amet_fields=false, ?array $a_amet_filter=null, bool $a_include_references=false)
Get all terms for given set of glossary ids.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static autoLinkGlossariesPage(ilPageObject $a_page, array $a_terms)
Auto link glossary of whole page.
static getAllPages(string $a_parent_type, int $a_parent_id, string $a_lang="-")
Get all pages for parent object.
$c
Definition: deliver.php:25

◆ checkStructure()

ilObjContentObject::checkStructure ( )

Check tree (this has been copied from fixTree due to a bug fixing, should be reorganised)

Definition at line 1219 of file class.ilObjContentObject.php.

1219 : array
1220 {
1221 $issues = [];
1222 $ilDB = $this->db;
1223
1224 $tree = $this->getLMTree();
1225
1226 // check numbering, if errors, renumber
1227 // it is very important to keep this step before deleting subtrees
1228 // in the following steps
1229 $set = $ilDB->query(
1230 "SELECT l1.child, l1.lft l1lft, l1.rgt l1rgt, l2.parent, l2.lft l2lft, l2.rgt l2rgt" .
1231 " FROM lm_tree l1" .
1232 " JOIN lm_tree l2 ON ( l1.child = l2.parent" .
1233 " AND l1.lm_id = l2.lm_id )" .
1234 " JOIN lm_data ON ( l1.child = lm_data.obj_id )" .
1235 " WHERE (l2.lft < l1.lft" .
1236 " OR l2.rgt > l1.rgt OR l2.lft > l1.rgt OR l2.rgt < l1.lft)" .
1237 " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer") .
1238 " ORDER BY lm_data.create_date DESC"
1239 );
1240 while ($rec = $ilDB->fetchAssoc($set)) {
1241 $issues[] = "Tree numbering: " . print_r($rec, true);
1242 }
1243
1244 // delete subtrees that have no lm_data records (changed due to #20637)
1245 $set = $ilDB->query("SELECT * FROM lm_tree WHERE lm_tree.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1246 while ($node = $ilDB->fetchAssoc($set)) {
1247 $q = "SELECT * FROM lm_data WHERE obj_id = " .
1248 $ilDB->quote($node["child"], "integer");
1249 $obj_set = $ilDB->query($q);
1250 $obj_rec = $ilDB->fetchAssoc($obj_set);
1251 if (!$obj_rec) {
1252 $issues[] = "Tree entry without data entry: " . print_r($node, true);
1253 }
1254 }
1255
1256 // delete subtrees that have pages as parent
1258 foreach ($nodes as $node) {
1259 $q = "SELECT * FROM lm_data WHERE obj_id = " .
1260 $ilDB->quote($node["parent"], "integer");
1261 $obj_set = $ilDB->query($q);
1262 $obj_rec = $ilDB->fetchAssoc($obj_set);
1263 if (($obj_rec["type"] ?? "") == "pg") {
1264 $node_data = $tree->getNodeData($node["child"]);
1265 if ($tree->isInTree($node["child"])) {
1266 $issues[] = "Subtree with page parent: " . print_r($node_data, true);
1267 }
1268 }
1269 }
1270
1271 // check for multi-references pages or chapters
1272 // if errors -> create copies of them here
1273 $set = $ilDB->query("SELECT DISTINCT l1.lm_id" .
1274 " FROM lm_tree l1" .
1275 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1276 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1277 " WHERE l1.child <> 1" .
1278 " AND l1.lm_id <> lm_data.lm_id" .
1279 " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1280 if ($rec = $ilDB->fetchAssoc($set)) {
1281 $set = $ilDB->query("SELECT DISTINCT l1.child " .
1282 " FROM lm_tree l1" .
1283 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1284 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1285 " WHERE l1.child <> 1" .
1286 " AND l1.lm_id <> lm_data.lm_id" .
1287 " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1288 while ($rec = $ilDB->fetchAssoc($set)) {
1289 $set3 = $ilDB->queryF(
1290 "SELECT * FROM lm_tree " .
1291 " WHERE child = %s ",
1292 array("integer"),
1293 array($rec["child"])
1294 );
1295 while ($rec3 = $ilDB->fetchAssoc($set3)) {
1296 $issues[] = "Multi-reference item: " . print_r($rec3, true);
1297 }
1298 }
1299 }
1300
1301 // missing copage entries
1302 $set = $ilDB->queryF(
1303 "SELECT * FROM lm_data " .
1304 " WHERE lm_id = %s AND type = %s",
1305 array("integer", "text"),
1306 array($this->getId(), "pg")
1307 );
1308 while ($rec = $ilDB->fetchAssoc($set)) {
1309 if (!ilPageObject::_exists("lm", $rec["obj_id"], "-")) {
1310 $issues[] = "Missing COPage: " . print_r($rec, true);
1311 }
1312 }
1313
1314
1315 return $issues;
1316 }
ilTree $tree
ilDBInterface $db
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node

References $ilDB, $q, ilPageObject\_exists(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ checkTree()

ilObjContentObject::checkTree ( )
Exceptions
ilInvalidTreeStructureException

Definition at line 1083 of file class.ilObjContentObject.php.

1083 : void
1084 {
1085 $tree = new ilLMTree($this->getId());
1086 $tree->checkTree();
1088 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkTree()
check consistence of tree all left & right values are checked if they are exists only once
checkTreeChilds(bool $a_no_zero_child=true)
check, if all childs of tree nodes exist in object table

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ cleanFrames()

ilObjContentObject::cleanFrames ( )

Definition at line 817 of file class.ilObjContentObject.php.

817 : bool
818 {
819 return $this->clean_frames;
820 }

◆ copyAllPagesAndChapters()

ilObjContentObject::copyAllPagesAndChapters ( ilObjLearningModule  $a_target_obj,
int  $a_copy_id = 0 
)

Definition at line 1885 of file class.ilObjContentObject.php.

1888 : array {
1889 $parent_id = $a_target_obj->lm_tree->readRootId();
1890 $time = null;
1891
1892 // get all chapters of root lm
1893 $chapters = $this->lm_tree->getChildsByType($this->lm_tree->readRootId(), "st");
1894 $copied_nodes = array();
1895 //$time = time();
1896 foreach ($chapters as $chap) {
1897 $cid = ilLMObject::pasteTree(
1898 $a_target_obj,
1899 $chap["child"],
1900 $parent_id,
1902 (string) $time,
1903 $copied_nodes,
1904 true,
1905 $this->lm
1906 );
1907 $target = $cid;
1908 }
1909
1910 // copy free pages
1911 $pages = ilLMPageObject::getPageList($this->getId());
1912 foreach ($pages as $p) {
1913 if (!$this->lm_tree->isInTree($p["obj_id"])) {
1914 $item = new ilLMPageObject($this->lm, $p["obj_id"]);
1915 $target_item = $item->copy($a_target_obj);
1916 $copied_nodes[$item->getId()] = $target_item->getId();
1917 }
1918 }
1919
1920 // Add mapping for pages and chapters
1921 $options = ilCopyWizardOptions::_getInstance($a_copy_id);
1922 foreach ($copied_nodes as $old_id => $new_id) {
1923 $options->appendMapping(
1924 $this->getRefId() . '_' . $old_id,
1925 $a_target_obj->getRefId() . '_' . $new_id
1926 );
1927 }
1928
1929 ilLMObject::updateInternalLinks($copied_nodes);
1930
1931 $a_target_obj->checkTree();
1932
1933 return $copied_nodes;
1934 }
static _getInstance(int $a_copy_id)
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getPageList(int $lm_id)
const POS_LAST_NODE

◆ create()

ilObjContentObject::create ( bool  $a_no_meta_data = false)

create content object

Definition at line 103 of file class.ilObjContentObject.php.

105 : int {
106 $id = parent::create();
107
108 // meta data will be created by
109 // import parser
110 if (!$a_no_meta_data) {
111 $this->createMetaData();
112 }
113
114 $this->createProperties();
115 $this->updateAutoGlossaries();
116 return $id;
117 }
createProperties()
create new properties record

References ilObject\createMetaData().

+ Here is the call graph for this function:

◆ createExportDirectory()

ilObjContentObject::createExportDirectory ( string  $a_type = "xml")

creates data directory for export files (data_dir/lm_data/lm_<id>/export, depending on data directory that is set in ILIAS setup/ini)

Definition at line 377 of file class.ilObjContentObject.php.

379 : void {
381
382 $lm_data_dir = ilFileUtils::getDataDir() . "/lm_data";
383 // create learning module directory (data_dir/lm_data/lm_<id>)
384 $lm_dir = $lm_data_dir . "/lm_" . $this->getId();
386 if (!is_dir($lm_dir)) {
387 $ilErr->raiseError("Creation of Learning Module Directory failed.", $ilErr->FATAL);
388 }
389 // create Export subdirectory (data_dir/lm_data/lm_<id>/Export)
390 switch ($a_type) {
391 default: // = xml
392 if (substr($a_type, 0, 4) == "html") {
393 $export_dir = $lm_dir . "/export_" . $a_type;
394 } else {
395 $export_dir = $lm_dir . "/export";
396 }
397 break;
398 }
399 ilFileUtils::makeDir($export_dir);
400
401 if (!is_dir($export_dir)) {
402 $ilErr->raiseError("Creation of Export Directory failed.", $ilErr->FATAL);
403 }
404 }
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static getDataDir()
get data directory (outside webspace)
ilErrorHandling $error
$ilErr
Definition: raiseError.php:33

◆ createImportDirectory()

ilObjContentObject::createImportDirectory ( )

creates data directory for import files (data_dir/lm_data/lm_<id>/import, depending on data directory that is set in ILIAS setup/ini)

Definition at line 321 of file class.ilObjContentObject.php.

321 : void
322 {
324
325 $lm_data_dir = ilFileUtils::getDataDir() . "/lm_data";
326 if (!is_writable($lm_data_dir)) {
327 $ilErr->raiseError("Content object Data Directory (" . $lm_data_dir
328 . ") not writeable.", $ilErr->FATAL);
329 }
330
331 // create learning module directory (data_dir/lm_data/lm_<id>)
332 $lm_dir = $lm_data_dir . "/lm_" . $this->getId();
333 ilFileUtils::makeDir($lm_dir);
334 if (!is_dir($lm_dir)) {
335 $ilErr->raiseError("Creation of Learning Module Directory failed.", $ilErr->FATAL);
336 }
337
338 // create import subdirectory (data_dir/lm_data/lm_<id>/import)
339 $import_dir = $lm_dir . "/import";
341 if (!is_dir($import_dir)) {
342 $ilErr->raiseError("Creation of Import Directory failed.", $ilErr->FATAL);
343 }
344 }

References $ilErr, ilFileUtils\getDataDir(), ILIAS\Survey\Mode\getId(), and ilFileUtils\makeDir().

+ Here is the call graph for this function:

◆ createLMTree()

ilObjContentObject::createLMTree ( )

Definition at line 235 of file class.ilObjContentObject.php.

235 : void
236 {
237 $this->lm_tree = new ilLMTree($this->getId(), false);
238 $this->lm_tree->addTree($this->getId(), 1);
239 }

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ createProperties()

ilObjContentObject::createProperties ( )

create new properties record

Definition at line 915 of file class.ilObjContentObject.php.

915 : void
916 {
918
919 $this->db->insert("content_object", [
920 "id" => ["integer", $this->getId()],
921 "page_header" => ["text", ilLMObject::PAGE_TITLE]
922 ]);
923
924 // #14661
925 $this->notes->domain()->activateComments($this->getId());
926
927 $this->readProperties(); // to get db default values
928 }
insert(string $table_name, array $values)

References $ilDB, ILIAS\Survey\Mode\getId(), and ilLMObject\PAGE_TITLE.

+ Here is the call graph for this function:

◆ doMDUpdateListener()

ilObjContentObject::doMDUpdateListener ( string  $a_element)
protected

Reimplemented from ilObject.

Definition at line 2029 of file class.ilObjContentObject.php.

2031 : void {
2032 switch ($a_element) {
2033 case 'Educational':
2034 $obj_lp = ilObjectLP::getInstance($this->getId());
2035 if (in_array(
2036 $obj_lp->getCurrentMode(),
2038 )) {
2040 }
2041 break;
2042
2043 case 'General':
2044 // Update Title and description
2045 $ot = $this->getObjectProperties()->getPropertyTranslations();
2046 if (!$ot->getContentTranslationActivated()) {
2047 return;
2048 }
2049
2050 $paths = $this->lom_services->paths();
2051 $reader = $this->lom_services->read(
2052 $this->getId(),
2053 0,
2054 $this->getType(),
2055 $paths->custom()->withNextStep('general')->get()
2056 );
2057
2058 $this->getObjectProperties()->storePropertyTranslations(
2059 $ot->withDefaultTitle($reader->firstData($paths->title())->value())
2060 ->withDefaultDescription($reader->firstData($paths->firstDescription())->value())
2061 );
2062 break;
2063 }
2064 }
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
static getInstance(int $obj_id)

References ilLPStatusWrapper\_refreshStatus(), ILIAS\Survey\Mode\getId(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_COLLECTION_TLT, and ilLPObjSettings\LP_MODE_TLT.

+ Here is the call graph for this function:

◆ executeDragDrop()

ilObjContentObject::executeDragDrop ( int  $source_id,
int  $target_id,
bool  $first_child,
bool  $as_subitem = false,
string  $movecopy = "move" 
)

Definition at line 1631 of file class.ilObjContentObject.php.

1637 : void {
1638 if ($source_id === $target_id) {
1639 return;
1640 }
1641 $lmtree = new ilTree($this->getId());
1642 $lmtree->setTableNames('lm_tree', 'lm_data');
1643 $lmtree->setTreeTablePK("lm_id");
1644 //echo "-".$source_id."-".$target_id."-".$first_child."-".$as_subitem."-";
1645 $source_obj = ilLMObjectFactory::getInstance($this->lm, $source_id, true);
1646 $source_obj->setLMId($this->getId());
1647
1648 if (!$first_child) {
1649 $target_obj = ilLMObjectFactory::getInstance($this->lm, $target_id, true);
1650 $target_obj->setLMId($this->getId());
1651 $target_parent = $lmtree->getParentId($target_id);
1652 }
1653
1654 // handle pages
1655 if ($source_obj->getType() == "pg") {
1656 //echo "1";
1657 if ($lmtree->isInTree($source_obj->getId())) {
1658 $node_data = $lmtree->getNodeData($source_obj->getId());
1659
1660 // cut on move
1661 if ($movecopy == "move") {
1662 $parent_id = $lmtree->getParentId($source_obj->getId());
1663 $lmtree->deleteTree($node_data);
1664
1665 } else {
1666 // copy page
1667 $new_page = $source_obj->copy($this->lm);
1668 $source_id = $new_page->getId();
1669 $source_obj = $new_page;
1670 }
1671
1672 // paste page
1673 if (!$lmtree->isInTree($source_obj->getId())) {
1674 if ($first_child) { // as first child
1675 $target_pos = ilTree::POS_FIRST_NODE;
1676 $parent = $target_id;
1677 } elseif ($as_subitem) { // as last child
1678 $parent = $target_id;
1679 $target_pos = ilTree::POS_FIRST_NODE;
1680 $pg_childs = $lmtree->getChildsByType($parent, "pg");
1681 if (count($pg_childs) != 0) {
1682 $target_pos = $pg_childs[count($pg_childs) - 1]["obj_id"];
1683 }
1684 } else { // at position
1685 $target_pos = $target_id;
1686 $parent = $target_parent;
1687 }
1688
1689 // insert page into tree
1690 $lmtree->insertNode(
1691 $source_obj->getId(),
1692 $parent,
1693 $target_pos
1694 );
1695
1696 }
1697 }
1698 }
1699
1700 // handle chapters
1701 if ($source_obj->getType() == "st") {
1702 //echo "2";
1703 $source_node = $lmtree->getNodeData($source_id);
1704 $subnodes = $lmtree->getSubTree($source_node);
1705
1706 // check, if target is within subtree
1707 foreach ($subnodes as $subnode) {
1708 if ($subnode["obj_id"] == $target_id) {
1709 return;
1710 }
1711 }
1712
1713 $target_pos = $target_id;
1714
1715 if ($first_child) { // as first subchapter
1716 $target_pos = ilTree::POS_FIRST_NODE;
1717 $target_parent = $target_id;
1718
1719 $pg_childs = $lmtree->getChildsByType($target_parent, "pg");
1720 if (count($pg_childs) != 0) {
1721 $target_pos = $pg_childs[count($pg_childs) - 1]["obj_id"];
1722 }
1723 } elseif ($as_subitem) { // as last subchapter
1724 $target_parent = $target_id;
1725 $target_pos = ilTree::POS_FIRST_NODE;
1726 $childs = $lmtree->getChilds($target_parent);
1727 if (count($childs) != 0) {
1728 $target_pos = $childs[count($childs) - 1]["obj_id"];
1729 }
1730 }
1731
1732 // delete source tree
1733 if ($movecopy == "move") {
1734 $lmtree->deleteTree($source_node);
1735 } else {
1736 // copy chapter (incl. subcontents)
1737 throw new ilException("ilObjContentObject: Not implemented");
1738 //$new_chapter = $source_obj->copy($lmtree, $target_parent, $target_pos);
1739 }
1740
1741 if (!$lmtree->isInTree($source_id)) {
1742 $lmtree->insertNode($source_id, $target_parent, $target_pos);
1743
1744 // insert moved tree
1745 foreach ($subnodes as $node) {
1746 if ($node["obj_id"] != $source_id) {
1747 $lmtree->insertNode($node["obj_id"], $node["parent"]);
1748 }
1749 }
1750 }
1751
1752 // check the tree
1753 $this->checkTree();
1754 }
1755
1756 $this->checkTree();
1757 }
Base class for ILIAS Exception handling.
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
const POS_FIRST_NODE

◆ exportFileItems()

ilObjContentObject::exportFileItems ( string  $a_target_dir,
ilLog  $expLog 
)

Definition at line 1478 of file class.ilObjContentObject.php.

1481 : void {
1482 foreach ($this->file_ids as $file_id) {
1483 $expLog->write(date("[y-m-d H:i:s] ") . "File Item " . $file_id);
1484 $file_obj = new ilObjFile($file_id, false);
1485 $file_obj->export($a_target_dir);
1486 unset($file_obj);
1487 }
1488 }
write(string $a_msg, $a_log_level=null)
logging
Class ilObjFile.

References ilLog\write().

+ Here is the call graph for this function:

◆ exportXML()

ilObjContentObject::exportXML ( ilXmlWriter  $a_xml_writer,
int  $a_inst,
string  $a_target_dir,
ilLog  $expLog 
)

Definition at line 1318 of file class.ilObjContentObject.php.

1323 : void {
1324 $attrs = array();
1325 switch ($this->getType()) {
1326 case "lm":
1327 $attrs["Type"] = "LearningModule";
1328 break;
1329 }
1330 $a_xml_writer->xmlStartTag("ContentObject", $attrs);
1331
1332 // MetaData
1333 $this->exportXMLMetaData($a_xml_writer);
1334
1335 // StructureObjects
1336 //echo "ContObj:".$a_inst.":<br>";
1337 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Structure Objects");
1338 $this->exportXMLStructureObjects($a_xml_writer, $a_inst, $expLog);
1339 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Structure Objects");
1340
1341 // PageObjects
1342 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Page Objects");
1343 $this->exportXMLPageObjects($a_xml_writer, $a_inst, $expLog);
1344 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Page Objects");
1345
1346 // MediaObjects
1347 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Media Objects");
1348 $this->exportXMLMediaObjects($a_xml_writer, $a_inst, $a_target_dir, $expLog);
1349 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Media Objects");
1350
1351 // FileItems
1352 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export File Items");
1353 $this->exportFileItems($a_target_dir, $expLog);
1354 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export File Items");
1355
1356 // Questions
1357 if (count($this->q_ids) > 0) {
1358 $qti_file = fopen($a_target_dir . "/qti.xml", "w");
1359 $pool = new ilObjQuestionPool();
1360 fwrite($qti_file, $pool->questionsToXML($this->q_ids));
1361 fclose($qti_file);
1362 }
1363
1364 // To do: implement version selection/detection
1365 // Properties
1366 $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Properties");
1367 $this->exportXMLProperties($a_xml_writer, $expLog);
1368 $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Properties");
1369
1370 $a_xml_writer->xmlEndTag("ContentObject");
1371 }
exportFileItems(string $a_target_dir, ilLog $expLog)
exportXMLStructureObjects(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
exportXMLProperties(ilXmlWriter $a_xml_writer, ilLog $expLog)
exportXMLPageObjects(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
exportXMLMediaObjects(ilXmlWriter $a_xml_writer, int $a_inst, string $a_target_dir, ilLog $expLog)
exportXMLMetaData(ilXmlWriter $a_xml_writer)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.

◆ exportXMLMediaObjects()

ilObjContentObject::exportXMLMediaObjects ( ilXmlWriter  $a_xml_writer,
int  $a_inst,
string  $a_target_dir,
ilLog  $expLog 
)

Definition at line 1443 of file class.ilObjContentObject.php.

1448 : void {
1449 $linked_mobs = array();
1450
1451 // mobs directly embedded into pages
1452 foreach ($this->mob_ids as $mob_id) {
1453 if ($mob_id > 0 && ilObject::_lookupType($mob_id) == "mob") {
1454 $expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
1455 $media_obj = new ilObjMediaObject($mob_id);
1456 $media_obj->exportXML($a_xml_writer, $a_inst);
1457 $media_obj->exportFiles($a_target_dir);
1458
1459 $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
1460 $linked_mobs = array_merge($linked_mobs, $lmobs);
1461
1462 unset($media_obj);
1463 }
1464 }
1465
1466 // linked mobs (in map areas)
1467 foreach ($linked_mobs as $mob_id) {
1468 if ($mob_id > 0) {
1469 $expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
1470 $media_obj = new ilObjMediaObject($mob_id);
1471 $media_obj->exportXML($a_xml_writer, $a_inst);
1472 $media_obj->exportFiles($a_target_dir);
1473 unset($media_obj);
1474 }
1475 }
1476 }
static _lookupType(int $id, bool $reference=false)

References ilObject\_lookupType(), and ilLog\write().

+ Here is the call graph for this function:

◆ exportXMLMetaData()

ilObjContentObject::exportXMLMetaData ( ilXmlWriter  $a_xml_writer)

Definition at line 1373 of file class.ilObjContentObject.php.

1375 : void {
1376 /*
1377 * As far as I can tell, this is unused.
1378 *
1379 * I traced usages of this method up to ilObjContentObjectGUI::export and
1380 * ilObjMediaPoolGUI::export (both via ilObjContentObject::exportXML), which have
1381 * both been made redundant by the usual export mechanisms.
1382 */
1383 /*$md2xml = new ilMD2XML($this->getId(), 0, $this->getType());
1384 $md2xml->setExportMode(true);
1385 $md2xml->startExport();
1386 $a_xml_writer->appendXML($md2xml->getXML());*/
1387 }

◆ exportXMLPageObjects()

ilObjContentObject::exportXMLPageObjects ( ilXmlWriter  $a_xml_writer,
int  $a_inst,
ilLog  $expLog 
)

Definition at line 1406 of file class.ilObjContentObject.php.

1410 : void {
1411 $pages = ilLMPageObject::getPageList($this->getId());
1412 foreach ($pages as $page) {
1413 if (ilLMPage::_exists($this->getType(), $page["obj_id"])) {
1414 $expLog->write(date("[y-m-d H:i:s] ") . "Page Object " . $page["obj_id"]);
1415
1416 // export xml to writer object
1417 $page_obj = new ilLMPageObject($this->lm, $page["obj_id"]);
1418 $page_obj->exportXML($a_xml_writer, "normal", $a_inst);
1419
1420 // collect media objects
1421 $mob_ids = $page_obj->getMediaObjectIds();
1422 foreach ($mob_ids as $mob_id) {
1423 $this->mob_ids[$mob_id] = $mob_id;
1424 }
1425
1426 // collect all file items
1427 $file_ids = $page_obj->getFileItemIds();
1428 foreach ($file_ids as $file_id) {
1429 $this->file_ids[$file_id] = $file_id;
1430 }
1431
1432 // collect all questions
1433 $q_ids = $page_obj->getQuestionIds();
1434 foreach ($q_ids as $q_id) {
1435 $this->q_ids[$q_id] = $q_id;
1436 }
1437
1438 unset($page_obj);
1439 }
1440 }
1441 }

References ilPageObject\_exists(), and ilLog\write().

+ Here is the call graph for this function:

◆ exportXMLProperties()

ilObjContentObject::exportXMLProperties ( ilXmlWriter  $a_xml_writer,
ilLog  $expLog 
)

Definition at line 1490 of file class.ilObjContentObject.php.

1493 : void {
1494 $attrs = array();
1495 $a_xml_writer->xmlStartTag("Properties", $attrs);
1496
1497 // Layout
1498 $attrs = array("Name" => "Layout", "Value" => $this->getLayout());
1499 $a_xml_writer->xmlElement("Property", $attrs);
1500
1501 // Page Header
1502 $attrs = array("Name" => "PageHeader", "Value" => $this->getPageHeader());
1503 $a_xml_writer->xmlElement("Property", $attrs);
1504
1505 // TOC Mode
1506 $attrs = array("Name" => "TOCMode", "Value" => $this->getTOCMode());
1507 $a_xml_writer->xmlElement("Property", $attrs);
1508
1509 // LM Menu Activation
1510 $attrs = array("Name" => "ActiveLMMenu", "Value" =>
1511 ilUtil::tf2yn($this->isActiveLMMenu()));
1512 $a_xml_writer->xmlElement("Property", $attrs);
1513
1514 // Numbering Activation
1515 $attrs = array("Name" => "ActiveNumbering", "Value" =>
1517 $a_xml_writer->xmlElement("Property", $attrs);
1518
1519 // Table of contents button activation
1520 $attrs = array("Name" => "ActiveTOC", "Value" =>
1521 ilUtil::tf2yn($this->isActiveTOC()));
1522 $a_xml_writer->xmlElement("Property", $attrs);
1523
1524 // Print view button activation
1525 $attrs = array("Name" => "ActivePrintView", "Value" =>
1527 $a_xml_writer->xmlElement("Property", $attrs);
1528
1529 // Note that download button is not saved, because
1530 // download files do not exist after import
1531
1532 // Clean frames
1533 $attrs = array("Name" => "CleanFrames", "Value" =>
1534 ilUtil::tf2yn($this->cleanFrames()));
1535 $a_xml_writer->xmlElement("Property", $attrs);
1536
1537 // Public notes activation
1538 $attrs = array("Name" => "PublicNotes", "Value" =>
1539 ilUtil::tf2yn($this->publicNotes()));
1540 $a_xml_writer->xmlElement("Property", $attrs);
1541
1542 // Rating
1543 $attrs = array("Name" => "Rating", "Value" =>
1544 ilUtil::tf2yn($this->hasRating()));
1545 $a_xml_writer->xmlElement("Property", $attrs);
1546 $attrs = array("Name" => "RatingPages", "Value" =>
1547 ilUtil::tf2yn($this->hasRatingPages()));
1548 $a_xml_writer->xmlElement("Property", $attrs);
1549
1550 // Header Page
1551 if ($this->getHeaderPage() > 0) {
1552 $attrs = array("Name" => "HeaderPage", "Value" =>
1553 "il_" . IL_INST_ID . "_pg_" . $this->getHeaderPage());
1554 $a_xml_writer->xmlElement("Property", $attrs);
1555 }
1556
1557 // Footer Page
1558 if ($this->getFooterPage() > 0) {
1559 $attrs = array("Name" => "FooterPage", "Value" =>
1560 "il_" . IL_INST_ID . "_pg_" . $this->getFooterPage());
1561 $a_xml_writer->xmlElement("Property", $attrs);
1562 }
1563
1564 // layout per page
1565 $attrs = array("Name" => "LayoutPerPage", "Value" =>
1566 $this->getLayoutPerPage());
1567 $a_xml_writer->xmlElement("Property", $attrs);
1568
1569 // progress icons
1570 $attrs = array("Name" => "ProgressIcons", "Value" =>
1571 $this->getProgressIcons());
1572 $a_xml_writer->xmlElement("Property", $attrs);
1573
1574 // store tries
1575 $attrs = array("Name" => "StoreTries", "Value" =>
1576 $this->getStoreTries());
1577 $a_xml_writer->xmlElement("Property", $attrs);
1578
1579 // restrict forward navigation
1580 $attrs = array("Name" => "RestrictForwardNavigation", "Value" =>
1582 $a_xml_writer->xmlElement("Property", $attrs);
1583
1584 // disable default feedback
1585 $attrs = array("Name" => "DisableDefaultFeedback", "Value" =>
1586 $this->getDisableDefaultFeedback());
1587 $a_xml_writer->xmlElement("Property", $attrs);
1588
1589 $a_xml_writer->xmlEndTag("Properties");
1590 }
getTOCMode()
get toc mode ("chapters" | "pages")
getPageHeader()
get page header mode (ilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER)
static tf2yn(bool $a_tf)
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
const IL_INST_ID
Definition: constants.php:40

◆ exportXMLStructureObjects()

ilObjContentObject::exportXMLStructureObjects ( ilXmlWriter  $a_xml_writer,
int  $a_inst,
ilLog  $expLog 
)

Definition at line 1389 of file class.ilObjContentObject.php.

1393 : void {
1394 $childs = $this->lm_tree->getChilds($this->lm_tree->getRootId());
1395 foreach ($childs as $child) {
1396 if ($child["type"] != "st") {
1397 continue;
1398 }
1399
1400 $structure_obj = new ilStructureObject($this->lm, $child["obj_id"]);
1401 $structure_obj->exportXML($a_xml_writer, $a_inst, $expLog);
1402 unset($structure_obj);
1403 }
1404 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ fixTree()

ilObjContentObject::fixTree ( )

Definition at line 1090 of file class.ilObjContentObject.php.

1090 : void
1091 {
1092 $ilDB = $this->db;
1093
1094 $tree = $this->getLMTree();
1095
1096 // check numbering, if errors, renumber
1097 // it is very important to keep this step before deleting subtrees
1098 // in the following steps
1099 $set = $ilDB->query(
1100 "SELECT DISTINCT l1.lm_id" .
1101 " FROM lm_tree l1" .
1102 " JOIN lm_tree l2 ON ( l1.child = l2.parent" .
1103 " AND l1.lm_id = l2.lm_id )" .
1104 " JOIN lm_data ON ( l1.child = lm_data.obj_id )" .
1105 " WHERE (l2.lft < l1.lft" .
1106 " OR l2.rgt > l1.rgt OR l2.lft > l1.rgt OR l2.rgt < l1.lft)" .
1107 " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer") .
1108 " ORDER BY lm_data.create_date DESC"
1109 );
1110 if ($rec = $ilDB->fetchAssoc($set)) {
1111 $tree->renumber();
1112 }
1113
1114 // delete subtrees that have no lm_data records (changed due to #20637)
1115 $set = $ilDB->query("SELECT * FROM lm_tree WHERE lm_tree.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1116 while ($node = $ilDB->fetchAssoc($set)) {
1117 $q = "SELECT * FROM lm_data WHERE obj_id = " .
1118 $ilDB->quote($node["child"], "integer");
1119 $obj_set = $ilDB->query($q);
1120 $obj_rec = $ilDB->fetchAssoc($obj_set);
1121 if (!$obj_rec) {
1122 $node_data = $tree->getNodeData($node["child"]);
1123 $node_data["child"] = $node["child"];
1124 $tree->deleteTree($node_data);
1125 }
1126 }
1127
1128 // delete subtrees that have pages as parent
1130 foreach ($nodes as $node) {
1131 $q = "SELECT * FROM lm_data WHERE obj_id = " .
1132 $ilDB->quote($node["parent"], "integer");
1133 $obj_set = $ilDB->query($q);
1134 $obj_rec = $ilDB->fetchAssoc($obj_set);
1135 if (($obj_rec["type"] ?? "") == "pg") {
1136 $node_data = $tree->getNodeData($node["child"]);
1137 if ($tree->isInTree($node["child"])) {
1138 $tree->deleteTree($node_data);
1139 }
1140 }
1141 }
1142
1143 // check for multi-references pages or chapters
1144 // if errors -> create copies of them here
1145 $set = $ilDB->query("SELECT DISTINCT l1.lm_id" .
1146 " FROM lm_tree l1" .
1147 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1148 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1149 " WHERE l1.child <> 1" .
1150 " AND l1.lm_id <> lm_data.lm_id" .
1151 " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1152 if ($rec = $ilDB->fetchAssoc($set)) {
1153 $set = $ilDB->query("SELECT DISTINCT l1.child " .
1154 " FROM lm_tree l1" .
1155 " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1156 " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1157 " WHERE l1.child <> 1" .
1158 " AND l1.lm_id <> lm_data.lm_id" .
1159 " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1160 while ($rec = $ilDB->fetchAssoc($set)) {
1161 $cobj = ilLMObjectFactory::getInstance($this->lm, $rec["child"]);
1162
1163 if (is_object($cobj)) {
1164 if ($cobj->getType() == "pg") {
1165 // make a copy of it
1166 $pg_copy = $cobj->copy($this->lm);
1167
1168 // replace the child in the tree with the copy (id)
1169 $ilDB->manipulate(
1170 "UPDATE lm_tree SET " .
1171 " child = " . $ilDB->quote($pg_copy->getId(), "integer") .
1172 " WHERE child = " . $ilDB->quote($cobj->getId(), "integer") .
1173 " AND lm_id = " . $ilDB->quote($this->getId(), "integer")
1174 );
1175 } elseif ($cobj->getType() == "st") {
1176 // make a copy of it
1177 $st_copy = $cobj->copy($this->lm);
1178
1179 // replace the child in the tree with the copy (id)
1180 $ilDB->manipulate(
1181 "UPDATE lm_tree SET " .
1182 " child = " . $ilDB->quote($st_copy->getId(), "integer") .
1183 " WHERE child = " . $ilDB->quote($cobj->getId(), "integer") .
1184 " AND lm_id = " . $ilDB->quote($this->getId(), "integer")
1185 );
1186
1187 // make all childs refer to the copy now
1188 $ilDB->manipulate(
1189 "UPDATE lm_tree SET " .
1190 " parent = " . $ilDB->quote($st_copy->getId(), "integer") .
1191 " WHERE parent = " . $ilDB->quote($cobj->getId(), "integer") .
1192 " AND lm_id = " . $ilDB->quote($this->getId(), "integer")
1193 );
1194 }
1195 }
1196 }
1197 }
1198
1199 // missing copage entries
1200 $set = $ilDB->queryF(
1201 "SELECT * FROM lm_data " .
1202 " WHERE lm_id = %s AND type = %s",
1203 array("integer", "text"),
1204 array($this->getId(), "pg")
1205 );
1206 while ($rec = $ilDB->fetchAssoc($set)) {
1207 if (!ilPageObject::_exists("lm", $rec["obj_id"], "-")) {
1208 $lm_page = new ilLMPage();
1209 $lm_page->setId($rec["obj_id"]);
1210 $lm_page->setParentId($this->getId());
1211 $lm_page->create(false);
1212 }
1213 }
1214 }
renumber(int $node_id=1, int $i=1)
Wrapper for renumber.
deleteTree(array $a_node)
delete node and the whole subtree under this node

References $ilDB, $q, ilPageObject\_exists(), ILIAS\Survey\Mode\getId(), and ilLMObjectFactory\getInstance().

+ Here is the call graph for this function:

◆ getAutoGlossaries()

ilObjContentObject::getAutoGlossaries ( )

Definition at line 255 of file class.ilObjContentObject.php.

255 : array
256 {
258 }

Referenced by ilLMGlossaryTableGUI\__construct().

+ Here is the caller graph for this function:

◆ getAvailableLayouts()

static ilObjContentObject::getAvailableLayouts ( )
static

get all available lm layouts

Definition at line 934 of file class.ilObjContentObject.php.

934 : array
935 {
936 $dir = opendir("./components/ILIAS/LearningModule/layouts/lm");
937
938 $layouts = array();
939
940 while ($file = readdir($dir)) {
941 if ($file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
942 // directories
943 if (is_dir("./components/ILIAS/LearningModule/layouts/lm/" . $file)) {
944 $layouts[$file] = $file;
945 }
946 }
947 }
948 asort($layouts);
949
950 // workaround: fix ordering
951 $ret = array(
952 'toc2win' => 'toc2win',
953 'toc2windyn' => 'toc2windyn',
954 '1window' => '1window',
955 '2window' => '2window',
956 '3window' => '3window',
957 'presentation' => 'presentation',
958 'fullscreen' => 'fullscreen'
959 );
960
961 foreach ($layouts as $l) {
962 if (!in_array($l, $ret)) {
963 $ret[$l] = $l;
964 }
965 }
966
967 return $ret;
968 }

Referenced by ilLMPageObjectGUI\initEditLayoutForm().

+ Here is the caller graph for this function:

◆ getDataDirectory()

ilObjContentObject::getDataDirectory ( )

Definition at line 346 of file class.ilObjContentObject.php.

346 : string
347 {
348 return ilFileUtils::getDataDir() . "/lm_data" .
349 "/lm_" . $this->getId();
350 }

References ilFileUtils\getDataDir(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getDisableDefaultFeedback()

ilObjContentObject::getDisableDefaultFeedback ( )

Definition at line 159 of file class.ilObjContentObject.php.

159 : bool
160 {
162 }

◆ getExportDirectory()

ilObjContentObject::getExportDirectory ( string  $a_type = "xml")

Definition at line 406 of file class.ilObjContentObject.php.

408 : string {
409 switch ($a_type) {
410 default: // = xml
411 if (substr($a_type, 0, 4) == "html") {
412 $export_dir = ilFileUtils::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export_" . $a_type;
413 } else {
414 $export_dir = ilFileUtils::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export";
415 }
416 break;
417 }
418 return $export_dir;
419 }

References ilFileUtils\getDataDir(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getExportFiles()

ilObjContentObject::getExportFiles ( )

Definition at line 1592 of file class.ilObjContentObject.php.

1592 : array
1593 {
1594 $file = array();
1595
1596 $types = array("xml", "html");
1597
1598 foreach ($types as $type) {
1599 $dir = $this->getExportDirectory($type);
1600 // quit if import dir not available
1601 if (!is_dir($dir) or
1602 !is_writeable($dir)) {
1603 continue;
1604 }
1605
1606 // open directory
1607 $cdir = dir($dir);
1608
1609 // initialize array
1610
1611 // get files and save the in the array
1612 while ($entry = $cdir->read()) {
1613 if ($entry != "." and
1614 $entry != ".." and
1615 substr($entry, -4) == ".zip" and
1616 preg_match("~^[0-9]{10}_{2}[0-9]+_{2}(lm_)*[0-9]+\.zip\$~", $entry)) {
1617 $file[$entry . $type] = array("type" => $type, "file" => $entry,
1618 "size" => filesize($dir . "/" . $entry));
1619 }
1620 }
1621
1622 // close import directory
1623 $cdir->close();
1624 }
1625
1626 // sort files
1627 ksort($file);
1628 return $file;
1629 }
getExportDirectory(string $a_type="xml")
string $type

◆ getFooterPage()

ilObjContentObject::getFooterPage ( )

Definition at line 837 of file class.ilObjContentObject.php.

837 : int
838 {
839 return $this->footer_page;
840 }

◆ getForTranslation()

ilObjContentObject::getForTranslation ( )

Definition at line 305 of file class.ilObjContentObject.php.

305 : bool
306 {
308 }

◆ getHeaderPage()

ilObjContentObject::getHeaderPage ( )

Definition at line 827 of file class.ilObjContentObject.php.

827 : int
828 {
829 return $this->header_page;
830 }

◆ getHideHeaderFooterPrint()

ilObjContentObject::getHideHeaderFooterPrint ( )

Definition at line 797 of file class.ilObjContentObject.php.

797 : bool
798 {
800 }

◆ getImportDirectory()

ilObjContentObject::getImportDirectory ( )

Definition at line 352 of file class.ilObjContentObject.php.

352 : string
353 {
354 if (strlen($this->import_dir)) {
355 return $this->import_dir;
356 }
357
358 $import_dir = ilFileUtils::getDataDir() . "/lm_data" .
359 "/lm_" . $this->getId() . "/import";
360 if (is_dir($import_dir)) {
361 return $import_dir;
362 }
363 return "";
364 }

References ilFileUtils\getDataDir(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getLayout()

ilObjContentObject::getLayout ( )

Definition at line 474 of file class.ilObjContentObject.php.

474 : string
475 {
476 return $this->layout;
477 }

◆ getLayoutPerPage()

ilObjContentObject::getLayoutPerPage ( )

Definition at line 146 of file class.ilObjContentObject.php.

146 : bool
147 {
149 }

◆ getLMTree()

ilObjContentObject::getLMTree ( )

Definition at line 310 of file class.ilObjContentObject.php.

310 : ilLMTree
311 {
312 return $this->lm_tree;
313 }

◆ getPageHeader()

ilObjContentObject::getPageHeader ( )

get page header mode (ilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER)

Definition at line 707 of file class.ilObjContentObject.php.

707 : string
708 {
709 return $this->pg_header;
710 }

◆ getProgressIcons()

ilObjContentObject::getProgressIcons ( )

Definition at line 169 of file class.ilObjContentObject.php.

169 : bool
170 {
171 return $this->progr_icons;
172 }

◆ getRestrictForwardNavigation()

ilObjContentObject::getRestrictForwardNavigation ( )

Definition at line 189 of file class.ilObjContentObject.php.

189 : bool
190 {
192 }

◆ getStoreTries()

ilObjContentObject::getStoreTries ( )

Definition at line 179 of file class.ilObjContentObject.php.

179 : bool
180 {
181 return $this->store_tries;
182 }

◆ getTOCMode()

ilObjContentObject::getTOCMode ( )

get toc mode ("chapters" | "pages")

Definition at line 725 of file class.ilObjContentObject.php.

725 : string
726 {
727 return $this->toc_mode;
728 }

◆ getTree()

ilObjContentObject::getTree ( )

Definition at line 194 of file class.ilObjContentObject.php.

194 : ilLMTree
195 {
196 return $this->lm_tree;
197 }

◆ hasRating()

ilObjContentObject::hasRating ( )

Definition at line 2013 of file class.ilObjContentObject.php.

2013 : bool
2014 {
2015 return $this->rating;
2016 }

◆ hasRatingPages()

ilObjContentObject::hasRatingPages ( )

Definition at line 2023 of file class.ilObjContentObject.php.

2023 : bool
2024 {
2025 return $this->rating_pages;
2026 }

◆ hasSuccessorPage()

static ilObjContentObject::hasSuccessorPage ( int  $a_cont_obj_id,
int  $a_page_id 
)
static

checks if page has a successor page

Definition at line 1064 of file class.ilObjContentObject.php.

1067 : bool {
1068 $tree = new ilTree($a_cont_obj_id);
1069 $tree->setTableNames('lm_tree', 'lm_data');
1070 $tree->setTreeTablePK("lm_id");
1071 if ($tree->isInTree($a_page_id)) {
1072 $succ = $tree->fetchSuccessorNode($a_page_id, "pg");
1073 if ($succ > 0) {
1074 return true;
1075 }
1076 }
1077 return false;
1078 }
fetchSuccessorNode(int $a_node_id, string $a_type="")
get node data of successor node

Referenced by ilPageObjectGUI\showPage().

+ Here is the caller graph for this function:

◆ import()

ilObjContentObject::import ( )

if implemented, this function should be called from an Out/GUI-Object

Definition at line 230 of file class.ilObjContentObject.php.

230 : void
231 {
232 // nothing to do. just display the dialogue in Out
233 }

◆ isActiveLMMenu()

ilObjContentObject::isActiveLMMenu ( )

Definition at line 744 of file class.ilObjContentObject.php.

744 : bool
745 {
747 }

◆ isActiveNumbering()

ilObjContentObject::isActiveNumbering ( )

Definition at line 764 of file class.ilObjContentObject.php.

764 : bool
765 {
766 return $this->numbering;
767 }

◆ isActivePreventGlossaryAppendix()

ilObjContentObject::isActivePreventGlossaryAppendix ( )

Definition at line 784 of file class.ilObjContentObject.php.

784 : bool
785 {
787 }

◆ isActivePrintView()

ilObjContentObject::isActivePrintView ( )

Definition at line 774 of file class.ilObjContentObject.php.

774 : bool
775 {
777 }

◆ isActiveTOC()

ilObjContentObject::isActiveTOC ( )

Definition at line 754 of file class.ilObjContentObject.php.

754 : bool
755 {
756 return $this->toc_active;
757 }

◆ isInfoEnabled()

ilObjContentObject::isInfoEnabled ( )

Definition at line 2066 of file class.ilObjContentObject.php.

2066 : bool
2067 {
2069 }

References ILIAS\Survey\Mode\getId(), and ilObjContentObjectAccess\isInfoEnabled().

+ Here is the call graph for this function:

◆ isOnlineHelpModule()

static ilObjContentObject::isOnlineHelpModule ( int  $a_id,
bool  $a_as_obj_id = false 
)
static

Is module an online module.

Returns
bool true, if current learning module is an online help lm

Definition at line 1995 of file class.ilObjContentObject.php.

1998 : bool {
1999 if (!$a_as_obj_id && $a_id > 0 && $a_id === (int) OH_REF_ID) {
2000 return true;
2001 }
2002 if ($a_as_obj_id && $a_id > 0 && $a_id === ilObject::_lookupObjId((int) OH_REF_ID)) {
2003 return true;
2004 }
2005 return false;
2006 }
static _lookupObjId(int $ref_id)

Referenced by ilLMPageConfig\configureByObjectId(), ilLearningModuleExporter\getXmlExportTailDependencies(), ilObjContentObjectGUI\setContentSubTabs(), and ilObjContentObjectGUI\showExportIDsOverview().

+ Here is the caller graph for this function:

◆ lookupAutoGlossaries()

static ilObjContentObject::lookupAutoGlossaries ( int  $a_lm_id)
static

Definition at line 1936 of file class.ilObjContentObject.php.

1938 : array {
1939 global $DIC;
1940
1941 $ilDB = $DIC->database();
1942
1943 // read auto glossaries
1944 $set = $ilDB->query(
1945 "SELECT * FROM lm_glossaries " .
1946 " WHERE lm_id = " . $ilDB->quote($a_lm_id, "integer")
1947 );
1948 $glos = array();
1949 while ($rec = $ilDB->fetchAssoc($set)) {
1950 $glos[] = $rec["glo_id"];
1951 }
1952 return $glos;
1953 }

Referenced by ilLMPage\beforePageContentUpdate().

+ Here is the caller graph for this function:

◆ publicNotes()

ilObjContentObject::publicNotes ( )

Definition at line 807 of file class.ilObjContentObject.php.

807 : bool
808 {
809 return $this->pub_notes;
810 }

◆ read()

ilObjContentObject::read ( )

Reimplemented from ilObject.

Definition at line 119 of file class.ilObjContentObject.php.

119 : void
120 {
122
123 parent::read();
124
125 $this->lm_tree = new ilLMTree($this->getId());
126
127 $this->readProperties();
128
129 // read auto glossaries
130 $set = $ilDB->query(
131 "SELECT * FROM lm_glossaries " .
132 " WHERE lm_id = " . $ilDB->quote($this->getId(), "integer")
133 );
134 $glos = array();
135 while ($rec = $ilDB->fetchAssoc($set)) {
136 $glos[] = $rec["glo_id"];
137 }
138 $this->setAutoGlossaries($glos);
139 }

References $ilDB, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ readProperties()

ilObjContentObject::readProperties ( )

Definition at line 842 of file class.ilObjContentObject.php.

842 : void
843 {
845
846 $q = "SELECT * FROM content_object WHERE id = " .
847 $ilDB->quote($this->getId(), "integer");
848 $lm_set = $ilDB->query($q);
849 $lm_rec = $ilDB->fetchAssoc($lm_set);
850 $this->setLayout((string) $lm_rec["default_layout"]);
851 $this->setPageHeader((string) $lm_rec["page_header"]);
852 $this->setTOCMode((string) $lm_rec["toc_mode"]);
853 $this->setActiveTOC(ilUtil::yn2tf($lm_rec["toc_active"]));
854 $this->setActiveNumbering(ilUtil::yn2tf($lm_rec["numbering"]));
855 $this->setActivePrintView(ilUtil::yn2tf($lm_rec["print_view_active"]));
856 $this->setActivePreventGlossaryAppendix(ilUtil::yn2tf($lm_rec["no_glo_appendix"]));
857 $this->setHideHeaderFooterPrint((bool) $lm_rec["hide_head_foot_print"]);
858 $this->setActiveLMMenu(ilUtil::yn2tf($lm_rec["lm_menu_active"]));
859 $this->setCleanFrames(ilUtil::yn2tf($lm_rec["clean_frames"]));
860 $this->setHeaderPage((int) $lm_rec["header_page"]);
861 $this->setFooterPage((int) $lm_rec["footer_page"]);
862 $this->setLayoutPerPage((bool) $lm_rec["layout_per_page"]);
863 $this->setRating((bool) $lm_rec["rating"]);
864 $this->setRatingPages((bool) $lm_rec["rating_pages"]);
865 $this->setDisableDefaultFeedback((bool) $lm_rec["disable_def_feedback"]);
866 $this->setProgressIcons((bool) $lm_rec["progr_icons"]);
867 $this->setStoreTries((bool) $lm_rec["store_tries"]);
868 $this->setRestrictForwardNavigation((bool) $lm_rec["restrict_forw_nav"]);
869
870 // #14661
871 $this->setPublicNotes($this->notes->domain()->commentsActive($this->getId()));
872
873 $this->setForTranslation((bool) $lm_rec["for_translation"]);
874 }
setRestrictForwardNavigation(bool $a_val)
setForTranslation(bool $a_val)
Set for translation (lm has been imported for translation purposes)
setHideHeaderFooterPrint(bool $a_val)
Set hide header footer in print mode.
setDisableDefaultFeedback(bool $a_val)
Set disable default feedback for questions.
setActiveLMMenu(bool $a_act_lm_menu)
setPublicNotes(bool $a_pub_notes)
setTOCMode(string $a_toc_mode="chapters")
set toc mode
setActivePreventGlossaryAppendix(bool $a_print)
setPageHeader(string $a_pg_header=ilLMObject::CHAPTER_TITLE)
set page header mode
static yn2tf(string $a_yn)
$lm_set

References $ilDB, $lm_set, $q, ILIAS\Survey\Mode\getId(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ removeAutoGlossary()

ilObjContentObject::removeAutoGlossary ( int  $a_glo_id)

Definition at line 260 of file class.ilObjContentObject.php.

260 : void
261 {
262 $glo_ids = array();
263 foreach ($this->getAutoGlossaries() as $g) {
264 if ($g != $a_glo_id) {
265 $glo_ids[] = $g;
266 }
267 }
268 $this->setAutoGlossaries($glo_ids);
269 }

◆ setActiveLMMenu()

ilObjContentObject::setActiveLMMenu ( bool  $a_act_lm_menu)

Definition at line 739 of file class.ilObjContentObject.php.

739 : void
740 {
741 $this->lm_menu_active = $a_act_lm_menu;
742 }

◆ setActiveNumbering()

ilObjContentObject::setActiveNumbering ( bool  $a_num)

Definition at line 759 of file class.ilObjContentObject.php.

759 : void
760 {
761 $this->numbering = $a_num;
762 }

◆ setActivePreventGlossaryAppendix()

ilObjContentObject::setActivePreventGlossaryAppendix ( bool  $a_print)

Definition at line 779 of file class.ilObjContentObject.php.

779 : void
780 {
781 $this->prevent_glossary_appendix_active = $a_print;
782 }

◆ setActivePrintView()

ilObjContentObject::setActivePrintView ( bool  $a_print)

Definition at line 769 of file class.ilObjContentObject.php.

769 : void
770 {
771 $this->print_view_active = $a_print;
772 }

◆ setActiveTOC()

ilObjContentObject::setActiveTOC ( bool  $a_toc)

Definition at line 749 of file class.ilObjContentObject.php.

749 : void
750 {
751 $this->toc_active = $a_toc;
752 }

◆ setAutoGlossaries()

ilObjContentObject::setAutoGlossaries ( array  $a_val)

Definition at line 241 of file class.ilObjContentObject.php.

241 : void
242 {
243 $this->auto_glossaries = array();
244 if (is_array($a_val)) {
245 foreach ($a_val as $v) {
246 $v = (int) $v;
247 if ($v > 0 && ilObject::_lookupType($v) == "glo" &&
248 !in_array($v, $this->auto_glossaries)) {
249 $this->auto_glossaries[] = $v;
250 }
251 }
252 }
253 }

References ilObject\_lookupType(), and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ setCleanFrames()

ilObjContentObject::setCleanFrames ( bool  $a_clean)

Definition at line 812 of file class.ilObjContentObject.php.

812 : void
813 {
814 $this->clean_frames = $a_clean;
815 }

◆ setDisableDefaultFeedback()

ilObjContentObject::setDisableDefaultFeedback ( bool  $a_val)

Set disable default feedback for questions.

Definition at line 154 of file class.ilObjContentObject.php.

154 : void
155 {
156 $this->disable_def_feedback = $a_val;
157 }

◆ setFooterPage()

ilObjContentObject::setFooterPage ( int  $a_pg)

Definition at line 832 of file class.ilObjContentObject.php.

832 : void
833 {
834 $this->footer_page = $a_pg;
835 }

◆ setForTranslation()

ilObjContentObject::setForTranslation ( bool  $a_val)

Set for translation (lm has been imported for translation purposes)

Definition at line 300 of file class.ilObjContentObject.php.

300 : void
301 {
302 $this->for_translation = $a_val;
303 }

◆ setHeaderPage()

ilObjContentObject::setHeaderPage ( int  $a_pg)

Definition at line 822 of file class.ilObjContentObject.php.

822 : void
823 {
824 $this->header_page = $a_pg;
825 }

◆ setHideHeaderFooterPrint()

ilObjContentObject::setHideHeaderFooterPrint ( bool  $a_val)

Set hide header footer in print mode.

Definition at line 792 of file class.ilObjContentObject.php.

792 : void
793 {
794 $this->hide_header_footer_print = $a_val;
795 }

◆ setImportDirectory()

ilObjContentObject::setImportDirectory ( string  $a_import_dir)

Definition at line 366 of file class.ilObjContentObject.php.

366 : void
367 {
368 $this->import_dir = $a_import_dir;
369 }

◆ setLayout()

ilObjContentObject::setLayout ( string  $a_layout)

Definition at line 479 of file class.ilObjContentObject.php.

479 : void
480 {
481 $this->layout = $a_layout;
482 }

◆ setLayoutPerPage()

ilObjContentObject::setLayoutPerPage ( bool  $a_val)

Definition at line 141 of file class.ilObjContentObject.php.

141 : void
142 {
143 $this->layout_per_page = $a_val;
144 }

◆ setPageHeader()

ilObjContentObject::setPageHeader ( string  $a_pg_header = ilLMObject::CHAPTER_TITLE)

set page header mode

Parameters
string$a_pg_headerilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER

Definition at line 716 of file class.ilObjContentObject.php.

718 : void {
719 $this->pg_header = $a_pg_header;
720 }

◆ setProgressIcons()

ilObjContentObject::setProgressIcons ( bool  $a_val)

Definition at line 164 of file class.ilObjContentObject.php.

164 : void
165 {
166 $this->progr_icons = $a_val;
167 }

◆ setPublicNotes()

ilObjContentObject::setPublicNotes ( bool  $a_pub_notes)

Definition at line 802 of file class.ilObjContentObject.php.

802 : void
803 {
804 $this->pub_notes = $a_pub_notes;
805 }

◆ setRating()

ilObjContentObject::setRating ( bool  $a_value)

Definition at line 2008 of file class.ilObjContentObject.php.

2008 : void
2009 {
2010 $this->rating = $a_value;
2011 }

◆ setRatingPages()

ilObjContentObject::setRatingPages ( bool  $a_value)

Definition at line 2018 of file class.ilObjContentObject.php.

2018 : void
2019 {
2020 $this->rating_pages = $a_value;
2021 }

◆ setRestrictForwardNavigation()

ilObjContentObject::setRestrictForwardNavigation ( bool  $a_val)

Definition at line 184 of file class.ilObjContentObject.php.

184 : void
185 {
186 $this->restrict_forw_nav = $a_val;
187 }

◆ setStoreTries()

ilObjContentObject::setStoreTries ( bool  $a_val)

Definition at line 174 of file class.ilObjContentObject.php.

174 : void
175 {
176 $this->store_tries = $a_val;
177 }

◆ setTOCMode()

ilObjContentObject::setTOCMode ( string  $a_toc_mode = "chapters")

set toc mode

Parameters
string$a_toc_mode"chapters" | "pages"

Definition at line 734 of file class.ilObjContentObject.php.

734 : void
735 {
736 $this->toc_mode = $a_toc_mode;
737 }

◆ update()

ilObjContentObject::update ( )

Reimplemented from ilObject.

Definition at line 199 of file class.ilObjContentObject.php.

199 : bool
200 {
201 $this->updateMetaData();
202 parent::update();
203 $this->updateProperties();
204 $this->updateAutoGlossaries();
205 return true;
206 }

◆ updateAutoGlossaries()

ilObjContentObject::updateAutoGlossaries ( )

Definition at line 208 of file class.ilObjContentObject.php.

208 : void
209 {
211
212 // update auto glossaries
213 $ilDB->manipulate(
214 "DELETE FROM lm_glossaries WHERE " .
215 " lm_id = " . $ilDB->quote($this->getId(), "integer")
216 );
217 foreach ($this->getAutoGlossaries() as $glo_id) {
218 $ilDB->manipulate("INSERT INTO lm_glossaries " .
219 "(lm_id, glo_id) VALUES (" .
220 $ilDB->quote($this->getId(), "integer") . "," .
221 $ilDB->quote($glo_id, "integer") .
222 ")");
223 }
224 }

References $ilDB.

◆ updateProperties()

ilObjContentObject::updateProperties ( )

Definition at line 876 of file class.ilObjContentObject.php.

876 : void
877 {
879
880 // force clean_frames to be set, if layout per page is activated
881 if ($this->getLayoutPerPage()) {
882 $this->setCleanFrames(true);
883 }
884
885 $q = "UPDATE content_object SET " .
886 " default_layout = " . $ilDB->quote($this->getLayout(), "text") . ", " .
887 " page_header = " . $ilDB->quote($this->getPageHeader(), "text") . "," .
888 " toc_mode = " . $ilDB->quote($this->getTOCMode(), "text") . "," .
889 " toc_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveTOC()), "text") . "," .
890 " numbering = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveNumbering()), "text") . "," .
891 " print_view_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActivePrintView()), "text") . "," .
892 " no_glo_appendix = " . $ilDB->quote(ilUtil::tf2yn($this->isActivePreventGlossaryAppendix()), "text") . "," .
893 " hide_head_foot_print = " . $ilDB->quote($this->getHideHeaderFooterPrint(), "integer") . "," .
894 " clean_frames = " . $ilDB->quote(ilUtil::tf2yn($this->cleanFrames()), "text") . "," .
895 " header_page = " . $ilDB->quote($this->getHeaderPage(), "integer") . "," .
896 " footer_page = " . $ilDB->quote($this->getFooterPage(), "integer") . "," .
897 " lm_menu_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveLMMenu()), "text") . ", " .
898 " layout_per_page = " . $ilDB->quote($this->getLayoutPerPage(), "integer") . ", " .
899 " rating = " . $ilDB->quote($this->hasRating(), "integer") . ", " .
900 " rating_pages = " . $ilDB->quote($this->hasRatingPages(), "integer") . ", " .
901 " disable_def_feedback = " . $ilDB->quote($this->getDisableDefaultFeedback(), "integer") . ", " .
902 " progr_icons = " . $ilDB->quote($this->getProgressIcons(), "integer") . ", " .
903 " store_tries = " . $ilDB->quote($this->getStoreTries(), "integer") . ", " .
904 " restrict_forw_nav = " . $ilDB->quote($this->getRestrictForwardNavigation(), "integer") . ", " .
905 " for_translation = " . $ilDB->quote((int) $this->getForTranslation(), "integer") . " " .
906 " WHERE id = " . $ilDB->quote($this->getId(), "integer");
907 $ilDB->manipulate($q);
908 // #14661
909 $this->notes->domain()->activateComments($this->getId(), $this->publicNotes());
910 }

References $ilDB, $q, ILIAS\Survey\Mode\getId(), and ilUtil\tf2yn().

+ Here is the call graph for this function:

◆ validatePages()

ilObjContentObject::validatePages ( )

Validate all pages.

Definition at line 1762 of file class.ilObjContentObject.php.

1762 : string
1763 {
1764 $mess = "";
1765
1766 $pages = ilLMPageObject::getPageList($this->getId());
1767 foreach ($pages as $page) {
1768 if (ilLMPage::_exists($this->getType(), $page["obj_id"])) {
1769 $cpage = new ilLMPage($page["obj_id"]);
1770 $cpage->buildDom();
1771 $error = $cpage->validateDom();
1772
1773 if ($error != "") {
1774 $this->lng->loadLanguageModule("content");
1775 $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("cont_import_validation_errors"));
1776 $title = ilLMObject::_lookupTitle($page["obj_id"]);
1777 $page_obj = new ilLMPageObject($this->lm, $page["obj_id"]);
1778 $mess .= $this->lng->txt("obj_pg") . ": " . $title;
1779 $mess .= '<div class="small">';
1780 foreach ($error as $e) {
1781 $err_mess = implode(" - ", $e);
1782 if (!is_int(strpos($err_mess, ":0:"))) {
1783 $mess .= htmlentities($err_mess) . "<br />";
1784 }
1785 }
1786 $mess .= '</div>';
1787 $mess .= "<br />";
1788 }
1789 }
1790 }
1791
1792 return $mess;
1793 }
static _lookupTitle(int $a_obj_id)
string $title

References Vendor\Package\$e, ilPageObject\_exists(), ilLMObject\_lookupTitle(), ILIAS\Survey\Mode\getId(), ilLMPageObject\getPageList(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ writeFooterPage()

static ilObjContentObject::writeFooterPage ( int  $a_lm_id,
int  $a_page_id 
)
static

Definition at line 499 of file class.ilObjContentObject.php.

502 : void {
503 global $DIC;
504
505 $ilDB = $DIC->database();
506
507 $ilDB->manipulate(
508 "UPDATE content_object SET " .
509 " footer_page = " . $ilDB->quote($a_page_id, "integer") .
510 " WHERE id = " . $ilDB->quote($a_lm_id, "integer")
511 );
512 }

Referenced by ilLearningModuleImporter\finalProcessing().

+ Here is the caller graph for this function:

◆ writeHeaderPage()

static ilObjContentObject::writeHeaderPage ( int  $a_lm_id,
int  $a_page_id 
)
static

Definition at line 484 of file class.ilObjContentObject.php.

487 : void {
488 global $DIC;
489
490 $ilDB = $DIC->database();
491
492 $ilDB->manipulate(
493 "UPDATE content_object SET " .
494 " header_page = " . $ilDB->quote($a_page_id, "integer") .
495 " WHERE id = " . $ilDB->quote($a_lm_id, "integer")
496 );
497 }

Referenced by ilLearningModuleImporter\finalProcessing().

+ Here is the caller graph for this function:

Field Documentation

◆ $auto_glossaries

array ilObjContentObject::$auto_glossaries = array()

Definition at line 59 of file class.ilObjContentObject.php.

◆ $clean_frames

bool ilObjContentObject::$clean_frames = false
protected

Definition at line 35 of file class.ilObjContentObject.php.

◆ $content_style_domain

ILIAS Style Content DomainService ilObjContentObject::$content_style_domain
protected

Definition at line 62 of file class.ilObjContentObject.php.

◆ $disable_def_feedback

bool ilObjContentObject::$disable_def_feedback = false
protected

Definition at line 47 of file class.ilObjContentObject.php.

◆ $file_ids

array ilObjContentObject::$file_ids = []
protected

Definition at line 30 of file class.ilObjContentObject.php.

◆ $footer_page

int ilObjContentObject::$footer_page = 0
protected

Definition at line 33 of file class.ilObjContentObject.php.

◆ $for_translation

bool ilObjContentObject::$for_translation = false

Definition at line 56 of file class.ilObjContentObject.php.

◆ $header_page

int ilObjContentObject::$header_page = 0
protected

Definition at line 32 of file class.ilObjContentObject.php.

◆ $hide_header_footer_print

bool ilObjContentObject::$hide_header_footer_print = false
protected

Definition at line 37 of file class.ilObjContentObject.php.

◆ $import_dir

string ilObjContentObject::$import_dir = ''
private

Definition at line 60 of file class.ilObjContentObject.php.

◆ $layout

string ilObjContentObject::$layout = ''

Definition at line 52 of file class.ilObjContentObject.php.

◆ $layout_per_page

bool ilObjContentObject::$layout_per_page = false
protected

Definition at line 48 of file class.ilObjContentObject.php.

◆ $lm

ilObjLearningModule ilObjContentObject::$lm
protected

Definition at line 61 of file class.ilObjContentObject.php.

◆ $lm_menu_active

bool ilObjContentObject::$lm_menu_active = false
protected

Definition at line 42 of file class.ilObjContentObject.php.

◆ $lm_tree

ilLMTree ilObjContentObject::$lm_tree

Definition at line 51 of file class.ilObjContentObject.php.

◆ $locator

ilLocatorGUI ilObjContentObject::$locator
protected

Definition at line 50 of file class.ilObjContentObject.php.

◆ $lom_services

LOMServices ilObjContentObject::$lom_services
protected

Definition at line 64 of file class.ilObjContentObject.php.

◆ $main_tpl

ilGlobalTemplateInterface ilObjContentObject::$main_tpl
private

Definition at line 63 of file class.ilObjContentObject.php.

◆ $mob_ids

array ilObjContentObject::$mob_ids = []
protected

Definition at line 29 of file class.ilObjContentObject.php.

◆ $notes

ILIAS Notes Service ilObjContentObject::$notes
protected

Definition at line 27 of file class.ilObjContentObject.php.

◆ $numbering

bool ilObjContentObject::$numbering = false
protected

Definition at line 40 of file class.ilObjContentObject.php.

◆ $online

bool ilObjContentObject::$online = false

Definition at line 55 of file class.ilObjContentObject.php.

◆ $pg_header

string ilObjContentObject::$pg_header = ''

Definition at line 54 of file class.ilObjContentObject.php.

◆ $prevent_glossary_appendix_active

bool ilObjContentObject::$prevent_glossary_appendix_active = false
protected

Definition at line 38 of file class.ilObjContentObject.php.

◆ $print_view_active

bool ilObjContentObject::$print_view_active = false
protected

Definition at line 39 of file class.ilObjContentObject.php.

◆ $progr_icons

bool ilObjContentObject::$progr_icons = false
protected

Definition at line 46 of file class.ilObjContentObject.php.

◆ $pub_notes

bool ilObjContentObject::$pub_notes = false
protected

Definition at line 36 of file class.ilObjContentObject.php.

◆ $public_export_file

array ilObjContentObject::$public_export_file = []
protected

Definition at line 31 of file class.ilObjContentObject.php.

◆ $q_ids

array ilObjContentObject::$q_ids = []
protected

Definition at line 28 of file class.ilObjContentObject.php.

◆ $rating

bool ilObjContentObject::$rating = false
protected

Definition at line 57 of file class.ilObjContentObject.php.

◆ $rating_pages

bool ilObjContentObject::$rating_pages = false
protected

Definition at line 58 of file class.ilObjContentObject.php.

◆ $restrict_forw_nav

bool ilObjContentObject::$restrict_forw_nav = false
protected

Definition at line 44 of file class.ilObjContentObject.php.

◆ $store_tries

bool ilObjContentObject::$store_tries = false
protected

Definition at line 45 of file class.ilObjContentObject.php.

◆ $style_id

int ilObjContentObject::$style_id = 0

Definition at line 53 of file class.ilObjContentObject.php.

◆ $toc_active

bool ilObjContentObject::$toc_active = false
protected

Definition at line 41 of file class.ilObjContentObject.php.

◆ $toc_mode

string ilObjContentObject::$toc_mode = ''
protected

Definition at line 43 of file class.ilObjContentObject.php.

◆ $user

ilObjUser ilObjContentObject::$user
protected

Definition at line 49 of file class.ilObjContentObject.php.

◆ $user_comments

bool ilObjContentObject::$user_comments = false
protected

Definition at line 34 of file class.ilObjContentObject.php.


The documentation for this class was generated from the following file: