ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilObjStudyProgramme. More...
Public Member Functions | |
__construct ($a_id=0, $a_call_by_reference=true) | |
ATTENTION: After using the constructor the object won't be in the cache. More... | |
getStudyProgrammeUserProgressDB () | |
Get a (cached) instance of ilStudyProgrammeUserProgressDB. More... | |
read () | |
create () | |
update () | |
delete () | |
Delete Study Programme and all related data. More... | |
getLastChange () | |
Get the timestamp of the last change on this program or sub program. More... | |
getPoints () | |
Get the amount of points. More... | |
setPoints ($a_points) | |
Set the amount of points. More... | |
getLPMode () | |
Get the lp mode. More... | |
adjustLPMode () | |
Adjust the lp mode to match current state of tree: More... | |
getStatus () | |
Get the status. More... | |
setStatus ($a_status) | |
Set the status of the node. More... | |
isActive () | |
Check whether this programme is active. More... | |
getSubtypeId () | |
Gets the meta-data subtype id (allows to add additional meta-data based on a type) More... | |
setSubtypeId ($a_subtype_id) | |
Sets the meta-data subtype id. More... | |
getSubType () | |
Gets the SubType Object. More... | |
getChildren () | |
Get all ilObjStudyProgrammes that are direct children of this object. More... | |
getParent () | |
Get the parent ilObjStudyProgramme of this object. More... | |
getParents () | |
Get all parents of the node, where the root of the program comes first. More... | |
hasChildren () | |
Does this StudyProgramme have other ilObjStudyProgrammes as children? More... | |
getAmountOfChildren () | |
Get the amount of other StudyProgrammes this StudyProgramme has as children. More... | |
getDepth () | |
Get the depth of this StudyProgramme in the tree starting at the topmost StudyProgramme (not root node of the repo tree!). More... | |
getRoot () | |
Get the ilObjStudyProgramme that is the root node of the tree this programme is in. More... | |
getLPChildren () | |
Get the leafs the study programme contains. More... | |
getLPChildrenIds () | |
Get the ids of the leafs the program contains. More... | |
getAmountOfLPChildren () | |
Get the amount of leafs, the study programme contains. More... | |
hasLPChildren () | |
Does this StudyProgramme has leafs? More... | |
applyToSubTreeNodes (Closure $fun) | |
Apply the given Closure to every node in the subtree starting at this object. More... | |
getCompletedCourses ($a_user_id) | |
Get courses in this program that the given user already completed. More... | |
addNode (ilObjStudyProgramme $a_prg) | |
Inserts another ilObjStudyProgramme in this object. More... | |
putInTree ($a_parent_ref) | |
Overwritten from ilObject. More... | |
removeNode (ilObjStudyProgramme $a_prg) | |
Remove a node from this object. More... | |
canBeRemoved () | |
Check weather a node can be removed. More... | |
addLeaf ( $a_leaf) | |
Insert a leaf in this object. More... | |
removeLeaf ( $a_leaf) | |
Remove a leaf from this object. More... | |
moveTo (ilObjStudyProgramme $a_new_parent) | |
Move this tree node to a new parent. More... | |
assignUser ($a_usr_id, $a_assigning_usr_id=null) | |
Assign a user to this node at the study program. More... | |
removeAssignment (ilStudyProgrammeUserAssignment $a_assignment) | |
Remove an assignment from this program. More... | |
hasAssignmentOf ($a_user_id) | |
Check whether user is assigned to this program or any node above. More... | |
getAmountOfAssignmentsOf ($a_user_id) | |
Get the amount of assignments a user has on this program node or any node above. More... | |
getAssignmentsOf ($a_user_id) | |
Get the assignments of user at this program or any node above. More... | |
getAssignments () | |
Get all assignments to this program or any node above. More... | |
hasAssignments () | |
Are there any assignments on this node or any node above? More... | |
updateAllAssignments () | |
Update all assignments to this program node. More... | |
createProgressForAssignment (ilStudyProgrammeAssignment $ass) | |
Create a progress on this programme for the given assignment. More... | |
getProgressesOf ($a_user_id) | |
Get the progresses the user has on this node. More... | |
getProgressForAssignment ($a_assignment_id) | |
Get the progress for an assignment on this node. More... | |
addMissingProgresses () | |
Add missing progress records for all assignments of this programm. More... | |
getProgresses () | |
Get all progresses on this node. More... | |
hasProgresses () | |
Are there any users that have a progress on this programme? More... | |
hasRelevantProgresses () | |
Are there any users that have a relevant progress on this programme? More... | |
getIdsOfUsersWithRelevantProgress () | |
Get the ids of all users that have a relevant progress at this programme. More... | |
getIdsOfUsersWithCompletedProgress () | |
Get the ids of all users that have completed this programme. More... | |
getIdsOfUsersWithFailedProgress () | |
Get the ids of all users that have failed this programme. More... | |
getIdsOfUsersWithNotCompletedAndRelevantProgress () | |
Get the ids of all users that have not completed this programme but have a relevant progress on it. More... | |
getRawSettings () | |
Get the underlying model of this program. More... | |
Public Member Functions inherited from ilContainer | |
__construct ($a_id=0, $a_reference=true) | |
getObjectTranslation () | |
Get object translation. More... | |
setObjectTranslation (ilObjectTranslation $obj_trans) | |
Get object translation. More... | |
createContainerDirectory () | |
Create directory for the container. More... | |
getContainerDirectory () | |
Get the container directory. More... | |
setHiddenFilesFound ($a_hiddenfilesfound) | |
Set Found hidden files (set by getSubItems). More... | |
getHiddenFilesFound () | |
Get Found hidden files (set by getSubItems). More... | |
getStyleSheetId () | |
get ID of assigned style sheet object More... | |
setStyleSheetId ($a_style_id) | |
set ID of assigned style sheet object More... | |
setNewsTimeline ($a_val) | |
Set news timeline. More... | |
getNewsTimeline () | |
Get news timeline. More... | |
setNewsTimelineAutoEntries ($a_val) | |
Set news timeline auto entries. More... | |
getNewsTimelineAutoEntries () | |
Get news timeline auto entries. More... | |
setNewsTimelineLandingPage ($a_val) | |
Set news timline is landing page. More... | |
getNewsTimelineLandingPage () | |
Get news timline is landing page. More... | |
isNewsTimelineEffective () | |
Is news timeline effective? More... | |
isNewsTimelineLandingPageEffective () | |
Is news timeline landing page effective? More... | |
setNewsBlockActivated ($a_val) | |
Set news block activated. More... | |
getNewsBlockActivated () | |
Get news block activated. More... | |
setUseNews ($a_val) | |
Set use news. More... | |
getUseNews () | |
Get use news. More... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies (container sorting) More... | |
cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false, $a_submode=1) | |
clone all objects according to this container More... | |
delete () | |
delete category and all related data More... | |
getViewMode () | |
Get container view mode. More... | |
getOrderType () | |
Get order type default implementation. More... | |
setOrderType ($a_value) | |
getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0) | |
Get subitems of container. More... | |
gotItems () | |
Check whether we got any items. More... | |
addAdditionalSubItemInformation (&$object) | |
Add additional information to sub item, e.g. More... | |
getGroupedObjTypes () | |
Get grouped repository object types. More... | |
enablePageEditing () | |
Check whether page editing is allowed for container. More... | |
create () | |
Create. More... | |
putInTree ($a_parent_ref) | |
update () | |
Update. More... | |
read () | |
read More... | |
readContainerSettings () | |
Read container settings. More... | |
removeTranslations () | |
Remove all translations of container. More... | |
deleteTranslation ($a_lang) | |
Delete translation. More... | |
addTranslation ($a_title, $a_desc, $a_lang, $a_lang_default) | |
Add translation. More... | |
Public Member Functions inherited from ilObject | |
__construct ($a_id=0, $a_reference=true) | |
Constructor public. More... | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) More... | |
read () | |
read object data from db into object More... | |
getId () | |
get object id public More... | |
setId ($a_id) | |
set object id public More... | |
setRefId ($a_id) | |
set reference id public More... | |
getRefId () | |
get reference id public More... | |
getType () | |
get object type public More... | |
setType ($a_type) | |
set object type public More... | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions More... | |
getTitle () | |
get object title public More... | |
getUntranslatedTitle () | |
get untranslated object title public More... | |
setTitle ($a_title) | |
set object title More... | |
getDescription () | |
get object description More... | |
setDescription ($a_desc) | |
set object description More... | |
getLongDescription () | |
get object long description (stored in object_description) More... | |
getImportId () | |
get import id More... | |
setImportId ($a_import_id) | |
set import id More... | |
setOfflineStatus ($a_status) | |
Set offline status. More... | |
getOfflineStatus () | |
Get offline status. More... | |
supportsOfflineHandling () | |
Check whether object supports offline handling. More... | |
getOwner () | |
get object owner More... | |
getOwnerName () | |
setOwner ($a_owner) | |
set object owner More... | |
getCreateDate () | |
get create date public More... | |
getLastUpdateDate () | |
get last update date public More... | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. More... | |
create () | |
create More... | |
update () | |
update object in db More... | |
MDUpdateListener ($a_element) | |
Meta data update listener. More... | |
createMetaData () | |
create meta data entry More... | |
updateMetaData () | |
update meta data entry More... | |
deleteMetaData () | |
delete meta data entry More... | |
updateOwner () | |
update owner of object in db More... | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? More... | |
setPermissions ($a_parent_ref) | |
set permissions of object More... | |
setParentRolePermissions ($a_parent_ref) | |
Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More... | |
createReference () | |
creates reference for object More... | |
countReferences () | |
count references of object 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 If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More... | |
applyDidacticTemplate ($a_tpl_id) | |
Apply template. More... | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
getXMLZip () | |
getHTMLDirectory () | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
Prepend Copy info if object with same name exists in that container. More... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. More... | |
cloneMetaData ($target_obj) | |
Copy meta data. More... | |
getPossibleSubObjects ($a_filter=true) | |
get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More... | |
Static Public Member Functions | |
static | initStudyProgrammeCache () |
static | _getStudyProgrammeUserProgressDB () |
Get an instance of ilStudyProgrammeUserProgressDB. More... | |
static | getInstanceByRefId ($a_ref_id) |
Get an instance of ilObjStudyProgramme, use cache. More... | |
static | createInstance () |
Create an instance of ilObjStudyProgramme, put in cache. More... | |
static | getAllChildren ($a_ref_id) |
Get a list of all ilObjStudyProgrammes in the subtree starting at $a_ref_id. More... | |
static | setProgressesCompletedFor ($a_obj_id, $a_user_id) |
Set all progresses to completed where the object with given id is a leaf and that belong to the user. More... | |
static | getCreatableSubObjects ($a_subobjects, $a_ref_id) |
Filter the list of possible subobjects for the objects that actually could be created on a concrete node. More... | |
Static Public Member Functions inherited from ilContainer | |
static | _getContainerDirectory ($a_id) |
Get the container directory. More... | |
static | _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=null) |
Lookup a container setting. More... | |
static | _writeContainerSetting ($a_id, $a_keyword, $a_value) |
static | _getContainerSettings ($a_id) |
static | _deleteContainerSettings ($a_id, $a_keyword=null, $a_keyword_like=false) |
static | _exportContainerSettings (ilXmlWriter $a_xml, $a_obj_id) |
static | getCompleteDescriptions (array $objects) |
overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) More... | |
Static Public Member Functions inherited from ilObject | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _lookupImportId ($a_obj_id) |
static | _lookupOwnerName ($a_owner_id) |
lookup owner name for owner id More... | |
static | _getIdForImportId ($a_import_id) |
get current object id for import id (static) More... | |
static | _getAllReferences ($a_id) |
get all reference ids of object More... | |
static | _lookupTitle ($a_id) |
lookup object title More... | |
static | lookupOfflineStatus ($a_obj_id) |
Lookup offline status using objectDataCache. More... | |
static | _lookupOwner ($a_id) |
lookup object owner More... | |
static | _getIdsForTitle ($title, $type='', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description More... | |
static | _lookupLastUpdate ($a_id, $a_as_string=false) |
lookup last update More... | |
static | _getLastUpdateOfObjects ($a_objs) |
Get last update for a set of media objects. More... | |
static | _lookupObjId ($a_id) |
static | _setDeletedDate ($a_ref_id) |
only called in ilTree::saveSubTree More... | |
static | setDeletedDates ($a_ref_ids) |
Set deleted date. More... | |
static | _resetDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _lookupDeletedDate ($a_ref_id) |
only called in ilObjectGUI::insertSavedNodes More... | |
static | _writeTitle ($a_obj_id, $a_title) |
write title to db (static) More... | |
static | _writeDescription ($a_obj_id, $a_desc) |
write description to db (static) More... | |
static | _writeImportId ($a_obj_id, $a_import_id) |
write import id to db (static) More... | |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type More... | |
static | _isInTrash ($a_ref_id) |
checks wether object is in trash More... | |
static | _hasUntrashedReference ($a_obj_id) |
checks wether an object has at least one reference that is not in trash More... | |
static | _lookupObjectId ($a_ref_id) |
lookup object id More... | |
static | _getObjectsDataForType ($a_type, $a_omit_trash=false) |
get all objects of a certain type More... | |
static | _exists ($a_id, $a_reference=false, $a_type=null) |
checks if an object exists in object_data More... | |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. More... | |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true) |
Prepare copy wizard object selection. More... | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. More... | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. More... | |
static | getLongDescriptions (array $a_obj_ids) |
Get long description data. More... | |
static | getAllOwnedRepositoryObjects ($a_user_id) |
Get all ids of objects user owns. More... | |
static | fixMissingTitles ($a_type, array &$a_obj_title_map) |
Try to fix missing object titles. More... | |
static | _lookupCreationDate ($a_id) |
Lookup creation date. More... | |
static | hasAutoRating ($a_type, $a_ref_id) |
Check if auto rating is active for parent group/course. More... | |
Data Fields | |
$webdir | |
$tree | |
$ilUser | |
$object_factory | |
Data Fields inherited from ilContainer | |
const | VIEW_SESSIONS = 0 |
const | VIEW_OBJECTIVE = 1 |
const | VIEW_TIMING = 2 |
const | VIEW_ARCHIVE = 3 |
const | VIEW_SIMPLE = 4 |
const | VIEW_BY_TYPE = 5 |
const | VIEW_INHERIT = 6 |
const | VIEW_DEFAULT = self::VIEW_BY_TYPE |
const | SORT_TITLE = 0 |
const | SORT_MANUAL = 1 |
const | SORT_ACTIVATION = 2 |
const | SORT_INHERIT = 3 |
const | SORT_CREATION = 4 |
const | SORT_DIRECTION_ASC = 0 |
const | SORT_DIRECTION_DESC = 1 |
const | SORT_NEW_ITEMS_POSITION_TOP = 0 |
const | SORT_NEW_ITEMS_POSITION_BOTTOM = 1 |
const | SORT_NEW_ITEMS_ORDER_TITLE = 0 |
const | SORT_NEW_ITEMS_ORDER_CREATION = 1 |
const | SORT_NEW_ITEMS_ORDER_ACTIVATION = 2 |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 255 |
max length of object title More... | |
const | DESC_LENGTH = 128 |
$lng | |
$id | |
$ref_id | |
$type | |
$title | |
$untranslatedTitle | |
$desc | |
$long_desc | |
$owner | |
$create_date | |
$last_update | |
$import_id | |
$register = false | |
$referenced | |
$objectList | |
$max_title | |
$max_desc | |
$add_dots | |
Static Public Attributes | |
static | $study_programme_cache = null |
Static Public Attributes inherited from ilContainer | |
static | $data_preloaded = false |
Protected Member Functions | |
clearParentCache () | |
Clear the cached parent to query it again at the tree. More... | |
clearChildrenCache () | |
Clear the cached children. More... | |
clearLPChildrenCache () | |
Clear the cached lp children. More... | |
readSettings () | |
Load Settings from DB. More... | |
createSettings () | |
Create new settings object. More... | |
updateSettings () | |
Update settings in DB. More... | |
deleteSettings () | |
Delete settings from DB. More... | |
deleteAssignments () | |
Delete all assignments from the DB. More... | |
throwIfNotInTree () | |
Helper function to check, weather object is in tree. More... | |
nodeInserted (ilObjStudyProgramme $a_prg) | |
Clears child chache and adds progress for new node. More... | |
updateLastChange () | |
Update last change timestamp on this node and its parents. More... | |
getIdsFromNodesOnPathFromRootToHere () | |
Get the ids from the nodes in the path leading from the root node of this program to this node, including the id of this node. More... | |
getAssignmentsRaw () | |
Get model objects for the assignments on this programm. More... | |
Static Protected Member Functions | |
static | setProgressesCompletedIfParentIsProgrammeInLPCompletedMode ($a_ref_id, $a_obj_id, $a_user_id) |
static | getParentId (ilObject $a_object) |
Get the obj id of the parent object for the given object. More... | |
Protected Attributes | |
$settings | |
$parent | |
$children | |
$lp_children | |
$sp_user_progress_db | |
Protected Attributes inherited from ilContainer | |
$db | |
$log | |
$access | |
$error | |
$rbacsystem | |
$tree | |
$user | |
$obj_definition | |
$order_type = 0 | |
$hiddenfilesfound = false | |
$news_timeline = false | |
$news_timeline_auto_entries = false | |
$setting | |
$obj_trans = null | |
Protected Attributes inherited from ilObject | |
$objDefinition | |
$db | |
$log | |
$error | |
$tree | |
$app_event_handler | |
$rbacadmin | |
$rbacreview | |
Class ilObjStudyProgramme.
Definition at line 18 of file class.ilObjStudyProgramme.php.
ilObjStudyProgramme::__construct | ( | $a_id = 0 , |
|
$a_call_by_reference = true |
|||
) |
ATTENTION: After using the constructor the object won't be in the cache.
This could lead to unexpected behaviour when using the tree navigation.
int | $a_id | |
bool | $a_call_by_reference |
Definition at line 47 of file class.ilObjStudyProgramme.php.
References $DIC, $ilUser, $tree, clearChildrenCache(), clearLPChildrenCache(), clearParentCache(), settings(), and ilObjectFactoryWrapper\singleton().
|
static |
Get an instance of ilStudyProgrammeUserProgressDB.
Definition at line 93 of file class.ilObjStudyProgramme.php.
References $sp_user_progress_db.
Referenced by ilObjStudyProgrammeAccess\checkCondition(), ilObjStudyProgrammeGUI\executeCommand(), ilStudyProgrammeUserAssignment\getInstance(), ilStudyProgrammeUserAssignment\getInstancesForProgram(), and ilStudyProgrammeUserAssignment\getInstancesOfUser().
ilObjStudyProgramme::addLeaf | ( | $a_leaf | ) |
Insert a leaf in this object.
Throws when object already contain ilObjStudyProgrammes as children. Throws when this object is not in tree.
ilStudyProgrammeTreeException |
Definition at line 840 of file class.ilObjStudyProgramme.php.
References clearLPChildrenCache(), ilObject\getRefId(), hasChildren(), ilStudyProgramme\MODE_LP_COMPLETED, settings(), throwIfNotInTree(), and update().
ilObjStudyProgramme::addMissingProgresses | ( | ) |
Add missing progress records for all assignments of this programm.
Use this after the structure of the programme was modified.
Definition at line 1128 of file class.ilObjStudyProgramme.php.
References getAssignments().
Referenced by nodeInserted().
ilObjStudyProgramme::addNode | ( | ilObjStudyProgramme | $a_prg | ) |
Inserts another ilObjStudyProgramme in this object.
Throws when object already contains non ilObjStudyProgrammes as children. Throws when $a_prg already is in the tree. Throws when this object is not in tree.
ilStudyProgrammeTreeException |
Definition at line 729 of file class.ilObjStudyProgramme.php.
References ilObject\createReference(), getLPMode(), ilObject\getRefId(), ilStudyProgramme\MODE_LP_COMPLETED, putInTree(), and throwIfNotInTree().
ilObjStudyProgramme::adjustLPMode | ( | ) |
Adjust the lp mode to match current state of tree:
If there are any non programme children, the mode is MODE_LP_COMPLETED, otherwise its MODE_POINTS.
ilException | when programme is not in draft mode. |
Definition at line 338 of file class.ilObjStudyProgramme.php.
References getAmountOfChildren(), getAmountOfLPChildren(), ilStudyProgramme\MODE_LP_COMPLETED, ilStudyProgramme\MODE_POINTS, ilStudyProgramme\MODE_UNDEFINED, and settings().
ilObjStudyProgramme::applyToSubTreeNodes | ( | Closure | $fun | ) |
Apply the given Closure to every node in the subtree starting at this object.
When the closure returns false, the underlying nodes won't be visited.
Throws when this object is not in tree.
Closure | $fun | - An anonymus function taking an ilObjStudyProgramme as parameter. |
Definition at line 674 of file class.ilObjStudyProgramme.php.
References getChildren(), and throwIfNotInTree().
Referenced by assignUser().
ilObjStudyProgramme::assignUser | ( | $a_usr_id, | |
$a_assigning_usr_id = null |
|||
) |
Assign a user to this node at the study program.
Throws when node is in DRAFT or OUTDATED status. Throws when there are no settings for the program.
TODO: Should it be allowed to assign inactive users?
ilException |
int | $a_usr_id | |
int | null | $a_assigning_usr_id | - defaults to global ilUser |
Definition at line 938 of file class.ilObjStudyProgramme.php.
References applyToSubTreeNodes(), ilStudyProgrammeAssignment\createFor(), createProgressForAssignment(), ilObject\getId(), getStatus(), getStudyProgrammeUserProgressDB(), settings(), ilStudyProgramme\STATUS_ACTIVE, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, and ilStudyProgrammeEvents\userAssigned().
ilObjStudyProgramme::canBeRemoved | ( | ) |
Check weather a node can be removed.
This is allowed when all progresses on the node are marked as not relevant programmatically.
Definition at line 818 of file class.ilObjStudyProgramme.php.
References getProgresses(), and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
Referenced by removeNode().
|
protected |
Clear the cached children.
Definition at line 116 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), moveTo(), nodeInserted(), and removeNode().
|
protected |
Clear the cached lp children.
Definition at line 124 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), addLeaf(), moveTo(), and removeLeaf().
|
protected |
Clear the cached parent to query it again at the tree.
Definition at line 107 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), moveTo(), and removeNode().
ilObjStudyProgramme::create | ( | ) |
Definition at line 236 of file class.ilObjStudyProgramme.php.
References ilObject\$id, and createSettings().
|
static |
Create an instance of ilObjStudyProgramme, put in cache.
Definition at line 148 of file class.ilObjStudyProgramme.php.
Referenced by ilObjStudyProgrammeTest\createSmallTree(), ilStudyProgrammeProgressCalculationTest\setUp(), ilStudyProgrammeLPTest\setUp(), ilStudyProgrammeUserAssignmentTest\setUp(), ilStudyProgrammeUserProgressTest\setUp(), ilStudyProgrammeEventsTest\setUp(), ilObjStudyProgrammeTest\setUp(), ilStudyProgrammeProgressCalculationTest\setUpNodes(), ilStudyProgrammeUserProgressTest\testCanBeCompleted3(), ilStudyProgrammeUserProgressTest\testCompletionOnDeeplyNestedProgresses(), ilStudyProgrammeLPTest\testNewNodesAreNotRelevant(), ilStudyProgrammeUserProgressTest\testNewNodesAreNotRelevant(), and ilObjStudyProgrammeTest\testTreeGetParents().
ilObjStudyProgramme::createProgressForAssignment | ( | ilStudyProgrammeAssignment | $ass | ) |
Create a progress on this programme for the given assignment.
ilStudyProgrammeAssignment |
Definition at line 1091 of file class.ilObjStudyProgramme.php.
References ilStudyProgrammeProgress\createFor(), and settings().
Referenced by assignUser().
|
protected |
Create new settings object.
Throws when settings are already loaded or id is null.
Definition at line 182 of file class.ilObjStudyProgramme.php.
References ilObject\$id, ilStudyProgramme\createForObject(), ilObject\getId(), and settings().
Referenced by create().
ilObjStudyProgramme::delete | ( | ) |
Delete Study Programme and all related data.
Definition at line 265 of file class.ilObjStudyProgramme.php.
References deleteAssignments(), and deleteSettings().
|
protected |
Delete all assignments from the DB.
Definition at line 222 of file class.ilObjStudyProgramme.php.
References getAssignments().
Referenced by delete().
|
protected |
Delete settings from DB.
Throws when settings are not loaded.
Definition at line 211 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by delete().
|
static |
Get a list of all ilObjStudyProgrammes in the subtree starting at $a_ref_id.
Throws when object is not in tree.
int | $a_ref_id |
Definition at line 439 of file class.ilObjStudyProgramme.php.
Referenced by ilObjStudyProgrammeTreeGUI\confirmedDelete(), ilObjStudyProgrammeTest\testMoveTo(), and ilObjStudyProgrammeTest\testTreeGetChildren().
ilObjStudyProgramme::getAmountOfAssignmentsOf | ( | $a_user_id | ) |
Get the amount of assignments a user has on this program node or any node above.
int | $a_user_id |
Definition at line 1017 of file class.ilObjStudyProgramme.php.
References getAssignmentsOf().
Referenced by hasAssignmentOf().
ilObjStudyProgramme::getAmountOfChildren | ( | ) |
Get the amount of other StudyProgrammes this StudyProgramme has as children.
Throws when this object is not in tree.
Definition at line 542 of file class.ilObjStudyProgramme.php.
References getChildren().
Referenced by adjustLPMode(), and hasChildren().
ilObjStudyProgramme::getAmountOfLPChildren | ( | ) |
Get the amount of leafs, the study programme contains.
Throws when this object is not in tree.
Definition at line 632 of file class.ilObjStudyProgramme.php.
References getLPChildren().
Referenced by adjustLPMode(), and hasLPChildren().
ilObjStudyProgramme::getAssignments | ( | ) |
Get all assignments to this program or any node above.
Definition at line 1050 of file class.ilObjStudyProgramme.php.
References getAssignmentsRaw(), and getStudyProgrammeUserProgressDB().
Referenced by addMissingProgresses(), deleteAssignments(), and hasAssignments().
ilObjStudyProgramme::getAssignmentsOf | ( | $a_user_id | ) |
Get the assignments of user at this program or any node above.
The assignments are ordered by last_change, where the most recently changed assignments is the first one.
int | $a_user_id |
Definition at line 1030 of file class.ilObjStudyProgramme.php.
References getIdsFromNodesOnPathFromRootToHere(), getStudyProgrammeUserProgressDB(), and ActiveRecord\where().
Referenced by getAmountOfAssignmentsOf().
|
protected |
Get model objects for the assignments on this programm.
Definition at line 1268 of file class.ilObjStudyProgramme.php.
References getIdsFromNodesOnPathFromRootToHere(), and ActiveRecord\where().
Referenced by getAssignments().
ilObjStudyProgramme::getChildren | ( | ) |
Get all ilObjStudyProgrammes that are direct children of this object.
Throws when this object is not in tree.
Definition at line 462 of file class.ilObjStudyProgramme.php.
References $children, ilContainerSorting\_getInstance(), ilObject\getId(), getInstanceByRefId(), ilObject\getRefId(), and throwIfNotInTree().
Referenced by applyToSubTreeNodes(), and getAmountOfChildren().
ilObjStudyProgramme::getCompletedCourses | ( | $a_user_id | ) |
Get courses in this program that the given user already completed.
int | $a_user_id |
Definition at line 691 of file class.ilObjStudyProgramme.php.
References ilLPStatus\_hasUserCompleted(), ilContainerReference\_lookupTargetId(), ilContainerReference\_lookupTargetTitle(), and ilObject\getRefId().
|
static |
Filter the list of possible subobjects for the objects that actually could be created on a concrete node.
Will be called by ilObjDefinition::getCreatableSubObjects.
array | $a_subobjects | |
int | $a_ref_id |
Definition at line 1388 of file class.ilObjStudyProgramme.php.
References $parent, ilObject\_lookupType(), getInstanceByRefId(), ilStudyProgramme\MODE_LP_COMPLETED, ilStudyProgramme\MODE_POINTS, and ilStudyProgramme\MODE_UNDEFINED.
Referenced by ilObjectDefinition\getCreatableSubObjects(), ilObjStudyProgrammeTest\testCreatableSubObjectsRaisesOnNonProgramRef(), ilObjStudyProgrammeTest\testCreatableSubObjectsWithoutRef(), and ilObjStudyProgrammeTest\testCreateableSubObjects().
ilObjStudyProgramme::getDepth | ( | ) |
Get the depth of this StudyProgramme in the tree starting at the topmost StudyProgramme (not root node of the repo tree!).
Root node has depth = 0.
Throws when this object is not in tree.
Definition at line 555 of file class.ilObjStudyProgramme.php.
|
protected |
Get the ids from the nodes in the path leading from the root node of this program to this node, including the id of this node.
Definition at line 1256 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and getParents().
Referenced by getAssignmentsOf(), and getAssignmentsRaw().
ilObjStudyProgramme::getIdsOfUsersWithCompletedProgress | ( | ) |
Get the ids of all users that have completed this programme.
Definition at line 1191 of file class.ilObjStudyProgramme.php.
References getProgresses().
ilObjStudyProgramme::getIdsOfUsersWithFailedProgress | ( | ) |
Get the ids of all users that have failed this programme.
Definition at line 1207 of file class.ilObjStudyProgramme.php.
References getProgresses().
ilObjStudyProgramme::getIdsOfUsersWithNotCompletedAndRelevantProgress | ( | ) |
Get the ids of all users that have not completed this programme but have a relevant progress on it.
Definition at line 1225 of file class.ilObjStudyProgramme.php.
References getProgresses().
ilObjStudyProgramme::getIdsOfUsersWithRelevantProgress | ( | ) |
Get the ids of all users that have a relevant progress at this programme.
Definition at line 1175 of file class.ilObjStudyProgramme.php.
References getProgresses().
|
static |
Get an instance of ilObjStudyProgramme, use cache.
int | $a_ref_id |
Definition at line 136 of file class.ilObjStudyProgramme.php.
Referenced by ilObjStudyProgrammeAccess\_checkAccess(), getChildren(), getCreatableSubObjects(), ilObjStudyProgrammeSettingsGUI\getObject(), getParent(), ilObjStudyProgrammeTreeExplorerGUI\getRootNode(), ilStudyProgrammeUserProgress\getStudyProgramme(), ilStudyProgrammeUserAssignment\getStudyProgramme(), ilStudyProgrammeAppEventListener\getStudyProgramme(), ilObjStudyProgrammeMembersGUI\getStudyProgramme(), putInTree(), setProgressesCompletedIfParentIsProgrammeInLPCompletedMode(), ilObjStudyProgrammeTest\testDelete(), ilObjStudyProgrammeTest\testGetInstanceByRefId(), ilObjStudyProgrammeTest\testLoadByObjId(), ilObjStudyProgrammeTest\testSettings(), and ilStudyProgrammeType\updateAssignedStudyProgrammesIcons().
ilObjStudyProgramme::getLastChange | ( | ) |
Get the timestamp of the last change on this program or sub program.
Definition at line 291 of file class.ilObjStudyProgramme.php.
References settings().
ilObjStudyProgramme::getLPChildren | ( | ) |
Get the leafs the study programme contains.
Throws when this object is not in tree.
Definition at line 586 of file class.ilObjStudyProgramme.php.
References $lp_children, ilContainerSorting\_getInstance(), ilObject\getId(), ilObject\getRefId(), and throwIfNotInTree().
Referenced by getAmountOfLPChildren(), and getLPChildrenIds().
ilObjStudyProgramme::getLPChildrenIds | ( | ) |
Get the ids of the leafs the program contains.
Throws when object is not in tree.
Definition at line 620 of file class.ilObjStudyProgramme.php.
References getLPChildren().
ilObjStudyProgramme::getLPMode | ( | ) |
Get the lp mode.
Definition at line 325 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by addNode(), and nodeInserted().
ilObjStudyProgramme::getParent | ( | ) |
Get the parent ilObjStudyProgramme of this object.
Returns null if parent is no StudyProgramme.
Throws when this object is not in tree.
Definition at line 490 of file class.ilObjStudyProgramme.php.
References $parent, getInstanceByRefId(), ilObject\getRefId(), and throwIfNotInTree().
Referenced by moveTo(), removeNode(), and updateLastChange().
|
staticprotected |
Get the obj id of the parent object for the given object.
Returns null if object is not in the tree currently.
Definition at line 1324 of file class.ilObjStudyProgramme.php.
References $DIC, $nd, $tree, and ilObject\getRefId().
ilObjStudyProgramme::getParents | ( | ) |
Get all parents of the node, where the root of the program comes first.
Definition at line 509 of file class.ilObjStudyProgramme.php.
References $current.
Referenced by getIdsFromNodesOnPathFromRootToHere(), and getRoot().
ilObjStudyProgramme::getPoints | ( | ) |
Get the amount of points.
Definition at line 301 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by ilObjStudyProgrammeSettingsGUI\buildForm().
ilObjStudyProgramme::getProgresses | ( | ) |
Get all progresses on this node.
Definition at line 1140 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and getStudyProgrammeUserProgressDB().
Referenced by canBeRemoved(), getIdsOfUsersWithCompletedProgress(), getIdsOfUsersWithFailedProgress(), getIdsOfUsersWithNotCompletedAndRelevantProgress(), getIdsOfUsersWithRelevantProgress(), hasProgresses(), and hasRelevantProgresses().
ilObjStudyProgramme::getProgressesOf | ( | $a_user_id | ) |
Get the progresses the user has on this node.
int | $a_user_id |
Definition at line 1102 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and getStudyProgrammeUserProgressDB().
ilObjStudyProgramme::getProgressForAssignment | ( | $a_assignment_id | ) |
Get the progress for an assignment on this node.
Throws when assignment does not belong to this program.
ilException |
int | $a_assignment_id |
Definition at line 1116 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and getStudyProgrammeUserProgressDB().
ilObjStudyProgramme::getRawSettings | ( | ) |
Get the underlying model of this program.
ATTENTION: Only use the model object if you know what you are doing.
Definition at line 1343 of file class.ilObjStudyProgramme.php.
References $DIC, $settings, ilObject\getId(), getSubType(), and ilObject\getType().
ilObjStudyProgramme::getRoot | ( | ) |
Get the ilObjStudyProgramme that is the root node of the tree this programme is in.
Throws when this object is not in tree.
Definition at line 573 of file class.ilObjStudyProgramme.php.
References getParents().
ilObjStudyProgramme::getStatus | ( | ) |
Get the status.
Definition at line 359 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by assignUser(), ilObjStudyProgrammeSettingsGUI\buildForm(), and isActive().
ilObjStudyProgramme::getStudyProgrammeUserProgressDB | ( | ) |
Get a (cached) instance of ilStudyProgrammeUserProgressDB.
Definition at line 80 of file class.ilObjStudyProgramme.php.
References $sp_user_progress_db.
Referenced by assignUser(), getAssignments(), getAssignmentsOf(), getProgresses(), getProgressesOf(), and getProgressForAssignment().
ilObjStudyProgramme::getSubType | ( | ) |
Gets the SubType Object.
Definition at line 416 of file class.ilObjStudyProgramme.php.
References getSubtypeId().
Referenced by getRawSettings(), and update().
ilObjStudyProgramme::getSubtypeId | ( | ) |
Gets the meta-data subtype id (allows to add additional meta-data based on a type)
Definition at line 392 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by ilObjStudyProgrammeSettingsGUI\buildForm(), getSubType(), and ilObjStudyProgrammeSettingsGUI\updateWith().
ilObjStudyProgramme::hasAssignmentOf | ( | $a_user_id | ) |
Check whether user is assigned to this program or any node above.
int | $a_user_id |
Definition at line 1005 of file class.ilObjStudyProgramme.php.
References getAmountOfAssignmentsOf().
ilObjStudyProgramme::hasAssignments | ( | ) |
Are there any assignments on this node or any node above?
Definition at line 1062 of file class.ilObjStudyProgramme.php.
References getAssignments().
ilObjStudyProgramme::hasChildren | ( | ) |
Does this StudyProgramme have other ilObjStudyProgrammes as children?
Throws when this object is not in tree.
Definition at line 529 of file class.ilObjStudyProgramme.php.
References getAmountOfChildren().
Referenced by addLeaf().
ilObjStudyProgramme::hasLPChildren | ( | ) |
Does this StudyProgramme has leafs?
Throws when this object is not in tree.
Definition at line 644 of file class.ilObjStudyProgramme.php.
References getAmountOfLPChildren().
ilObjStudyProgramme::hasProgresses | ( | ) |
Are there any users that have a progress on this programme?
Definition at line 1150 of file class.ilObjStudyProgramme.php.
References getProgresses().
ilObjStudyProgramme::hasRelevantProgresses | ( | ) |
Are there any users that have a relevant progress on this programme?
Definition at line 1160 of file class.ilObjStudyProgramme.php.
References getProgresses().
|
static |
Definition at line 68 of file class.ilObjStudyProgramme.php.
References ilObjStudyProgrammeCache\singleton().
ilObjStudyProgramme::isActive | ( | ) |
Check whether this programme is active.
Definition at line 382 of file class.ilObjStudyProgramme.php.
References getStatus(), and ilStudyProgramme\STATUS_ACTIVE.
ilObjStudyProgramme::moveTo | ( | ilObjStudyProgramme | $a_new_parent | ) |
Move this tree node to a new parent.
Throws, when manipulation of tree is not allowed due to invariants that need to hold on the tree.
ilStudyProgrammeTreeException |
int | $a_new_parent_ref_id |
Definition at line 893 of file class.ilObjStudyProgramme.php.
References $DIC, $parent, ilObject\$rbacadmin, clearChildrenCache(), clearLPChildrenCache(), clearParentCache(), getParent(), and ilObject\getRefId().
|
protected |
Clears child chache and adds progress for new node.
Definition at line 751 of file class.ilObjStudyProgramme.php.
References addMissingProgresses(), clearChildrenCache(), getLPMode(), ilStudyProgramme\MODE_LP_COMPLETED, ilStudyProgramme\MODE_POINTS, and settings().
ilObjStudyProgramme::putInTree | ( | $a_parent_ref | ) |
Overwritten from ilObject.
Calls nodeInserted on parent object if parent object is another program.
Definition at line 771 of file class.ilObjStudyProgramme.php.
References $res, ilObject\_lookupType(), and getInstanceByRefId().
Referenced by addNode().
ilObjStudyProgramme::read | ( | ) |
Definition at line 229 of file class.ilObjStudyProgramme.php.
References readSettings().
|
protected |
Load Settings from DB.
Throws when settings are already loaded or id is null.
Definition at line 166 of file class.ilObjStudyProgramme.php.
References ilObject\$id, ilObject\getId(), and settings().
Referenced by read().
ilObjStudyProgramme::removeAssignment | ( | ilStudyProgrammeUserAssignment | $a_assignment | ) |
Remove an assignment from this program.
Throws when assignment doesn't have this program as root node.
ilException |
Definition at line 982 of file class.ilObjStudyProgramme.php.
References ilStudyProgrammeUserAssignment\delete(), ilStudyProgrammeUserAssignment\getId(), ilObject\getId(), ilStudyProgrammeUserAssignment\getStudyProgramme(), and ilStudyProgrammeEvents\userDeassigned().
ilObjStudyProgramme::removeLeaf | ( | $a_leaf | ) |
Remove a leaf from this object.
Throws when leaf is not a child of this object. Throws, when manipulation of tree is not allowed due to invariants that need to hold on the tree.
ilException | |
ilStudyProgrammeTreeException |
Definition at line 870 of file class.ilObjStudyProgramme.php.
References clearLPChildrenCache(), and ilObject\getId().
ilObjStudyProgramme::removeNode | ( | ilObjStudyProgramme | $a_prg | ) |
Remove a node from this object.
Throws when node is no child of the object. Throws, when manipulation of tree is not allowed due to invariants that need to hold on the tree.
ilException | |
ilStudyProgrammTreeException |
Definition at line 793 of file class.ilObjStudyProgramme.php.
References canBeRemoved(), clearChildrenCache(), clearParentCache(), ilObject\getId(), getParent(), and ilObject\getRefId().
ilObjStudyProgramme::setPoints | ( | $a_points | ) |
Set the amount of points.
integer | $a_points | - larger than zero |
ilException |
Definition at line 313 of file class.ilObjStudyProgramme.php.
References settings(), and updateLastChange().
Referenced by ilObjStudyProgrammeSettingsGUI\updateWith().
|
static |
Set all progresses to completed where the object with given id is a leaf and that belong to the user.
Definition at line 1281 of file class.ilObjStudyProgramme.php.
References ilObject\$ref_id, ilObject\$type, ilObject\_getAllReferences(), ilContainerReference\_lookupSourceIds(), and ilObject\_lookupType().
Referenced by ilStudyProgrammeAppEventListener\onServiceTrackingUpdateStatus().
|
staticprotected |
Definition at line 1300 of file class.ilObjStudyProgramme.php.
References $DIC, $tree, getInstanceByRefId(), and ilStudyProgramme\MODE_LP_COMPLETED.
ilObjStudyProgramme::setStatus | ( | $a_status | ) |
Set the status of the node.
integer | $a_status | - one of ilStudyProgramme::$STATUS |
Definition at line 370 of file class.ilObjStudyProgramme.php.
References settings(), and updateLastChange().
Referenced by ilObjStudyProgrammeSettingsGUI\updateWith().
ilObjStudyProgramme::setSubtypeId | ( | $a_subtype_id | ) |
Sets the meta-data subtype id.
$a_subtype_id |
Definition at line 405 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by ilObjStudyProgrammeSettingsGUI\updateWith().
|
protected |
Helper function to check, weather object is in tree.
Throws ilStudyProgrammeTreeException if object is not in tree.
Definition at line 653 of file class.ilObjStudyProgramme.php.
Referenced by addLeaf(), addNode(), applyToSubTreeNodes(), getChildren(), getLPChildren(), and getParent().
ilObjStudyProgramme::update | ( | ) |
Definition at line 245 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), getSubType(), ilAdvancedMDRecord\saveObjRecSelection(), League\Flysystem\Adapter\Polyfill\update(), and updateSettings().
Referenced by addLeaf(), updateLastChange(), and ilObjStudyProgrammeSettingsGUI\updateWith().
ilObjStudyProgramme::updateAllAssignments | ( | ) |
Update all assignments to this program node.
Definition at line 1072 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and ilStudyProgrammeUserAssignment\getInstancesForProgram().
|
protected |
Update last change timestamp on this node and its parents.
Definition at line 1243 of file class.ilObjStudyProgramme.php.
References $parent, getParent(), settings(), and update().
Referenced by setPoints(), and setStatus().
|
protected |
Update settings in DB.
Throws when settings are not loaded.
Definition at line 199 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by update().
|
protected |
Definition at line 22 of file class.ilObjStudyProgramme.php.
Referenced by getChildren().
ilObjStudyProgramme::$ilUser |
Definition at line 28 of file class.ilObjStudyProgramme.php.
Referenced by __construct().
|
protected |
Definition at line 23 of file class.ilObjStudyProgramme.php.
Referenced by getLPChildren().
ilObjStudyProgramme::$object_factory |
Definition at line 31 of file class.ilObjStudyProgramme.php.
|
protected |
Definition at line 21 of file class.ilObjStudyProgramme.php.
Referenced by getCreatableSubObjects(), getParent(), moveTo(), and updateLastChange().
|
protected |
Definition at line 20 of file class.ilObjStudyProgramme.php.
Referenced by getRawSettings().
|
protected |
Definition at line 38 of file class.ilObjStudyProgramme.php.
Referenced by _getStudyProgrammeUserProgressDB(), and getStudyProgrammeUserProgressDB().
|
static |
Definition at line 33 of file class.ilObjStudyProgramme.php.
ilObjStudyProgramme::$tree |
Definition at line 27 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), getParentId(), and setProgressesCompletedIfParentIsProgrammeInLPCompletedMode().
ilObjStudyProgramme::$webdir |
Definition at line 26 of file class.ilObjStudyProgramme.php.