ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 setActiveDownloads (bool $a_down)
 
 isActiveDownloads ()
 
 setActiveDownloadsPublic (bool $a_down)
 
 isActiveDownloadsPublic ()
 
 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 ()
 
 setPublicExportFile (string $a_type, string $a_file)
 specify public export file for type More...
 
 getPublicExportFile (string $a_type)
 
 getOfflineFiles (string $dir)
 
 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 ()
 
 getPublicExportFiles ()
 Get public export files. More...
 
 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)
 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 $downloads_public_active = false
 
bool $downloads_active = 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 1003 of file class.ilObjContentObject.php.

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

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

1007  : bool {
1008  $lm_tree = new ilTree($cont_obj_id);
1009  $lm_tree->setTableNames('lm_tree', 'lm_data');
1010  $lm_tree->setTreeTablePK("lm_id");
1011 
1012  if ($lm_tree->isInTree($page_id)) {
1013  $path = $lm_tree->getPathFull($page_id, $lm_tree->readRootId());
1014  foreach ($path as $node) {
1015  if ($node["type"] == "st") {
1016  if (!ilConditionHandler::_checkAllConditionsOfTarget($cont_ref_id, $node["child"], "st")) {
1017  return false;
1018  }
1019  }
1020  }
1021  }
1022 
1023  return true;
1024  }
isInTree(?int $a_node_id)
get all information of a node.
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table
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...
$path
Definition: ltiservices.php:29
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 &#39;obj_id&#39; You may use...
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
+ 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 692 of file class.ilObjContentObject.php.

References $DIC, $ilDB, and $q.

Referenced by ilObjStyleSheet\delete().

694  : void {
695  global $DIC;
696 
697  $ilDB = $DIC->database();
698 
699  $q = "UPDATE content_object SET " .
700  " stylesheet = " . $ilDB->quote(0, "integer") .
701  " WHERE stylesheet = " . $ilDB->quote($a_style_id, "integer");
702 
703  $ilDB->manipulate($q);
704  }
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ 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 1029 of file class.ilObjContentObject.php.

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

Referenced by ilLMContentRendererGUI\renderPreconditionsOfPage().

1033  : array {
1034  $lm_tree = new ilTree($cont_obj_id);
1035  $lm_tree->setTableNames('lm_tree', 'lm_data');
1036  $lm_tree->setTreeTablePK("lm_id");
1037 
1038  $conds = array();
1039  if ($lm_tree->isInTree($page_id)) {
1040  // get full path of page
1041  $path = $lm_tree->getPathFull($page_id, $lm_tree->readRootId());
1042  foreach ($path as $node) {
1043  if ($node["type"] == "st") {
1044  // get all preconditions of upper chapters
1045  $tconds = ilConditionHandler::_getPersistedConditionsOfTarget($cont_ref_id, $node["child"], "st");
1046  foreach ($tconds as $tcond) {
1047  // store all missing preconditions
1048  if (!ilConditionHandler::_checkCondition($tcond)) {
1049  $conds[] = $tcond;
1050  }
1051  }
1052  }
1053  }
1054  }
1055 
1056  return $conds;
1057  }
isInTree(?int $a_node_id)
get all information of a node.
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table
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...
$path
Definition: ltiservices.php:29
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 &#39;obj_id&#39; You may use...
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...
static _getPersistedConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_target_type="")
get all persisted conditions of target object
+ Here is the call graph for this function:
+ 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 1062 of file class.ilObjContentObject.php.

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

Referenced by ilLMContentRendererGUI\renderPreconditionsOfPage().

1066  : int {
1067  $lm_tree = new ilTree($cont_obj_id);
1068  $lm_tree->setTableNames('lm_tree', 'lm_data');
1069  $lm_tree->setTreeTablePK("lm_id");
1070 
1071  if ($lm_tree->isInTree($page_id)) {
1072  // get full path of page
1073  $path = $lm_tree->getPathFull($page_id, $lm_tree->readRootId());
1074  foreach ($path as $node) {
1075  if ($node["type"] == "st") {
1076  // get all preconditions of upper chapters
1077  $tconds = ilConditionHandler::_getPersistedConditionsOfTarget($cont_obj_ref_id, $node["child"], "st");
1078  foreach ($tconds as $tcond) {
1079  // look for missing precondition
1080  if (!ilConditionHandler::_checkCondition($tcond)) {
1081  return (int) $node["child"];
1082  }
1083  }
1084  }
1085  }
1086  }
1087 
1088  return 0;
1089  }
isInTree(?int $a_node_id)
get all information of a node.
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table
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...
$path
Definition: ltiservices.php:29
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 &#39;obj_id&#39; You may use...
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...
static _getPersistedConditionsOfTarget(int $a_target_ref_id, int $a_target_obj_id, string $a_target_type="")
get all persisted conditions of target object
+ 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 656 of file class.ilObjContentObject.php.

References $DIC, $ilDB, and $q.

Referenced by ilContentStyleSettingsGUI\edit().

656  : int
657  {
658  global $DIC;
659 
660  $ilDB = $DIC->database();
661 
662  // joining with style table (not perfectly nice)
663  $q = "SELECT count(*) as cnt FROM content_object, style_data " .
664  " WHERE stylesheet = style_data.id " .
665  " AND standard = " . $ilDB->quote(0, "integer");
666  $cset = $ilDB->query($q);
667  $crow = $ilDB->fetchAssoc($cset);
668 
669  return (int) $crow["cnt"];
670  }
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _getNrLMsNoStyle()

static ilObjContentObject::_getNrLMsNoStyle ( )
static

get number of learning modules assigned no style

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

References $DIC, $ilDB, and $q.

Referenced by ilContentStyleSettingsGUI\edit().

675  : int
676  {
677  global $DIC;
678 
679  $ilDB = $DIC->database();
680 
681  $q = "SELECT count(*) as cnt FROM content_object " .
682  " WHERE stylesheet = " . $ilDB->quote(0, "integer");
683  $cset = $ilDB->query($q);
684  $crow = $ilDB->fetchAssoc($cset);
685 
686  return (int) $crow["cnt"];
687  }
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _getNrOfAssignedLMs()

static ilObjContentObject::_getNrOfAssignedLMs ( int  $a_style_id)
static

gets the number of learning modules assigned to a content style

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

References $DIC, $ilDB, and $q.

Referenced by ilContentStyleSettingsGUI\edit().

638  : int
639  {
640  global $DIC;
641 
642  $ilDB = $DIC->database();
643 
644  $q = "SELECT count(*) as cnt FROM content_object " .
645  " WHERE stylesheet = " . $ilDB->quote($a_style_id, "integer");
646  $cset = $ilDB->query($q);
647  $crow = $ilDB->fetchAssoc($cset);
648 
649  return (int) ($crow["cnt"] ?? 0);
650  }
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _lookup()

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

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

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

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

◆ _lookupContObjIdByStyleId()

static ilObjContentObject::_lookupContObjIdByStyleId ( int  $a_style_id)
static

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

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

Referenced by ilObjStyleSheet\_getClonableContentStyles().

590  : array
591  {
592  global $DIC;
593 
594  $ilDB = $DIC->database();
595 
596  $q = "SELECT id FROM content_object " .
597  " WHERE stylesheet = " . $ilDB->quote($a_style_id, "integer");
598  $res = $ilDB->query($q);
599  $obj_ids = array();
600  while ($cont = $ilDB->fetchAssoc($res)) {
601  $obj_ids[] = (int) $cont["id"];
602  }
603  return $obj_ids;
604  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ 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 606 of file class.ilObjContentObject.php.

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

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

606  : bool
607  {
608  global $DIC;
609 
610  $ilDB = $DIC->database();
611 
612  $q = "SELECT disable_def_feedback FROM content_object " .
613  " WHERE id = " . $ilDB->quote($a_id, "integer");
614  $res = $ilDB->query($q);
615  $rec = $ilDB->fetchAssoc($res);
616 
617  return (bool) ($rec["disable_def_feedback"] ?? false);
618  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _lookupRestrictForwardNavigation()

static ilObjContentObject::_lookupRestrictForwardNavigation ( int  $a_obj_id)
static

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

Referenced by ilLMPageGUI\processAnswer().

572  : string {
573  return self::_lookup($a_obj_id, "restrict_forw_nav");
574  }
+ Here is the caller graph for this function:

◆ _lookupStoreTries()

static ilObjContentObject::_lookupStoreTries ( int  $a_id)
static

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

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

Referenced by ilLMPageGUI\__construct().

620  : bool
621  {
622  global $DIC;
623 
624  $ilDB = $DIC->database();
625 
626  $q = "SELECT store_tries FROM content_object " .
627  " WHERE id = " . $ilDB->quote($a_id, "integer");
628  $res = $ilDB->query($q);
629  $rec = $ilDB->fetchAssoc($res);
630 
631  return (bool) ($rec["store_tries"] ?? false);
632  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _lookupStyleSheetId()

static ilObjContentObject::_lookupStyleSheetId ( int  $a_cont_obj_id)
static

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

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

Referenced by ilPCParagraphGUI\setStyle().

576  : int
577  {
578  global $DIC;
579 
580  $ilDB = $DIC->database();
581 
582  $q = "SELECT stylesheet FROM content_object " .
583  " WHERE id = " . $ilDB->quote($a_cont_obj_id, "integer");
584  $res = $ilDB->query($q);
585  $sheet = $ilDB->fetchAssoc($res);
586 
587  return (int) $sheet["stylesheet"];
588  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ 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 520 of file class.ilObjContentObject.php.

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

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

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

References $c, $id, ilPCParagraph\autoLinkGlossariesPage(), ilPageObject\getAllPages(), ilObject\getId(), ilGlossaryTerm\getTermList(), ilObject\getType(), and null.

2038  : void {
2039  // get terms
2040  $terms = ilGlossaryTerm::getTermList([$a_glo_ref_id]);
2041 
2042  // each get page: get content
2043  $pages = ilLMPage::getAllPages($this->getType(), $this->getId());
2044 
2045  // determine terms that occur in the page
2046  $found_pages = array();
2047  foreach ($pages as $p) {
2048  $pg = new ilLMPage($p["id"]);
2049  $c = $pg->getXMLContent();
2050  foreach ($terms as $t) {
2051  if (is_int(stripos($c, $t["term"]))) {
2052  $found_pages[$p["id"]]["terms"][] = $t;
2053  if (!is_object($found_pages[$p["id"]]["page"] ?? null)) {
2054  $found_pages[$p["id"]]["page"] = $pg;
2055  }
2056  }
2057  }
2058  reset($terms);
2059  }
2060 
2061  // ilPCParagraph autoLinkGlossariesPage with page and terms
2062  foreach ($found_pages as $id => $fp) {
2063  ilPCParagraph::autoLinkGlossariesPage($fp["page"], $fp["terms"]);
2064  }
2065  }
static autoLinkGlossariesPage(ilPageObject $a_page, array $a_terms)
Auto link glossary of whole page.
$c
Definition: deliver.php:25
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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getAllPages(string $a_parent_type, int $a_parent_id, string $a_lang="-")
Get all pages for parent object.
+ Here is the call graph for this function:

◆ checkStructure()

ilObjContentObject::checkStructure ( )

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

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

References ilObject\$db, $ilDB, $q, ilObject\$tree, ilPageObject\_exists(), ilObject\getId(), getLMTree(), ilTree\getNodeData(), ilTree\getRootId(), ilTree\getSubTree(), and ilTree\isInTree().

1249  : array
1250  {
1251  $issues = [];
1252  $ilDB = $this->db;
1253 
1254  $tree = $this->getLMTree();
1255 
1256  // check numbering, if errors, renumber
1257  // it is very important to keep this step before deleting subtrees
1258  // in the following steps
1259  $set = $ilDB->query(
1260  "SELECT l1.child, l1.lft l1lft, l1.rgt l1rgt, l2.parent, l2.lft l2lft, l2.rgt l2rgt" .
1261  " FROM lm_tree l1" .
1262  " JOIN lm_tree l2 ON ( l1.child = l2.parent" .
1263  " AND l1.lm_id = l2.lm_id )" .
1264  " JOIN lm_data ON ( l1.child = lm_data.obj_id )" .
1265  " WHERE (l2.lft < l1.lft" .
1266  " OR l2.rgt > l1.rgt OR l2.lft > l1.rgt OR l2.rgt < l1.lft)" .
1267  " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer") .
1268  " ORDER BY lm_data.create_date DESC"
1269  );
1270  while ($rec = $ilDB->fetchAssoc($set)) {
1271  $issues[] = "Tree numbering: " . print_r($rec, true);
1272  }
1273 
1274  // delete subtrees that have no lm_data records (changed due to #20637)
1275  $set = $ilDB->query("SELECT * FROM lm_tree WHERE lm_tree.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1276  while ($node = $ilDB->fetchAssoc($set)) {
1277  $q = "SELECT * FROM lm_data WHERE obj_id = " .
1278  $ilDB->quote($node["child"], "integer");
1279  $obj_set = $ilDB->query($q);
1280  $obj_rec = $ilDB->fetchAssoc($obj_set);
1281  if (!$obj_rec) {
1282  $issues[] = "Tree entry without data entry: " . print_r($node, true);
1283  }
1284  }
1285 
1286  // delete subtrees that have pages as parent
1287  $nodes = $tree->getSubTree($tree->getNodeData($tree->getRootId()));
1288  foreach ($nodes as $node) {
1289  $q = "SELECT * FROM lm_data WHERE obj_id = " .
1290  $ilDB->quote($node["parent"], "integer");
1291  $obj_set = $ilDB->query($q);
1292  $obj_rec = $ilDB->fetchAssoc($obj_set);
1293  if (($obj_rec["type"] ?? "") == "pg") {
1294  $node_data = $tree->getNodeData($node["child"]);
1295  if ($tree->isInTree($node["child"])) {
1296  $issues[] = "Subtree with page parent: " . print_r($node_data, true);
1297  }
1298  }
1299  }
1300 
1301  // check for multi-references pages or chapters
1302  // if errors -> create copies of them here
1303  $set = $ilDB->query("SELECT DISTINCT l1.lm_id" .
1304  " FROM lm_tree l1" .
1305  " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1306  " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1307  " WHERE l1.child <> 1" .
1308  " AND l1.lm_id <> lm_data.lm_id" .
1309  " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1310  if ($rec = $ilDB->fetchAssoc($set)) {
1311  $set = $ilDB->query("SELECT DISTINCT l1.child " .
1312  " FROM lm_tree l1" .
1313  " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1314  " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1315  " WHERE l1.child <> 1" .
1316  " AND l1.lm_id <> lm_data.lm_id" .
1317  " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1318  while ($rec = $ilDB->fetchAssoc($set)) {
1319  $set3 = $ilDB->queryF(
1320  "SELECT * FROM lm_tree " .
1321  " WHERE child = %s ",
1322  array("integer"),
1323  array($rec["child"])
1324  );
1325  while ($rec3 = $ilDB->fetchAssoc($set3)) {
1326  $issues[] = "Multi-reference item: " . print_r($rec3, true);
1327  }
1328  }
1329  }
1330 
1331  // missing copage entries
1332  $set = $ilDB->queryF(
1333  "SELECT * FROM lm_data " .
1334  " WHERE lm_id = %s AND type = %s",
1335  array("integer", "text"),
1336  array($this->getId(), "pg")
1337  );
1338  while ($rec = $ilDB->fetchAssoc($set)) {
1339  if (!ilPageObject::_exists("lm", $rec["obj_id"], "-")) {
1340  $issues[] = "Missing COPage: " . print_r($rec, true);
1341  }
1342  }
1343 
1344 
1345  return $issues;
1346  }
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
ilTree $tree
isInTree(?int $a_node_id)
get all information of a node.
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
ilDBInterface $db
$q
Definition: shib_logout.php:21
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
+ Here is the call graph for this function:

◆ checkTree()

ilObjContentObject::checkTree ( )
Exceptions
ilInvalidTreeStructureException

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

References ilObject\$tree, ilTree\checkTree(), ilTree\checkTreeChilds(), and ilObject\getId().

Referenced by copyAllPagesAndChapters(), and executeDragDrop().

1113  : void
1114  {
1115  $tree = new ilLMTree($this->getId());
1116  $tree->checkTree();
1118  }
checkTreeChilds(bool $a_no_zero_child=true)
check, if all childs of tree nodes exist in object table
ilTree $tree
checkTree()
check consistence of tree all left & right values are checked if they are exists only once ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanFrames()

ilObjContentObject::cleanFrames ( )

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

References $clean_frames.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

839  : bool
840  {
841  return $this->clean_frames;
842  }
+ Here is the caller graph for this function:

◆ copyAllPagesAndChapters()

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

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

References ilCopyWizardOptions\_getInstance(), checkTree(), ilObject\getId(), ilLMPageObject\getPageList(), ilObject\getRefId(), null, ilTree\POS_LAST_NODE, and ilLMObject\updateInternalLinks().

Referenced by validatePages().

1969  : array {
1970  $parent_id = $a_target_obj->lm_tree->readRootId();
1971  $time = null;
1972 
1973  // get all chapters of root lm
1974  $chapters = $this->lm_tree->getChildsByType($this->lm_tree->readRootId(), "st");
1975  $copied_nodes = array();
1976  //$time = time();
1977  foreach ($chapters as $chap) {
1978  $cid = ilLMObject::pasteTree(
1979  $a_target_obj,
1980  $chap["child"],
1981  $parent_id,
1983  (string) $time,
1984  $copied_nodes,
1985  true,
1986  $this->lm
1987  );
1988  $target = $cid;
1989  }
1990 
1991  // copy free pages
1992  $pages = ilLMPageObject::getPageList($this->getId());
1993  foreach ($pages as $p) {
1994  if (!$this->lm_tree->isInTree($p["obj_id"])) {
1995  $item = new ilLMPageObject($this->lm, $p["obj_id"]);
1996  $target_item = $item->copy($a_target_obj);
1997  $copied_nodes[$item->getId()] = $target_item->getId();
1998  }
1999  }
2000 
2001  // Add mapping for pages and chapters
2002  $options = ilCopyWizardOptions::_getInstance($a_copy_id);
2003  foreach ($copied_nodes as $old_id => $new_id) {
2004  $options->appendMapping(
2005  $this->getRefId() . '_' . $old_id,
2006  $a_target_obj->getRefId() . '_' . $new_id
2007  );
2008  }
2009 
2010  ilLMObject::updateInternalLinks($copied_nodes);
2011 
2012  $a_target_obj->checkTree();
2013 
2014  return $copied_nodes;
2015  }
static updateInternalLinks(array $a_copied_nodes, string $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const POS_LAST_NODE
static getPageList(int $lm_id)
static _getInstance(int $a_copy_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilObjContentObject::create ( bool  $a_no_meta_data = false)

create content object

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

References $id, ilObject\createMetaData(), createProperties(), and updateAutoGlossaries().

107  : int {
108  $id = parent::create();
109 
110  // meta data will be created by
111  // import parser
112  if (!$a_no_meta_data) {
113  $this->createMetaData();
114  }
115 
116  $this->createProperties();
117  $this->updateAutoGlossaries();
118  return $id;
119  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
createProperties()
create new properties record
+ 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 379 of file class.ilObjContentObject.php.

References ilObject\$error, $ilErr, ilFileUtils\getDataDir(), ilObject\getId(), ilFileUtils\makeDir(), and ilFileUtils\makeDirParents().

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

◆ 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 323 of file class.ilObjContentObject.php.

References ilObject\$error, $ilErr, ilFileUtils\getDataDir(), ilObject\getId(), and ilFileUtils\makeDir().

323  : void
324  {
326 
327  $lm_data_dir = ilFileUtils::getDataDir() . "/lm_data";
328  if (!is_writable($lm_data_dir)) {
329  $ilErr->raiseError("Content object Data Directory (" . $lm_data_dir
330  . ") not writeable.", $ilErr->FATAL);
331  }
332 
333  // create learning module directory (data_dir/lm_data/lm_<id>)
334  $lm_dir = $lm_data_dir . "/lm_" . $this->getId();
335  ilFileUtils::makeDir($lm_dir);
336  if (!is_dir($lm_dir)) {
337  $ilErr->raiseError("Creation of Learning Module Directory failed.", $ilErr->FATAL);
338  }
339 
340  // create import subdirectory (data_dir/lm_data/lm_<id>/import)
341  $import_dir = $lm_dir . "/import";
343  if (!is_dir($import_dir)) {
344  $ilErr->raiseError("Creation of Import Directory failed.", $ilErr->FATAL);
345  }
346  }
$ilErr
Definition: raiseError.php:33
static getDataDir()
get data directory (outside webspace)
ilErrorHandling $error
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
+ Here is the call graph for this function:

◆ createLMTree()

ilObjContentObject::createLMTree ( )

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

References ilObject\getId().

237  : void
238  {
239  $this->lm_tree = new ilLMTree($this->getId(), false);
240  $this->lm_tree->addTree($this->getId(), 1);
241  }
+ Here is the call graph for this function:

◆ createProperties()

ilObjContentObject::createProperties ( )

create new properties record

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

References ilObject\$db, $ilDB, ilObject\getId(), ilDBInterface\insert(), ilLMObject\PAGE_TITLE, and readProperties().

Referenced by create().

945  : void
946  {
947  $ilDB = $this->db;
948 
949  $this->db->insert("content_object", [
950  "id" => ["integer", $this->getId()],
951  "page_header" => ["text", ilLMObject::PAGE_TITLE]
952  ]);
953 
954  // #14661
955  $this->notes->domain()->activateComments($this->getId());
956 
957  $this->readProperties(); // to get db default values
958  }
insert(string $table_name, array $values)
ilDBInterface $db
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doMDUpdateListener()

ilObjContentObject::doMDUpdateListener ( string  $a_element)
protected

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

References ilLPStatusWrapper\_refreshStatus(), ilObject\getId(), ilObjectLP\getInstance(), ilObjectTranslation\getInstance(), ilObject\getType(), ilLPObjSettings\LP_MODE_COLLECTION_TLT, and ilLPObjSettings\LP_MODE_TLT.

2112  : void {
2113  switch ($a_element) {
2114  case 'Educational':
2115  $obj_lp = ilObjectLP::getInstance($this->getId());
2116  if (in_array(
2117  $obj_lp->getCurrentMode(),
2119  )) {
2121  }
2122  break;
2123 
2124  case 'General':
2125  // Update Title and description
2126  $ot = ilObjectTranslation::getInstance($this->getId());
2127  if (!$ot->getContentActivated()) {
2128  return;
2129  }
2130 
2131  $paths = $this->lom_services->paths();
2132  $reader = $this->lom_services->read(
2133  $this->getId(),
2134  0,
2135  $this->getType(),
2136  $paths->custom()->withNextStep('general')->get()
2137  );
2138 
2139  $ot->setDefaultTitle($reader->firstData($paths->title())->value());
2140  $ot->setDefaultDescription($reader->firstData($paths->firstDescription())->value());
2141  break;
2142  }
2143  }
static getInstance(int $obj_id)
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
static getInstance(int $obj_id)
+ 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 1709 of file class.ilObjContentObject.php.

References checkTree(), ilObject\getId(), ilLMObjectFactory\getInstance(), and ilTree\POS_FIRST_NODE.

1715  : void {
1716  if ($source_id === $target_id) {
1717  return;
1718  }
1719  $lmtree = new ilTree($this->getId());
1720  $lmtree->setTableNames('lm_tree', 'lm_data');
1721  $lmtree->setTreeTablePK("lm_id");
1722  //echo "-".$source_id."-".$target_id."-".$first_child."-".$as_subitem."-";
1723  $source_obj = ilLMObjectFactory::getInstance($this->lm, $source_id, true);
1724  $source_obj->setLMId($this->getId());
1725 
1726  if (!$first_child) {
1727  $target_obj = ilLMObjectFactory::getInstance($this->lm, $target_id, true);
1728  $target_obj->setLMId($this->getId());
1729  $target_parent = $lmtree->getParentId($target_id);
1730  }
1731 
1732  // handle pages
1733  if ($source_obj->getType() == "pg") {
1734  //echo "1";
1735  if ($lmtree->isInTree($source_obj->getId())) {
1736  $node_data = $lmtree->getNodeData($source_obj->getId());
1737 
1738  // cut on move
1739  if ($movecopy == "move") {
1740  $parent_id = $lmtree->getParentId($source_obj->getId());
1741  $lmtree->deleteTree($node_data);
1742 
1743  } else {
1744  // copy page
1745  $new_page = $source_obj->copy($this->lm);
1746  $source_id = $new_page->getId();
1747  $source_obj = $new_page;
1748  }
1749 
1750  // paste page
1751  if (!$lmtree->isInTree($source_obj->getId())) {
1752  if ($first_child) { // as first child
1753  $target_pos = ilTree::POS_FIRST_NODE;
1754  $parent = $target_id;
1755  } elseif ($as_subitem) { // as last child
1756  $parent = $target_id;
1757  $target_pos = ilTree::POS_FIRST_NODE;
1758  $pg_childs = $lmtree->getChildsByType($parent, "pg");
1759  if (count($pg_childs) != 0) {
1760  $target_pos = $pg_childs[count($pg_childs) - 1]["obj_id"];
1761  }
1762  } else { // at position
1763  $target_pos = $target_id;
1764  $parent = $target_parent;
1765  }
1766 
1767  // insert page into tree
1768  $lmtree->insertNode(
1769  $source_obj->getId(),
1770  $parent,
1771  $target_pos
1772  );
1773 
1774  }
1775  }
1776  }
1777 
1778  // handle chapters
1779  if ($source_obj->getType() == "st") {
1780  //echo "2";
1781  $source_node = $lmtree->getNodeData($source_id);
1782  $subnodes = $lmtree->getSubTree($source_node);
1783 
1784  // check, if target is within subtree
1785  foreach ($subnodes as $subnode) {
1786  if ($subnode["obj_id"] == $target_id) {
1787  return;
1788  }
1789  }
1790 
1791  $target_pos = $target_id;
1792 
1793  if ($first_child) { // as first subchapter
1794  $target_pos = ilTree::POS_FIRST_NODE;
1795  $target_parent = $target_id;
1796 
1797  $pg_childs = $lmtree->getChildsByType($target_parent, "pg");
1798  if (count($pg_childs) != 0) {
1799  $target_pos = $pg_childs[count($pg_childs) - 1]["obj_id"];
1800  }
1801  } elseif ($as_subitem) { // as last subchapter
1802  $target_parent = $target_id;
1803  $target_pos = ilTree::POS_FIRST_NODE;
1804  $childs = $lmtree->getChilds($target_parent);
1805  if (count($childs) != 0) {
1806  $target_pos = $childs[count($childs) - 1]["obj_id"];
1807  }
1808  }
1809 
1810  // delete source tree
1811  if ($movecopy == "move") {
1812  $lmtree->deleteTree($source_node);
1813  } else {
1814  // copy chapter (incl. subcontents)
1815  throw new ilException("ilObjContentObject: Not implemented");
1816  //$new_chapter = $source_obj->copy($lmtree, $target_parent, $target_pos);
1817  }
1818 
1819  if (!$lmtree->isInTree($source_id)) {
1820  $lmtree->insertNode($source_id, $target_parent, $target_pos);
1821 
1822  // insert moved tree
1823  foreach ($subnodes as $node) {
1824  if ($node["obj_id"] != $source_id) {
1825  $lmtree->insertNode($node["obj_id"], $node["parent"]);
1826  }
1827  }
1828  }
1829 
1830  // check the tree
1831  $this->checkTree();
1832  }
1833 
1834  $this->checkTree();
1835  }
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
const POS_FIRST_NODE
+ Here is the call graph for this function:

◆ exportFileItems()

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

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

References ilLog\write().

Referenced by exportXML().

1511  : void {
1512  foreach ($this->file_ids as $file_id) {
1513  $expLog->write(date("[y-m-d H:i:s] ") . "File Item " . $file_id);
1514  $file_obj = new ilObjFile($file_id, false);
1515  $file_obj->export($a_target_dir);
1516  unset($file_obj);
1517  }
1518  }
Class ilObjFile.
write(string $a_msg, $a_log_level=null)
logging
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportXML()

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

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

References exportFileItems(), exportXMLMediaObjects(), exportXMLMetaData(), exportXMLPageObjects(), exportXMLProperties(), exportXMLStructureObjects(), ilObject\getType(), ilLog\write(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

1353  : void {
1354  $attrs = array();
1355  switch ($this->getType()) {
1356  case "lm":
1357  $attrs["Type"] = "LearningModule";
1358  break;
1359  }
1360  $a_xml_writer->xmlStartTag("ContentObject", $attrs);
1361 
1362  // MetaData
1363  $this->exportXMLMetaData($a_xml_writer);
1364 
1365  // StructureObjects
1366  //echo "ContObj:".$a_inst.":<br>";
1367  $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Structure Objects");
1368  $this->exportXMLStructureObjects($a_xml_writer, $a_inst, $expLog);
1369  $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Structure Objects");
1370 
1371  // PageObjects
1372  $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Page Objects");
1373  $this->exportXMLPageObjects($a_xml_writer, $a_inst, $expLog);
1374  $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Page Objects");
1375 
1376  // MediaObjects
1377  $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Media Objects");
1378  $this->exportXMLMediaObjects($a_xml_writer, $a_inst, $a_target_dir, $expLog);
1379  $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Media Objects");
1380 
1381  // FileItems
1382  $expLog->write(date("[y-m-d H:i:s] ") . "Start Export File Items");
1383  $this->exportFileItems($a_target_dir, $expLog);
1384  $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export File Items");
1385 
1386  // Questions
1387  if (count($this->q_ids) > 0) {
1388  $qti_file = fopen($a_target_dir . "/qti.xml", "w");
1389  $pool = new ilObjQuestionPool();
1390  fwrite($qti_file, $pool->questionsToXML($this->q_ids));
1391  fclose($qti_file);
1392  }
1393 
1394  // To do: implement version selection/detection
1395  // Properties
1396  $expLog->write(date("[y-m-d H:i:s] ") . "Start Export Properties");
1397  $this->exportXMLProperties($a_xml_writer, $expLog);
1398  $expLog->write(date("[y-m-d H:i:s] ") . "Finished Export Properties");
1399 
1400  $a_xml_writer->xmlEndTag("ContentObject");
1401  }
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.
exportFileItems(string $a_target_dir, ilLog $expLog)
exportXMLStructureObjects(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
write(string $a_msg, $a_log_level=null)
logging
exportXMLProperties(ilXmlWriter $a_xml_writer, ilLog $expLog)
exportXMLPageObjects(ilXmlWriter $a_xml_writer, int $a_inst, ilLog $expLog)
+ Here is the call graph for this function:

◆ exportXMLMediaObjects()

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

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

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

Referenced by exportXML().

1478  : void {
1479  $linked_mobs = array();
1480 
1481  // mobs directly embedded into pages
1482  foreach ($this->mob_ids as $mob_id) {
1483  if ($mob_id > 0 && ilObject::_lookupType($mob_id) == "mob") {
1484  $expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
1485  $media_obj = new ilObjMediaObject($mob_id);
1486  $media_obj->exportXML($a_xml_writer, $a_inst);
1487  $media_obj->exportFiles($a_target_dir);
1488 
1489  $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
1490  $linked_mobs = array_merge($linked_mobs, $lmobs);
1491 
1492  unset($media_obj);
1493  }
1494  }
1495 
1496  // linked mobs (in map areas)
1497  foreach ($linked_mobs as $mob_id) {
1498  if ($mob_id > 0) {
1499  $expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
1500  $media_obj = new ilObjMediaObject($mob_id);
1501  $media_obj->exportXML($a_xml_writer, $a_inst);
1502  $media_obj->exportFiles($a_target_dir);
1503  unset($media_obj);
1504  }
1505  }
1506  }
write(string $a_msg, $a_log_level=null)
logging
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportXMLMetaData()

ilObjContentObject::exportXMLMetaData ( ilXmlWriter  $a_xml_writer)

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

Referenced by exportXML().

1405  : void {
1406  /*
1407  * As far as I can tell, this is unused.
1408  *
1409  * I traced usages of this method up to ilObjContentObjectGUI::export and
1410  * ilObjMediaPoolGUI::export (both via ilObjContentObject::exportXML), which have
1411  * both been made redundant by the usual export mechanisms.
1412  */
1413  /*$md2xml = new ilMD2XML($this->getId(), 0, $this->getType());
1414  $md2xml->setExportMode(true);
1415  $md2xml->startExport();
1416  $a_xml_writer->appendXML($md2xml->getXML());*/
1417  }
+ Here is the caller graph for this function:

◆ exportXMLPageObjects()

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

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

References ilPageObject\_exists(), ilObject\getId(), ilLMPageObject\getPageList(), ilObject\getType(), and ilLog\write().

Referenced by exportXML().

1440  : void {
1441  $pages = ilLMPageObject::getPageList($this->getId());
1442  foreach ($pages as $page) {
1443  if (ilLMPage::_exists($this->getType(), $page["obj_id"])) {
1444  $expLog->write(date("[y-m-d H:i:s] ") . "Page Object " . $page["obj_id"]);
1445 
1446  // export xml to writer object
1447  $page_obj = new ilLMPageObject($this->lm, $page["obj_id"]);
1448  $page_obj->exportXML($a_xml_writer, "normal", $a_inst);
1449 
1450  // collect media objects
1451  $mob_ids = $page_obj->getMediaObjectIds();
1452  foreach ($mob_ids as $mob_id) {
1453  $this->mob_ids[$mob_id] = $mob_id;
1454  }
1455 
1456  // collect all file items
1457  $file_ids = $page_obj->getFileItemIds();
1458  foreach ($file_ids as $file_id) {
1459  $this->file_ids[$file_id] = $file_id;
1460  }
1461 
1462  // collect all questions
1463  $q_ids = $page_obj->getQuestionIds();
1464  foreach ($q_ids as $q_id) {
1465  $this->q_ids[$q_id] = $q_id;
1466  }
1467 
1468  unset($page_obj);
1469  }
1470  }
1471  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
static getPageList(int $lm_id)
write(string $a_msg, $a_log_level=null)
logging
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportXMLProperties()

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

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

References cleanFrames(), getDisableDefaultFeedback(), getFooterPage(), getHeaderPage(), getLayout(), getLayoutPerPage(), getPageHeader(), getProgressIcons(), getRestrictForwardNavigation(), getStoreTries(), getTOCMode(), hasRating(), hasRatingPages(), IL_INST_ID, isActiveLMMenu(), isActiveNumbering(), isActivePrintView(), isActiveTOC(), publicNotes(), ilUtil\tf2yn(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by exportXML().

1523  : void {
1524  $attrs = array();
1525  $a_xml_writer->xmlStartTag("Properties", $attrs);
1526 
1527  // Layout
1528  $attrs = array("Name" => "Layout", "Value" => $this->getLayout());
1529  $a_xml_writer->xmlElement("Property", $attrs);
1530 
1531  // Page Header
1532  $attrs = array("Name" => "PageHeader", "Value" => $this->getPageHeader());
1533  $a_xml_writer->xmlElement("Property", $attrs);
1534 
1535  // TOC Mode
1536  $attrs = array("Name" => "TOCMode", "Value" => $this->getTOCMode());
1537  $a_xml_writer->xmlElement("Property", $attrs);
1538 
1539  // LM Menu Activation
1540  $attrs = array("Name" => "ActiveLMMenu", "Value" =>
1541  ilUtil::tf2yn($this->isActiveLMMenu()));
1542  $a_xml_writer->xmlElement("Property", $attrs);
1543 
1544  // Numbering Activation
1545  $attrs = array("Name" => "ActiveNumbering", "Value" =>
1546  ilUtil::tf2yn($this->isActiveNumbering()));
1547  $a_xml_writer->xmlElement("Property", $attrs);
1548 
1549  // Table of contents button activation
1550  $attrs = array("Name" => "ActiveTOC", "Value" =>
1551  ilUtil::tf2yn($this->isActiveTOC()));
1552  $a_xml_writer->xmlElement("Property", $attrs);
1553 
1554  // Print view button activation
1555  $attrs = array("Name" => "ActivePrintView", "Value" =>
1556  ilUtil::tf2yn($this->isActivePrintView()));
1557  $a_xml_writer->xmlElement("Property", $attrs);
1558 
1559  // Note that download button is not saved, because
1560  // download files do not exist after import
1561 
1562  // Clean frames
1563  $attrs = array("Name" => "CleanFrames", "Value" =>
1564  ilUtil::tf2yn($this->cleanFrames()));
1565  $a_xml_writer->xmlElement("Property", $attrs);
1566 
1567  // Public notes activation
1568  $attrs = array("Name" => "PublicNotes", "Value" =>
1569  ilUtil::tf2yn($this->publicNotes()));
1570  $a_xml_writer->xmlElement("Property", $attrs);
1571 
1572  // Rating
1573  $attrs = array("Name" => "Rating", "Value" =>
1574  ilUtil::tf2yn($this->hasRating()));
1575  $a_xml_writer->xmlElement("Property", $attrs);
1576  $attrs = array("Name" => "RatingPages", "Value" =>
1577  ilUtil::tf2yn($this->hasRatingPages()));
1578  $a_xml_writer->xmlElement("Property", $attrs);
1579 
1580  // Header Page
1581  if ($this->getHeaderPage() > 0) {
1582  $attrs = array("Name" => "HeaderPage", "Value" =>
1583  "il_" . IL_INST_ID . "_pg_" . $this->getHeaderPage());
1584  $a_xml_writer->xmlElement("Property", $attrs);
1585  }
1586 
1587  // Footer Page
1588  if ($this->getFooterPage() > 0) {
1589  $attrs = array("Name" => "FooterPage", "Value" =>
1590  "il_" . IL_INST_ID . "_pg_" . $this->getFooterPage());
1591  $a_xml_writer->xmlElement("Property", $attrs);
1592  }
1593 
1594  // layout per page
1595  $attrs = array("Name" => "LayoutPerPage", "Value" =>
1596  $this->getLayoutPerPage());
1597  $a_xml_writer->xmlElement("Property", $attrs);
1598 
1599  // progress icons
1600  $attrs = array("Name" => "ProgressIcons", "Value" =>
1601  $this->getProgressIcons());
1602  $a_xml_writer->xmlElement("Property", $attrs);
1603 
1604  // store tries
1605  $attrs = array("Name" => "StoreTries", "Value" =>
1606  $this->getStoreTries());
1607  $a_xml_writer->xmlElement("Property", $attrs);
1608 
1609  // restrict forward navigation
1610  $attrs = array("Name" => "RestrictForwardNavigation", "Value" =>
1611  $this->getRestrictForwardNavigation());
1612  $a_xml_writer->xmlElement("Property", $attrs);
1613 
1614  // disable default feedback
1615  $attrs = array("Name" => "DisableDefaultFeedback", "Value" =>
1616  $this->getDisableDefaultFeedback());
1617  $a_xml_writer->xmlElement("Property", $attrs);
1618 
1619  $a_xml_writer->xmlEndTag("Properties");
1620  }
const IL_INST_ID
Definition: constants.php:40
static tf2yn(bool $a_tf)
xmlEndTag(string $tag)
Writes an endtag.
getPageHeader()
get page header mode (ilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER) ...
getTOCMode()
get toc mode ("chapters" | "pages")
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportXMLStructureObjects()

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

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

Referenced by exportXML().

1423  : void {
1424  $childs = $this->lm_tree->getChilds($this->lm_tree->getRootId());
1425  foreach ($childs as $child) {
1426  if ($child["type"] != "st") {
1427  continue;
1428  }
1429 
1430  $structure_obj = new ilStructureObject($this->lm, $child["obj_id"]);
1431  $structure_obj->exportXML($a_xml_writer, $a_inst, $expLog);
1432  unset($structure_obj);
1433  }
1434  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ fixTree()

ilObjContentObject::fixTree ( )

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

References ilObject\$db, $ilDB, $q, ilObject\$tree, ilPageObject\_exists(), ilTree\deleteTree(), ilObject\getId(), ilLMObjectFactory\getInstance(), getLMTree(), ilTree\getNodeData(), ilTree\getRootId(), ilTree\getSubTree(), ilTree\isInTree(), and ilTree\renumber().

1120  : void
1121  {
1122  $ilDB = $this->db;
1123 
1124  $tree = $this->getLMTree();
1125 
1126  // check numbering, if errors, renumber
1127  // it is very important to keep this step before deleting subtrees
1128  // in the following steps
1129  $set = $ilDB->query(
1130  "SELECT DISTINCT l1.lm_id" .
1131  " FROM lm_tree l1" .
1132  " JOIN lm_tree l2 ON ( l1.child = l2.parent" .
1133  " AND l1.lm_id = l2.lm_id )" .
1134  " JOIN lm_data ON ( l1.child = lm_data.obj_id )" .
1135  " WHERE (l2.lft < l1.lft" .
1136  " OR l2.rgt > l1.rgt OR l2.lft > l1.rgt OR l2.rgt < l1.lft)" .
1137  " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer") .
1138  " ORDER BY lm_data.create_date DESC"
1139  );
1140  if ($rec = $ilDB->fetchAssoc($set)) {
1141  $tree->renumber();
1142  }
1143 
1144  // delete subtrees that have no lm_data records (changed due to #20637)
1145  $set = $ilDB->query("SELECT * FROM lm_tree WHERE lm_tree.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1146  while ($node = $ilDB->fetchAssoc($set)) {
1147  $q = "SELECT * FROM lm_data WHERE obj_id = " .
1148  $ilDB->quote($node["child"], "integer");
1149  $obj_set = $ilDB->query($q);
1150  $obj_rec = $ilDB->fetchAssoc($obj_set);
1151  if (!$obj_rec) {
1152  $node_data = $tree->getNodeData($node["child"]);
1153  $node_data["child"] = $node["child"];
1154  $tree->deleteTree($node_data);
1155  }
1156  }
1157 
1158  // delete subtrees that have pages as parent
1159  $nodes = $tree->getSubTree($tree->getNodeData($tree->getRootId()));
1160  foreach ($nodes as $node) {
1161  $q = "SELECT * FROM lm_data WHERE obj_id = " .
1162  $ilDB->quote($node["parent"], "integer");
1163  $obj_set = $ilDB->query($q);
1164  $obj_rec = $ilDB->fetchAssoc($obj_set);
1165  if (($obj_rec["type"] ?? "") == "pg") {
1166  $node_data = $tree->getNodeData($node["child"]);
1167  if ($tree->isInTree($node["child"])) {
1168  $tree->deleteTree($node_data);
1169  }
1170  }
1171  }
1172 
1173  // check for multi-references pages or chapters
1174  // if errors -> create copies of them here
1175  $set = $ilDB->query("SELECT DISTINCT l1.lm_id" .
1176  " FROM lm_tree l1" .
1177  " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1178  " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1179  " WHERE l1.child <> 1" .
1180  " AND l1.lm_id <> lm_data.lm_id" .
1181  " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1182  if ($rec = $ilDB->fetchAssoc($set)) {
1183  $set = $ilDB->query("SELECT DISTINCT l1.child " .
1184  " FROM lm_tree l1" .
1185  " JOIN lm_tree l2 ON ( l1.child = l2.child AND l1.lm_id <> l2.lm_id )" .
1186  " JOIN lm_data ON (l1.child = lm_data.obj_id)" .
1187  " WHERE l1.child <> 1" .
1188  " AND l1.lm_id <> lm_data.lm_id" .
1189  " AND l1.lm_id = " . $ilDB->quote($this->getId(), "integer"));
1190  while ($rec = $ilDB->fetchAssoc($set)) {
1191  $cobj = ilLMObjectFactory::getInstance($this->lm, $rec["child"]);
1192 
1193  if (is_object($cobj)) {
1194  if ($cobj->getType() == "pg") {
1195  // make a copy of it
1196  $pg_copy = $cobj->copy($this->lm);
1197 
1198  // replace the child in the tree with the copy (id)
1199  $ilDB->manipulate(
1200  "UPDATE lm_tree SET " .
1201  " child = " . $ilDB->quote($pg_copy->getId(), "integer") .
1202  " WHERE child = " . $ilDB->quote($cobj->getId(), "integer") .
1203  " AND lm_id = " . $ilDB->quote($this->getId(), "integer")
1204  );
1205  } elseif ($cobj->getType() == "st") {
1206  // make a copy of it
1207  $st_copy = $cobj->copy($this->lm);
1208 
1209  // replace the child in the tree with the copy (id)
1210  $ilDB->manipulate(
1211  "UPDATE lm_tree SET " .
1212  " child = " . $ilDB->quote($st_copy->getId(), "integer") .
1213  " WHERE child = " . $ilDB->quote($cobj->getId(), "integer") .
1214  " AND lm_id = " . $ilDB->quote($this->getId(), "integer")
1215  );
1216 
1217  // make all childs refer to the copy now
1218  $ilDB->manipulate(
1219  "UPDATE lm_tree SET " .
1220  " parent = " . $ilDB->quote($st_copy->getId(), "integer") .
1221  " WHERE parent = " . $ilDB->quote($cobj->getId(), "integer") .
1222  " AND lm_id = " . $ilDB->quote($this->getId(), "integer")
1223  );
1224  }
1225  }
1226  }
1227  }
1228 
1229  // missing copage entries
1230  $set = $ilDB->queryF(
1231  "SELECT * FROM lm_data " .
1232  " WHERE lm_id = %s AND type = %s",
1233  array("integer", "text"),
1234  array($this->getId(), "pg")
1235  );
1236  while ($rec = $ilDB->fetchAssoc($set)) {
1237  if (!ilPageObject::_exists("lm", $rec["obj_id"], "-")) {
1238  $lm_page = new ilLMPage();
1239  $lm_page->setId($rec["obj_id"]);
1240  $lm_page->setParentId($this->getId());
1241  $lm_page->create(false);
1242  }
1243  }
1244  }
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
ilTree $tree
isInTree(?int $a_node_id)
get all information of a node.
deleteTree(array $a_node)
delete node and the whole subtree under this node
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
ilDBInterface $db
renumber(int $node_id=1, int $i=1)
Wrapper for renumber.
$q
Definition: shib_logout.php:21
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getAutoGlossaries()

ilObjContentObject::getAutoGlossaries ( )

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

References $auto_glossaries.

Referenced by ilLMGlossaryTableGUI\__construct(), removeAutoGlossary(), updateAutoGlossaries(), and validatePages().

257  : array
258  {
259  return $this->auto_glossaries;
260  }
+ Here is the caller graph for this function:

◆ getAvailableLayouts()

static ilObjContentObject::getAvailableLayouts ( )
static

get all available lm layouts

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

Referenced by ilObjContentObjectGUI\getLayoutOption(), and ilLMPageObjectGUI\initEditLayoutForm().

964  : array
965  {
966  $dir = opendir("./components/ILIAS/LearningModule/layouts/lm");
967 
968  $layouts = array();
969 
970  while ($file = readdir($dir)) {
971  if ($file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
972  // directories
973  if (is_dir("./components/ILIAS/LearningModule/layouts/lm/" . $file)) {
974  $layouts[$file] = $file;
975  }
976  }
977  }
978  asort($layouts);
979 
980  // workaround: fix ordering
981  $ret = array(
982  'toc2win' => 'toc2win',
983  'toc2windyn' => 'toc2windyn',
984  '1window' => '1window',
985  '2window' => '2window',
986  '3window' => '3window',
987  'presentation' => 'presentation',
988  'fullscreen' => 'fullscreen'
989  );
990 
991  foreach ($layouts as $l) {
992  if (!in_array($l, $ret)) {
993  $ret[$l] = $l;
994  }
995  }
996 
997  return $ret;
998  }
+ Here is the caller graph for this function:

◆ getDataDirectory()

ilObjContentObject::getDataDirectory ( )

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

References ilFileUtils\getDataDir(), and ilObject\getId().

Referenced by getExportDirectory().

348  : string
349  {
350  return ilFileUtils::getDataDir() . "/lm_data" .
351  "/lm_" . $this->getId();
352  }
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDisableDefaultFeedback()

ilObjContentObject::getDisableDefaultFeedback ( )

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

References $disable_def_feedback.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

161  : bool
162  {
164  }
+ Here is the caller graph for this function:

◆ getExportDirectory()

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

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

References ilObject\$db, $ilDB, $q, ilLMObject\_deleteAllObjectData(), ilFileUtils\delDir(), ilObject\deleteMetaData(), ilFileUtils\getDataDir(), getDataDirectory(), and ilObject\getId().

Referenced by getExportFiles(), and getPublicExportFiles().

410  : string {
411  switch ($a_type) {
412  default: // = xml
413  if (substr($a_type, 0, 4) == "html") {
414  $export_dir = ilFileUtils::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export_" . $a_type;
415  } else {
416  $export_dir = ilFileUtils::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export";
417  }
418  break;
419  }
420  return $export_dir;
421  }
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExportFiles()

ilObjContentObject::getExportFiles ( )

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

References ilObject\$type, and getExportDirectory().

1622  : array
1623  {
1624  $file = array();
1625 
1626  $types = array("xml", "html");
1627 
1628  foreach ($types as $type) {
1629  $dir = $this->getExportDirectory($type);
1630  // quit if import dir not available
1631  if (!is_dir($dir) or
1632  !is_writeable($dir)) {
1633  continue;
1634  }
1635 
1636  // open directory
1637  $cdir = dir($dir);
1638 
1639  // initialize array
1640 
1641  // get files and save the in the array
1642  while ($entry = $cdir->read()) {
1643  if ($entry != "." and
1644  $entry != ".." and
1645  substr($entry, -4) == ".zip" and
1646  preg_match("~^[0-9]{10}_{2}[0-9]+_{2}(lm_)*[0-9]+\.zip\$~", $entry)) {
1647  $file[$entry . $type] = array("type" => $type, "file" => $entry,
1648  "size" => filesize($dir . "/" . $entry));
1649  }
1650  }
1651 
1652  // close import directory
1653  $cdir->close();
1654  }
1655 
1656  // sort files
1657  ksort($file);
1658  return $file;
1659  }
string $type
getExportDirectory(string $a_type="xml")
+ Here is the call graph for this function:

◆ getFooterPage()

ilObjContentObject::getFooterPage ( )

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

References $footer_page.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

859  : int
860  {
861  return $this->footer_page;
862  }
+ Here is the caller graph for this function:

◆ getForTranslation()

ilObjContentObject::getForTranslation ( )

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

References $for_translation.

Referenced by updateProperties().

307  : bool
308  {
309  return $this->for_translation;
310  }
+ Here is the caller graph for this function:

◆ getHeaderPage()

ilObjContentObject::getHeaderPage ( )

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

References $header_page.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

849  : int
850  {
851  return $this->header_page;
852  }
+ Here is the caller graph for this function:

◆ getHideHeaderFooterPrint()

ilObjContentObject::getHideHeaderFooterPrint ( )

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

References $hide_header_footer_print.

Referenced by updateProperties().

799  : bool
800  {
802  }
+ Here is the caller graph for this function:

◆ getImportDirectory()

ilObjContentObject::getImportDirectory ( )

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

References $import_dir, ilFileUtils\getDataDir(), and ilObject\getId().

354  : string
355  {
356  if (strlen($this->import_dir)) {
357  return $this->import_dir;
358  }
359 
360  $import_dir = ilFileUtils::getDataDir() . "/lm_data" .
361  "/lm_" . $this->getId() . "/import";
362  if (is_dir($import_dir)) {
363  return $import_dir;
364  }
365  return "";
366  }
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:

◆ getLayout()

ilObjContentObject::getLayout ( )

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

References $layout.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

476  : string
477  {
478  return $this->layout;
479  }
+ Here is the caller graph for this function:

◆ getLayoutPerPage()

ilObjContentObject::getLayoutPerPage ( )

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

References $layout_per_page.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

148  : bool
149  {
150  return $this->layout_per_page;
151  }
+ Here is the caller graph for this function:

◆ getLMTree()

ilObjContentObject::getLMTree ( )

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

References $lm_tree.

Referenced by checkStructure(), and fixTree().

312  : ilLMTree
313  {
314  return $this->lm_tree;
315  }
+ Here is the caller graph for this function:

◆ getOfflineFiles()

ilObjContentObject::getOfflineFiles ( string  $dir)

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

References ILIAS\UI\examples\Symbol\Glyph\Sort\sort().

1678  : array {
1679  // quit if offline dir not available
1680  if (!is_dir($dir) or
1681  !is_writeable($dir)) {
1682  return array();
1683  }
1684 
1685  // open directory
1686  $dir = dir($dir);
1687 
1688  // initialize array
1689  $file = array();
1690 
1691  // get files and save the in the array
1692  while ($entry = $dir->read()) {
1693  if ($entry != "." and
1694  $entry != ".." and
1695  substr($entry, -4) == ".pdf" and
1696  preg_match("~^[0-9]{10}_{2}[0-9]+_{2}(lm_)*[0-9]+\.pdf\$~", $entry)) {
1697  $file[] = $entry;
1698  }
1699  }
1700 
1701  // close import directory
1702  $dir->close();
1703 
1704  // sort files
1705  sort($file);
1706  return $file;
1707  }
sort()
description: > Example for rendering a Sort Glyph.
Definition: sort.php:41
+ Here is the call graph for this function:

◆ getPageHeader()

ilObjContentObject::getPageHeader ( )

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

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

References $pg_header.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

709  : string
710  {
711  return $this->pg_header;
712  }
+ Here is the caller graph for this function:

◆ getProgressIcons()

ilObjContentObject::getProgressIcons ( )

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

References $progr_icons.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

171  : bool
172  {
173  return $this->progr_icons;
174  }
+ Here is the caller graph for this function:

◆ getPublicExportFile()

ilObjContentObject::getPublicExportFile ( string  $a_type)

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

Referenced by getPublicExportFiles(), and updateProperties().

1671  : string
1672  {
1673  return $this->public_export_file[$a_type] ?? "";
1674  }
+ Here is the caller graph for this function:

◆ getPublicExportFiles()

ilObjContentObject::getPublicExportFiles ( )

Get public export files.

Returns
array array of arrays with keys "type" (html, scorm or xml), "file" (filename) and "size" in bytes, "dir_type" detailed directory type, e.g. html_de

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

References ilObject\$type, getExportDirectory(), ilObject\getId(), ilObjectTranslation\getInstance(), and getPublicExportFile().

2150  : array
2151  {
2152  $dirs = array("xml");
2153  $export_files = array();
2154 
2155  $ot = ilObjectTranslation::getInstance($this->getId());
2156  if ($ot->getContentActivated()) {
2157  $langs = $ot->getLanguages();
2158  foreach ($langs as $l => $ldata) {
2159  $dirs[] = "html_" . $l;
2160  }
2161  $dirs[] = "html_all";
2162  } else {
2163  $dirs[] = "html";
2164  }
2165 
2166  foreach ($dirs as $dir) {
2167  $type = explode("_", $dir);
2168  $type = $type[0];
2169  if ($this->getPublicExportFile($type) != "") {
2170  if (is_file($this->getExportDirectory($dir) . "/" .
2171  $this->getPublicExportFile($type))) {
2172  $size = filesize($this->getExportDirectory($dir) . "/" .
2173  $this->getPublicExportFile($type));
2174  $export_files[] = array("type" => $type,
2175  "dir_type" => $dir,
2176  "file" => $this->getPublicExportFile($type),
2177  "size" => $size);
2178  }
2179  }
2180  }
2181 
2182  return $export_files;
2183  }
string $type
getExportDirectory(string $a_type="xml")
static getInstance(int $obj_id)
+ Here is the call graph for this function:

◆ getRestrictForwardNavigation()

ilObjContentObject::getRestrictForwardNavigation ( )

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

References $restrict_forw_nav.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

191  : bool
192  {
194  }
+ Here is the caller graph for this function:

◆ getStoreTries()

ilObjContentObject::getStoreTries ( )

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

References $store_tries.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

181  : bool
182  {
183  return $this->store_tries;
184  }
+ Here is the caller graph for this function:

◆ getTOCMode()

ilObjContentObject::getTOCMode ( )

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

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

References $toc_mode.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

727  : string
728  {
729  return $this->toc_mode;
730  }
+ Here is the caller graph for this function:

◆ getTree()

ilObjContentObject::getTree ( )

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

References $lm_tree.

196  : ilLMTree
197  {
198  return $this->lm_tree;
199  }

◆ hasRating()

ilObjContentObject::hasRating ( )

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

References $rating.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

2094  : bool
2095  {
2096  return $this->rating;
2097  }
+ Here is the caller graph for this function:

◆ hasRatingPages()

ilObjContentObject::hasRatingPages ( )

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

References $rating_pages.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

2104  : bool
2105  {
2106  return $this->rating_pages;
2107  }
+ Here is the caller graph for this function:

◆ hasSuccessorPage()

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

checks if page has a successor page

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

References ilObject\$tree, ilTree\fetchSuccessorNode(), ilTree\isInTree(), ilTree\setTableNames(), and ilTree\setTreeTablePK().

Referenced by ilPageObjectGUI\showPage().

1097  : bool {
1098  $tree = new ilTree($a_cont_obj_id);
1099  $tree->setTableNames('lm_tree', 'lm_data');
1100  $tree->setTreeTablePK("lm_id");
1101  if ($tree->isInTree($a_page_id)) {
1102  $succ = $tree->fetchSuccessorNode($a_page_id, "pg");
1103  if ($succ > 0) {
1104  return true;
1105  }
1106  }
1107  return false;
1108  }
fetchSuccessorNode(int $a_node_id, string $a_type="")
get node data of successor node
ilTree $tree
isInTree(?int $a_node_id)
get all information of a node.
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 &#39;obj_id&#39; You may use...
+ Here is the call graph for this function:
+ 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 232 of file class.ilObjContentObject.php.

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

◆ isActiveDownloads()

ilObjContentObject::isActiveDownloads ( )

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

References $downloads_active.

Referenced by updateProperties(), and validatePages().

809  : bool
810  {
812  }
+ Here is the caller graph for this function:

◆ isActiveDownloadsPublic()

ilObjContentObject::isActiveDownloadsPublic ( )

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

References $downloads_public_active.

Referenced by updateProperties(), and validatePages().

819  : bool
820  {
822  }
+ Here is the caller graph for this function:

◆ isActiveLMMenu()

ilObjContentObject::isActiveLMMenu ( )

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

References $lm_menu_active.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

746  : bool
747  {
748  return $this->lm_menu_active;
749  }
+ Here is the caller graph for this function:

◆ isActiveNumbering()

ilObjContentObject::isActiveNumbering ( )

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

References $numbering.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

766  : bool
767  {
768  return $this->numbering;
769  }
+ Here is the caller graph for this function:

◆ isActivePreventGlossaryAppendix()

ilObjContentObject::isActivePreventGlossaryAppendix ( )

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

References $prevent_glossary_appendix_active.

Referenced by updateProperties(), and validatePages().

786  : bool
787  {
789  }
+ Here is the caller graph for this function:

◆ isActivePrintView()

ilObjContentObject::isActivePrintView ( )

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

References $print_view_active.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

776  : bool
777  {
779  }
+ Here is the caller graph for this function:

◆ isActiveTOC()

ilObjContentObject::isActiveTOC ( )

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

References $toc_active.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

756  : bool
757  {
758  return $this->toc_active;
759  }
+ Here is the caller graph for this function:

◆ isInfoEnabled()

ilObjContentObject::isInfoEnabled ( )

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

References ilObject\getId(), and ilObjContentObjectAccess\isInfoEnabled().

2185  : bool
2186  {
2188  }
+ 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 2076 of file class.ilObjContentObject.php.

References ilObject\_lookupObjId().

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

2079  : bool {
2080  if (!$a_as_obj_id && $a_id > 0 && $a_id === (int) OH_REF_ID) {
2081  return true;
2082  }
2083  if ($a_as_obj_id && $a_id > 0 && $a_id === ilObject::_lookupObjId((int) OH_REF_ID)) {
2084  return true;
2085  }
2086  return false;
2087  }
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupAutoGlossaries()

static ilObjContentObject::lookupAutoGlossaries ( int  $a_lm_id)
static

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

References $DIC, and $ilDB.

Referenced by ilLMPage\beforePageContentUpdate().

2019  : array {
2020  global $DIC;
2021 
2022  $ilDB = $DIC->database();
2023 
2024  // read auto glossaries
2025  $set = $ilDB->query(
2026  "SELECT * FROM lm_glossaries " .
2027  " WHERE lm_id = " . $ilDB->quote($a_lm_id, "integer")
2028  );
2029  $glos = array();
2030  while ($rec = $ilDB->fetchAssoc($set)) {
2031  $glos[] = $rec["glo_id"];
2032  }
2033  return $glos;
2034  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ publicNotes()

ilObjContentObject::publicNotes ( )

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

References $pub_notes.

Referenced by exportXMLProperties(), updateProperties(), and validatePages().

829  : bool
830  {
831  return $this->pub_notes;
832  }
+ Here is the caller graph for this function:

◆ read()

ilObjContentObject::read ( )

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

References ilObject\$db, $ilDB, ilObject\getId(), readProperties(), and setAutoGlossaries().

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

◆ readProperties()

ilObjContentObject::readProperties ( )

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

References ilObject\$db, $ilDB, $lm_set, $q, ilObject\getId(), setActiveDownloads(), setActiveDownloadsPublic(), setActiveLMMenu(), setActiveNumbering(), setActivePreventGlossaryAppendix(), setActivePrintView(), setActiveTOC(), setCleanFrames(), setDisableDefaultFeedback(), setFooterPage(), setForTranslation(), setHeaderPage(), setHideHeaderFooterPrint(), setLayout(), setLayoutPerPage(), setPageHeader(), setProgressIcons(), setPublicExportFile(), setPublicNotes(), setRating(), setRatingPages(), setRestrictForwardNavigation(), setStoreTries(), setTOCMode(), and ilUtil\yn2tf().

Referenced by createProperties(), and read().

864  : void
865  {
866  $ilDB = $this->db;
867 
868  $q = "SELECT * FROM content_object WHERE id = " .
869  $ilDB->quote($this->getId(), "integer");
870  $lm_set = $ilDB->query($q);
871  $lm_rec = $ilDB->fetchAssoc($lm_set);
872  $this->setLayout((string) $lm_rec["default_layout"]);
873  $this->setPageHeader((string) $lm_rec["page_header"]);
874  $this->setTOCMode((string) $lm_rec["toc_mode"]);
875  $this->setActiveTOC(ilUtil::yn2tf($lm_rec["toc_active"]));
876  $this->setActiveNumbering(ilUtil::yn2tf($lm_rec["numbering"]));
877  $this->setActivePrintView(ilUtil::yn2tf($lm_rec["print_view_active"]));
878  $this->setActivePreventGlossaryAppendix(ilUtil::yn2tf($lm_rec["no_glo_appendix"]));
879  $this->setHideHeaderFooterPrint((bool) $lm_rec["hide_head_foot_print"]);
880  $this->setActiveDownloads(ilUtil::yn2tf($lm_rec["downloads_active"]));
881  $this->setActiveDownloadsPublic(ilUtil::yn2tf($lm_rec["downloads_public_active"]));
882  $this->setActiveLMMenu(ilUtil::yn2tf($lm_rec["lm_menu_active"]));
883  $this->setCleanFrames(ilUtil::yn2tf($lm_rec["clean_frames"]));
884  $this->setHeaderPage((int) $lm_rec["header_page"]);
885  $this->setFooterPage((int) $lm_rec["footer_page"]);
886  $this->setPublicExportFile("xml", (string) $lm_rec["public_xml_file"]);
887  $this->setPublicExportFile("html", (string) $lm_rec["public_html_file"]);
888  $this->setLayoutPerPage((bool) $lm_rec["layout_per_page"]);
889  $this->setRating((bool) $lm_rec["rating"]);
890  $this->setRatingPages((bool) $lm_rec["rating_pages"]);
891  $this->setDisableDefaultFeedback((bool) $lm_rec["disable_def_feedback"]);
892  $this->setProgressIcons((bool) $lm_rec["progr_icons"]);
893  $this->setStoreTries((bool) $lm_rec["store_tries"]);
894  $this->setRestrictForwardNavigation((bool) $lm_rec["restrict_forw_nav"]);
895 
896  // #14661
897  $this->setPublicNotes($this->notes->domain()->commentsActive($this->getId()));
898 
899  $this->setForTranslation((bool) $lm_rec["for_translation"]);
900  }
setActiveLMMenu(bool $a_act_lm_menu)
setActiveDownloadsPublic(bool $a_down)
setPageHeader(string $a_pg_header=ilLMObject::CHAPTER_TITLE)
set page header mode
setForTranslation(bool $a_val)
Set for translation (lm has been imported for translation purposes)
setRestrictForwardNavigation(bool $a_val)
setTOCMode(string $a_toc_mode="chapters")
set toc mode
ilDBInterface $db
setPublicExportFile(string $a_type, string $a_file)
specify public export file for type
setPublicNotes(bool $a_pub_notes)
setActivePreventGlossaryAppendix(bool $a_print)
$lm_set
$q
Definition: shib_logout.php:21
setDisableDefaultFeedback(bool $a_val)
Set disable default feedback for questions.
static yn2tf(string $a_yn)
setHideHeaderFooterPrint(bool $a_val)
Set hide header footer in print mode.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAutoGlossary()

ilObjContentObject::removeAutoGlossary ( int  $a_glo_id)

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

References ilObject\$lng, getAutoGlossaries(), ilObject\getId(), ilTree\POS_FIRST_NODE, ilLMObject\putInTree(), setAutoGlossaries(), and ilLanguage\txt().

262  : void
263  {
264  $glo_ids = array();
265  foreach ($this->getAutoGlossaries() as $g) {
266  if ($g != $a_glo_id) {
267  $glo_ids[] = $g;
268  }
269  }
270  $this->setAutoGlossaries($glo_ids);
271  }
+ Here is the call graph for this function:

◆ setActiveDownloads()

ilObjContentObject::setActiveDownloads ( bool  $a_down)

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

Referenced by readProperties().

804  : void
805  {
806  $this->downloads_active = $a_down;
807  }
+ Here is the caller graph for this function:

◆ setActiveDownloadsPublic()

ilObjContentObject::setActiveDownloadsPublic ( bool  $a_down)

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

Referenced by readProperties().

814  : void
815  {
816  $this->downloads_public_active = $a_down;
817  }
+ Here is the caller graph for this function:

◆ setActiveLMMenu()

ilObjContentObject::setActiveLMMenu ( bool  $a_act_lm_menu)

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

Referenced by readProperties().

741  : void
742  {
743  $this->lm_menu_active = $a_act_lm_menu;
744  }
+ Here is the caller graph for this function:

◆ setActiveNumbering()

ilObjContentObject::setActiveNumbering ( bool  $a_num)

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

Referenced by readProperties().

761  : void
762  {
763  $this->numbering = $a_num;
764  }
+ Here is the caller graph for this function:

◆ setActivePreventGlossaryAppendix()

ilObjContentObject::setActivePreventGlossaryAppendix ( bool  $a_print)

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

Referenced by readProperties().

781  : void
782  {
783  $this->prevent_glossary_appendix_active = $a_print;
784  }
+ Here is the caller graph for this function:

◆ setActivePrintView()

ilObjContentObject::setActivePrintView ( bool  $a_print)

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

Referenced by readProperties().

771  : void
772  {
773  $this->print_view_active = $a_print;
774  }
+ Here is the caller graph for this function:

◆ setActiveTOC()

ilObjContentObject::setActiveTOC ( bool  $a_toc)

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

Referenced by readProperties().

751  : void
752  {
753  $this->toc_active = $a_toc;
754  }
+ Here is the caller graph for this function:

◆ setAutoGlossaries()

ilObjContentObject::setAutoGlossaries ( array  $a_val)

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

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

Referenced by read(), and removeAutoGlossary().

243  : void
244  {
245  $this->auto_glossaries = array();
246  if (is_array($a_val)) {
247  foreach ($a_val as $v) {
248  $v = (int) $v;
249  if ($v > 0 && ilObject::_lookupType($v) == "glo" &&
250  !in_array($v, $this->auto_glossaries)) {
251  $this->auto_glossaries[] = $v;
252  }
253  }
254  }
255  }
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCleanFrames()

ilObjContentObject::setCleanFrames ( bool  $a_clean)

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

Referenced by readProperties(), and updateProperties().

834  : void
835  {
836  $this->clean_frames = $a_clean;
837  }
+ Here is the caller graph for this function:

◆ setDisableDefaultFeedback()

ilObjContentObject::setDisableDefaultFeedback ( bool  $a_val)

Set disable default feedback for questions.

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

Referenced by readProperties().

156  : void
157  {
158  $this->disable_def_feedback = $a_val;
159  }
+ Here is the caller graph for this function:

◆ setFooterPage()

ilObjContentObject::setFooterPage ( int  $a_pg)

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

Referenced by readProperties().

854  : void
855  {
856  $this->footer_page = $a_pg;
857  }
+ Here is the caller graph for this function:

◆ setForTranslation()

ilObjContentObject::setForTranslation ( bool  $a_val)

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

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

Referenced by readProperties().

302  : void
303  {
304  $this->for_translation = $a_val;
305  }
+ Here is the caller graph for this function:

◆ setHeaderPage()

ilObjContentObject::setHeaderPage ( int  $a_pg)

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

Referenced by readProperties().

844  : void
845  {
846  $this->header_page = $a_pg;
847  }
+ Here is the caller graph for this function:

◆ setHideHeaderFooterPrint()

ilObjContentObject::setHideHeaderFooterPrint ( bool  $a_val)

Set hide header footer in print mode.

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

Referenced by readProperties().

794  : void
795  {
796  $this->hide_header_footer_print = $a_val;
797  }
+ Here is the caller graph for this function:

◆ setImportDirectory()

ilObjContentObject::setImportDirectory ( string  $a_import_dir)

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

368  : void
369  {
370  $this->import_dir = $a_import_dir;
371  }

◆ setLayout()

ilObjContentObject::setLayout ( string  $a_layout)

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

Referenced by readProperties().

481  : void
482  {
483  $this->layout = $a_layout;
484  }
+ Here is the caller graph for this function:

◆ setLayoutPerPage()

ilObjContentObject::setLayoutPerPage ( bool  $a_val)

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

Referenced by readProperties().

143  : void
144  {
145  $this->layout_per_page = $a_val;
146  }
+ Here is the caller graph for this function:

◆ 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 718 of file class.ilObjContentObject.php.

Referenced by readProperties().

720  : void {
721  $this->pg_header = $a_pg_header;
722  }
+ Here is the caller graph for this function:

◆ setProgressIcons()

ilObjContentObject::setProgressIcons ( bool  $a_val)

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

Referenced by readProperties().

166  : void
167  {
168  $this->progr_icons = $a_val;
169  }
+ Here is the caller graph for this function:

◆ setPublicExportFile()

ilObjContentObject::setPublicExportFile ( string  $a_type,
string  $a_file 
)

specify public export file for type

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

Referenced by readProperties().

1667  : void {
1668  $this->public_export_file[$a_type] = $a_file;
1669  }
+ Here is the caller graph for this function:

◆ setPublicNotes()

ilObjContentObject::setPublicNotes ( bool  $a_pub_notes)

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

Referenced by readProperties().

824  : void
825  {
826  $this->pub_notes = $a_pub_notes;
827  }
+ Here is the caller graph for this function:

◆ setRating()

ilObjContentObject::setRating ( bool  $a_value)

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

Referenced by readProperties().

2089  : void
2090  {
2091  $this->rating = $a_value;
2092  }
+ Here is the caller graph for this function:

◆ setRatingPages()

ilObjContentObject::setRatingPages ( bool  $a_value)

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

Referenced by readProperties().

2099  : void
2100  {
2101  $this->rating_pages = $a_value;
2102  }
+ Here is the caller graph for this function:

◆ setRestrictForwardNavigation()

ilObjContentObject::setRestrictForwardNavigation ( bool  $a_val)

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

Referenced by readProperties().

186  : void
187  {
188  $this->restrict_forw_nav = $a_val;
189  }
+ Here is the caller graph for this function:

◆ setStoreTries()

ilObjContentObject::setStoreTries ( bool  $a_val)

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

Referenced by readProperties().

176  : void
177  {
178  $this->store_tries = $a_val;
179  }
+ Here is the caller graph for this function:

◆ setTOCMode()

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

set toc mode

Parameters
string$a_toc_mode"chapters" | "pages"

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

Referenced by readProperties().

736  : void
737  {
738  $this->toc_mode = $a_toc_mode;
739  }
+ Here is the caller graph for this function:

◆ update()

ilObjContentObject::update ( )

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

References updateAutoGlossaries(), ilObject\updateMetaData(), and updateProperties().

201  : bool
202  {
203  $this->updateMetaData();
204  parent::update();
205  $this->updateProperties();
206  $this->updateAutoGlossaries();
207  return true;
208  }
+ Here is the call graph for this function:

◆ updateAutoGlossaries()

ilObjContentObject::updateAutoGlossaries ( )

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

References ilObject\$db, $ilDB, and getAutoGlossaries().

Referenced by create(), and update().

210  : void
211  {
212  $ilDB = $this->db;
213 
214  // update auto glossaries
215  $ilDB->manipulate(
216  "DELETE FROM lm_glossaries WHERE " .
217  " lm_id = " . $ilDB->quote($this->getId(), "integer")
218  );
219  foreach ($this->getAutoGlossaries() as $glo_id) {
220  $ilDB->manipulate("INSERT INTO lm_glossaries " .
221  "(lm_id, glo_id) VALUES (" .
222  $ilDB->quote($this->getId(), "integer") . "," .
223  $ilDB->quote($glo_id, "integer") .
224  ")");
225  }
226  }
ilDBInterface $db
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateProperties()

ilObjContentObject::updateProperties ( )

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

References ilObject\$db, $ilDB, $q, cleanFrames(), getDisableDefaultFeedback(), getFooterPage(), getForTranslation(), getHeaderPage(), getHideHeaderFooterPrint(), ilObject\getId(), getLayout(), getLayoutPerPage(), getPageHeader(), getProgressIcons(), getPublicExportFile(), getRestrictForwardNavigation(), getStoreTries(), getTOCMode(), hasRating(), hasRatingPages(), isActiveDownloads(), isActiveDownloadsPublic(), isActiveLMMenu(), isActiveNumbering(), isActivePreventGlossaryAppendix(), isActivePrintView(), isActiveTOC(), publicNotes(), setCleanFrames(), and ilUtil\tf2yn().

Referenced by update().

902  : void
903  {
904  $ilDB = $this->db;
905 
906  // force clean_frames to be set, if layout per page is activated
907  if ($this->getLayoutPerPage()) {
908  $this->setCleanFrames(true);
909  }
910 
911  $q = "UPDATE content_object SET " .
912  " default_layout = " . $ilDB->quote($this->getLayout(), "text") . ", " .
913  " page_header = " . $ilDB->quote($this->getPageHeader(), "text") . "," .
914  " toc_mode = " . $ilDB->quote($this->getTOCMode(), "text") . "," .
915  " toc_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveTOC()), "text") . "," .
916  " numbering = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveNumbering()), "text") . "," .
917  " print_view_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActivePrintView()), "text") . "," .
918  " no_glo_appendix = " . $ilDB->quote(ilUtil::tf2yn($this->isActivePreventGlossaryAppendix()), "text") . "," .
919  " hide_head_foot_print = " . $ilDB->quote($this->getHideHeaderFooterPrint(), "integer") . "," .
920  " downloads_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveDownloads()), "text") . "," .
921  " downloads_public_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveDownloadsPublic()), "text") . "," .
922  " clean_frames = " . $ilDB->quote(ilUtil::tf2yn($this->cleanFrames()), "text") . "," .
923  " public_xml_file = " . $ilDB->quote($this->getPublicExportFile("xml"), "text") . "," .
924  " public_html_file = " . $ilDB->quote($this->getPublicExportFile("html"), "text") . "," .
925  " header_page = " . $ilDB->quote($this->getHeaderPage(), "integer") . "," .
926  " footer_page = " . $ilDB->quote($this->getFooterPage(), "integer") . "," .
927  " lm_menu_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveLMMenu()), "text") . ", " .
928  " layout_per_page = " . $ilDB->quote($this->getLayoutPerPage(), "integer") . ", " .
929  " rating = " . $ilDB->quote($this->hasRating(), "integer") . ", " .
930  " rating_pages = " . $ilDB->quote($this->hasRatingPages(), "integer") . ", " .
931  " disable_def_feedback = " . $ilDB->quote($this->getDisableDefaultFeedback(), "integer") . ", " .
932  " progr_icons = " . $ilDB->quote($this->getProgressIcons(), "integer") . ", " .
933  " store_tries = " . $ilDB->quote($this->getStoreTries(), "integer") . ", " .
934  " restrict_forw_nav = " . $ilDB->quote($this->getRestrictForwardNavigation(), "integer") . ", " .
935  " for_translation = " . $ilDB->quote((int) $this->getForTranslation(), "integer") . " " .
936  " WHERE id = " . $ilDB->quote($this->getId(), "integer");
937  $ilDB->manipulate($q);
938  // #14661
939  $this->notes->domain()->activateComments($this->getId(), $this->publicNotes());
940  }
static tf2yn(bool $a_tf)
getPageHeader()
get page header mode (ilLMOBject::CHAPTER_TITLE | ilLMOBject::PAGE_TITLE | ilLMOBject::NO_HEADER) ...
ilDBInterface $db
getTOCMode()
get toc mode ("chapters" | "pages")
$q
Definition: shib_logout.php:21
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validatePages()

ilObjContentObject::validatePages ( )

Validate all pages.

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

References Vendor\Package\$e, ilObject\$error, ilObject\$title, ilPageObject\_exists(), ilCopyWizardOptions\_getInstance(), ilLMObject\_lookupTitle(), cleanFrames(), ilObject\cloneMetaData(), copyAllPagesAndChapters(), getAutoGlossaries(), ilObject\getDescription(), getDisableDefaultFeedback(), getFooterPage(), getHeaderPage(), ilObject\getId(), ilObjectTranslation\getInstance(), getLayout(), getLayoutPerPage(), ilObject\getOfflineStatus(), getPageHeader(), ilLMPageObject\getPageList(), getProgressIcons(), getRestrictForwardNavigation(), getStoreTries(), getTOCMode(), ilObject\getType(), hasRating(), hasRatingPages(), isActiveDownloads(), isActiveDownloadsPublic(), isActiveLMMenu(), isActiveNumbering(), isActivePreventGlossaryAppendix(), isActivePrintView(), isActiveTOC(), ILIAS\Repository\lng(), publicNotes(), and ilLMMenuEditor\writeActive().

1840  : string
1841  {
1842  $mess = "";
1843 
1844  $pages = ilLMPageObject::getPageList($this->getId());
1845  foreach ($pages as $page) {
1846  if (ilLMPage::_exists($this->getType(), $page["obj_id"])) {
1847  $cpage = new ilLMPage($page["obj_id"]);
1848  $cpage->buildDom();
1849  $error = $cpage->validateDom();
1850 
1851  if ($error != "") {
1852  $this->lng->loadLanguageModule("content");
1853  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("cont_import_validation_errors"));
1854  $title = ilLMObject::_lookupTitle($page["obj_id"]);
1855  $page_obj = new ilLMPageObject($this->lm, $page["obj_id"]);
1856  $mess .= $this->lng->txt("obj_pg") . ": " . $title;
1857  $mess .= '<div class="small">';
1858  foreach ($error as $e) {
1859  $err_mess = implode(" - ", $e);
1860  if (!is_int(strpos($err_mess, ":0:"))) {
1861  $mess .= htmlentities($err_mess) . "<br />";
1862  }
1863  }
1864  $mess .= '</div>';
1865  $mess .= "<br />";
1866  }
1867  }
1868  }
1869 
1870  return $mess;
1871  }
string $title
static _lookupTitle(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
static getPageList(int $lm_id)
ilErrorHandling $error
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ writeFooterPage()

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

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

References $DIC, and $ilDB.

Referenced by ilLearningModuleImporter\finalProcessing().

504  : void {
505  global $DIC;
506 
507  $ilDB = $DIC->database();
508 
509  $ilDB->manipulate(
510  "UPDATE content_object SET " .
511  " footer_page = " . $ilDB->quote($a_page_id, "integer") .
512  " WHERE id = " . $ilDB->quote($a_lm_id, "integer")
513  );
514  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ writeHeaderPage()

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

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

References $DIC, and $ilDB.

Referenced by ilLearningModuleImporter\finalProcessing().

489  : void {
490  global $DIC;
491 
492  $ilDB = $DIC->database();
493 
494  $ilDB->manipulate(
495  "UPDATE content_object SET " .
496  " header_page = " . $ilDB->quote($a_page_id, "integer") .
497  " WHERE id = " . $ilDB->quote($a_lm_id, "integer")
498  );
499  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

Field Documentation

◆ $auto_glossaries

array ilObjContentObject::$auto_glossaries = array()

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

Referenced by getAutoGlossaries().

◆ $clean_frames

bool ilObjContentObject::$clean_frames = false
protected

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

Referenced by cleanFrames().

◆ $content_style_domain

ILIAS Style Content DomainService ilObjContentObject::$content_style_domain
protected

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

◆ $disable_def_feedback

bool ilObjContentObject::$disable_def_feedback = false
protected

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

Referenced by getDisableDefaultFeedback().

◆ $downloads_active

bool ilObjContentObject::$downloads_active = false
protected

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

Referenced by isActiveDownloads().

◆ $downloads_public_active

bool ilObjContentObject::$downloads_public_active = false
protected

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

Referenced by isActiveDownloadsPublic().

◆ $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.

Referenced by getFooterPage().

◆ $for_translation

bool ilObjContentObject::$for_translation = false

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

Referenced by getForTranslation().

◆ $header_page

int ilObjContentObject::$header_page = 0
protected

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

Referenced by getHeaderPage().

◆ $hide_header_footer_print

bool ilObjContentObject::$hide_header_footer_print = false
protected

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

Referenced by getHideHeaderFooterPrint().

◆ $import_dir

string ilObjContentObject::$import_dir = ''
private

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

Referenced by getImportDirectory().

◆ $layout

string ilObjContentObject::$layout = ''

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

Referenced by getLayout().

◆ $layout_per_page

bool ilObjContentObject::$layout_per_page = false
protected

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

Referenced by getLayoutPerPage().

◆ $lm

ilObjLearningModule ilObjContentObject::$lm
protected

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

◆ $lm_menu_active

bool ilObjContentObject::$lm_menu_active = false
protected

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

Referenced by isActiveLMMenu().

◆ $lm_tree

ilLMTree ilObjContentObject::$lm_tree

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

Referenced by getLMTree(), and getTree().

◆ $locator

ilLocatorGUI ilObjContentObject::$locator
protected

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

◆ $lom_services

LOMServices ilObjContentObject::$lom_services
protected

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

◆ $main_tpl

ilGlobalTemplateInterface ilObjContentObject::$main_tpl
private

Definition at line 65 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 42 of file class.ilObjContentObject.php.

Referenced by isActiveNumbering().

◆ $online

bool ilObjContentObject::$online = false

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

◆ $pg_header

string ilObjContentObject::$pg_header = ''

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

Referenced by getPageHeader().

◆ $prevent_glossary_appendix_active

bool ilObjContentObject::$prevent_glossary_appendix_active = false
protected

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

Referenced by isActivePreventGlossaryAppendix().

◆ $print_view_active

bool ilObjContentObject::$print_view_active = false
protected

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

Referenced by isActivePrintView().

◆ $progr_icons

bool ilObjContentObject::$progr_icons = false
protected

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

Referenced by getProgressIcons().

◆ $pub_notes

bool ilObjContentObject::$pub_notes = false
protected

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

Referenced by publicNotes().

◆ $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 59 of file class.ilObjContentObject.php.

Referenced by hasRating().

◆ $rating_pages

bool ilObjContentObject::$rating_pages = false
protected

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

Referenced by hasRatingPages().

◆ $restrict_forw_nav

bool ilObjContentObject::$restrict_forw_nav = false
protected

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

Referenced by getRestrictForwardNavigation().

◆ $store_tries

bool ilObjContentObject::$store_tries = false
protected

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

Referenced by getStoreTries().

◆ $style_id

int ilObjContentObject::$style_id = 0

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

◆ $toc_active

bool ilObjContentObject::$toc_active = false
protected

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

Referenced by isActiveTOC().

◆ $toc_mode

string ilObjContentObject::$toc_mode = ''
protected

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

Referenced by getTOCMode().

◆ $user

ilObjUser ilObjContentObject::$user
protected

Definition at line 51 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: