} } ?> <#1063> <?php global $ilLog; // Delete all conditions if course is not parent $query = "SELECT DISTINCT target_ref_id AS ref FROM conditions " . "WHERE target_type != 'crs' AND target_type != 'st' "; $res = $ilDB->query($query); $ref_ids = array(); while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $ref_ids[] = $row->ref; } $tree = new ilTree(ROOT_FOLDER_ID); foreach ($ref_ids as $ref_id) { if (!$tree->checkForParentType($ref_id, 'crs')) { $query = "DELETE FROM conditions " . "WHERE target_ref_id = " . $ref_id . " " . "AND target_type != 'st' "; $ilDB->query($query); $ilLog->write('Delete condition for ref_id = ' . $ref_id . ' (not inside of course)'); } } ?> <#1064> <?php // register new object type 'mds' for meta data setttings and advanced meta data $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) " . "VALUES ('typ', 'mds', 'Meta Data settings', -1, now(), now())"; $this->db->query($query); // ADD NODE IN SYSTEM SETTINGS FOLDER // create object data entry $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) " . "VALUES ('mds', '__MetaDataSettings', 'Meta Data Settings', -1, now(), now())";