ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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... | |
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... | |
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... | |
updateCustomIcon () | |
updates the selected custom icon in container folder by type More... | |
saveIcons ($a_custom_icon) | |
save container icons More... | |
Public Member Functions inherited from ilContainer | |
__construct ($a_id=0, $a_reference=true) | |
createContainerDirectory () | |
Create directory for the container. More... | |
getContainerDirectory () | |
Get the container directory. More... | |
getBigIconPath () | |
Get path for big icon. More... | |
getSmallIconPath () | |
Get path for small icon. More... | |
getTinyIconPath () | |
Get path for tiny icon. More... | |
getCustomIconPath () | |
Get path for custom icon. 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... | |
saveIcons ($a_custom_icon) | |
save container icons More... | |
removeCustomIcon () | |
remove small icon More... | |
cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false) | |
Clone container settings. 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... | |
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... | |
update () | |
Update. More... | |
read () | |
read More... | |
readContainerSettings () | |
Read container settings. 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... | |
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... | |
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 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 () | |
cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false) | |
Clone object permissions, put in tree ... More... | |
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 | 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 | _lookupIconPath ($a_id, $a_size="big") |
lookup icon path More... | |
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 | _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 type $ilDB. 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 | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Get icon for repository item. 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 | |
$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 |
$ilias | |
$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... | |
Static Protected Member Functions inherited from ilContainer | |
static | fixInternalLinksAfterCopy ($a_target_id, $a_copy_id, $a_source_ref_id) |
Fix internal links after copy process. More... | |
Protected Attributes | |
$settings | |
$parent | |
$children | |
$lp_children | |
Protected Attributes inherited from ilContainer | |
$order_type = 0 | |
$hiddenfilesfound = false | |
$news_timeline = false | |
$news_timeline_auto_entries = false | |
$setting | |
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 40 of file class.ilObjStudyProgramme.php.
References $DIC, $ilUser, $tree, clearChildrenCache(), clearLPChildrenCache(), clearParentCache(), settings(), and ilObjectFactoryWrapper\singleton().
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 759 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 1035 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 653 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 281 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 600 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 854 of file class.ilObjStudyProgramme.php.
References applyToSubTreeNodes(), ilStudyProgrammeAssignment\createFor(), createProgressForAssignment(), ilObject\getId(), getStatus(), 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 738 of file class.ilObjStudyProgramme.php.
References getProgresses(), and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
Referenced by removeNode().
|
protected |
Clear the cached children.
Definition at line 76 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), moveTo(), nodeInserted(), and removeNode().
|
protected |
Clear the cached lp children.
Definition at line 83 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 68 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), moveTo(), and removeNode().
ilObjStudyProgramme::create | ( | ) |
Definition at line 186 of file class.ilObjStudyProgramme.php.
References ilObject\$id, and createSettings().
|
static |
Create an instance of ilObjStudyProgramme, put in cache.
Definition at line 105 of file class.ilObjStudyProgramme.php.
Referenced by ilObjStudyProgrammeTest\createSmallTree(), ilStudyProgrammeLPTest\setUp(), ilStudyProgrammeUserAssignmentTest\setUp(), ilStudyProgrammeUserProgressTest\setUp(), ilStudyProgrammeProgressCalculationTest\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 999 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 137 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 213 of file class.ilObjStudyProgramme.php.
References deleteAssignments(), and deleteSettings().
|
protected |
Delete all assignments from the DB.
Definition at line 174 of file class.ilObjStudyProgramme.php.
References getAssignments().
Referenced by delete().
|
protected |
Delete settings from DB.
Throws when settings are not loaded.
Definition at line 164 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 377 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 930 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 476 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 561 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 961 of file class.ilObjStudyProgramme.php.
References getAssignmentsRaw().
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 942 of file class.ilObjStudyProgramme.php.
References array, getIdsFromNodesOnPathFromRootToHere(), and ActiveRecord\where().
Referenced by getAmountOfAssignmentsOf().
|
protected |
Get model objects for the assignments on this programm.
Definition at line 1150 of file class.ilObjStudyProgramme.php.
References array, 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 399 of file class.ilObjStudyProgramme.php.
References $children, ilContainerSorting\_getInstance(), array, 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 616 of file class.ilObjStudyProgramme.php.
References ilLPStatus\_hasUserCompleted(), ilContainerReference\_lookupTargetId(), ilContainerReference\_lookupTargetTitle(), array, 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 1259 of file class.ilObjStudyProgramme.php.
References $parent, ilObject\_lookupType(), array, 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 488 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 1139 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 1094 of file class.ilObjStudyProgramme.php.
References array, and 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 1110 of file class.ilObjStudyProgramme.php.
References array, and getProgresses().
ilObjStudyProgramme::getIdsOfUsersWithRelevantProgress | ( | ) |
Get the ids of all users that have a relevant progress at this programme.
Definition at line 1079 of file class.ilObjStudyProgramme.php.
References array, and getProgresses().
|
static |
Get an instance of ilObjStudyProgramme, use cache.
int | $a_ref_id |
Definition at line 94 of file class.ilObjStudyProgramme.php.
Referenced by ilObjStudyProgrammeAccess\_checkAccess(), getChildren(), getCreatableSubObjects(), ilObjStudyProgrammeSettingsGUI\getObject(), getParent(), ilObjStudyProgrammeTreeExplorerGUI\getRootNode(), ilStudyProgrammeUserAssignment\getStudyProgramme(), ilStudyProgrammeAppEventListener\getStudyProgramme(), ilStudyProgrammeUserProgress\getStudyProgramme(), ilObjStudyProgrammeMembersGUI\getStudyProgramme(), putInTree(), setProgressesCompletedIfParentIsProgrammeInLPCompletedMode(), ilObjStudyProgrammeTest\testDelete(), ilObjStudyProgrammeTest\testGetInstanceByRefId(), ilObjStudyProgrammeTest\testLoadByObjId(), and ilObjStudyProgrammeTest\testSettings().
ilObjStudyProgramme::getLastChange | ( | ) |
Get the timestamp of the last change on this program or sub program.
Definition at line 238 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 517 of file class.ilObjStudyProgramme.php.
References $lp_children, ilContainerSorting\_getInstance(), array, 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 550 of file class.ilObjStudyProgramme.php.
References getLPChildren().
ilObjStudyProgramme::getLPMode | ( | ) |
Get the lp mode.
Definition at line 269 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 426 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 1204 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 445 of file class.ilObjStudyProgramme.php.
References array.
Referenced by getIdsFromNodesOnPathFromRootToHere(), and getRoot().
ilObjStudyProgramme::getPoints | ( | ) |
Get the amount of points.
Definition at line 247 of file class.ilObjStudyProgramme.php.
References settings().
ilObjStudyProgramme::getProgresses | ( | ) |
Get all progresses on this node.
Definition at line 1046 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and ilStudyProgrammeUserProgress\getInstancesForProgram().
Referenced by canBeRemoved(), getIdsOfUsersWithCompletedProgress(), 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 1009 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and ilStudyProgrammeUserProgress\getInstancesForUser().
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 1023 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and ilStudyProgrammeUserProgress\getInstanceForAssignment().
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 1222 of file class.ilObjStudyProgramme.php.
References $settings.
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 505 of file class.ilObjStudyProgramme.php.
References getParents().
ilObjStudyProgramme::getStatus | ( | ) |
Get the status.
Definition at line 303 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by assignUser(), and isActive().
ilObjStudyProgramme::getSubType | ( | ) |
Gets the SubType Object.
Definition at line 355 of file class.ilObjStudyProgramme.php.
References array, and getSubtypeId().
Referenced by update(), and updateCustomIcon().
ilObjStudyProgramme::getSubtypeId | ( | ) |
Gets the meta-data subtype id (allows to add additional meta-data based on a type)
Definition at line 333 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by getSubType().
ilObjStudyProgramme::hasAssignmentOf | ( | $a_user_id | ) |
Check whether user is assigned to this program or any node above.
int | $a_user_id |
Definition at line 919 of file class.ilObjStudyProgramme.php.
References getAmountOfAssignmentsOf().
ilObjStudyProgramme::hasAssignments | ( | ) |
Are there any assignments on this node or any node above?
Definition at line 972 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 464 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 572 of file class.ilObjStudyProgramme.php.
References getAmountOfLPChildren().
ilObjStudyProgramme::hasProgresses | ( | ) |
Are there any users that have a progress on this programme?
Definition at line 1056 of file class.ilObjStudyProgramme.php.
References getProgresses().
ilObjStudyProgramme::hasRelevantProgresses | ( | ) |
Are there any users that have a relevant progress on this programme?
Definition at line 1065 of file class.ilObjStudyProgramme.php.
References getProgresses().
|
static |
Definition at line 59 of file class.ilObjStudyProgramme.php.
References ilObjStudyProgrammeCache\singleton().
ilObjStudyProgramme::isActive | ( | ) |
Check whether this programme is active.
Definition at line 324 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 810 of file class.ilObjStudyProgramme.php.
References $DIC, $parent, clearChildrenCache(), clearLPChildrenCache(), clearParentCache(), getParent(), and ilObject\getRefId().
|
protected |
Clears child chache and adds progress for new node.
Definition at line 674 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 693 of file class.ilObjStudyProgramme.php.
References $res, ilObject\_lookupType(), and getInstanceByRefId().
Referenced by addNode().
ilObjStudyProgramme::read | ( | ) |
Definition at line 180 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 122 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 897 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 788 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 714 of file class.ilObjStudyProgramme.php.
References canBeRemoved(), clearChildrenCache(), clearParentCache(), ilObject\getId(), getParent(), and ilObject\getRefId().
ilObjStudyProgramme::saveIcons | ( | $a_custom_icon | ) |
save container icons
Definition at line 1292 of file class.ilObjStudyProgramme.php.
References $DIC, $ilDB, ilContainer\_writeContainerSetting(), ilContainer\createContainerDirectory(), ilContainer\getContainerDirectory(), ilObject\getId(), and ilUtil\moveUploadedFile().
Referenced by updateCustomIcon().
ilObjStudyProgramme::setPoints | ( | $a_points | ) |
Set the amount of points.
integer | $a_points | - larger than zero |
ilException |
Definition at line 258 of file class.ilObjStudyProgramme.php.
References settings(), and updateLastChange().
|
static |
Set all progresses to completed where the object with given id is a leaf and that belong to the user.
Definition at line 1162 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 1181 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 313 of file class.ilObjStudyProgramme.php.
References settings(), and updateLastChange().
ilObjStudyProgramme::setSubtypeId | ( | $a_subtype_id | ) |
Sets the meta-data subtype id.
$a_subtype_id |
Definition at line 345 of file class.ilObjStudyProgramme.php.
References settings().
|
protected |
Helper function to check, weather object is in tree.
Throws ilStudyProgrammeTreeException if object is not in tree.
Definition at line 580 of file class.ilObjStudyProgramme.php.
Referenced by addLeaf(), addNode(), applyToSubTreeNodes(), getChildren(), getLPChildren(), and getParent().
ilObjStudyProgramme::update | ( | ) |
Definition at line 194 of file class.ilObjStudyProgramme.php.
References array, ilObject\getId(), getSubType(), ilAdvancedMDRecord\saveObjRecSelection(), and updateSettings().
Referenced by addLeaf(), and updateLastChange().
ilObjStudyProgramme::updateAllAssignments | ( | ) |
Update all assignments to this program node.
Definition at line 981 of file class.ilObjStudyProgramme.php.
References ilObject\getId(), and ilStudyProgrammeUserAssignment\getInstancesForProgram().
ilObjStudyProgramme::updateCustomIcon | ( | ) |
updates the selected custom icon in container folder by type
Definition at line 1230 of file class.ilObjStudyProgramme.php.
References getSubType(), ilContainer\removeCustomIcon(), and saveIcons().
|
protected |
Update last change timestamp on this node and its parents.
Definition at line 1127 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 153 of file class.ilObjStudyProgramme.php.
References settings().
Referenced by update().
|
protected |
Definition at line 21 of file class.ilObjStudyProgramme.php.
Referenced by getChildren().
ilObjStudyProgramme::$ilUser |
Definition at line 26 of file class.ilObjStudyProgramme.php.
Referenced by __construct().
|
protected |
Definition at line 22 of file class.ilObjStudyProgramme.php.
Referenced by getLPChildren().
ilObjStudyProgramme::$object_factory |
Definition at line 29 of file class.ilObjStudyProgramme.php.
|
protected |
Definition at line 20 of file class.ilObjStudyProgramme.php.
Referenced by getCreatableSubObjects(), getParent(), moveTo(), and updateLastChange().
|
protected |
Definition at line 19 of file class.ilObjStudyProgramme.php.
Referenced by getRawSettings().
|
static |
Definition at line 31 of file class.ilObjStudyProgramme.php.
ilObjStudyProgramme::$tree |
Definition at line 25 of file class.ilObjStudyProgramme.php.
Referenced by __construct(), getParentId(), and setProgressesCompletedIfParentIsProgrammeInLPCompletedMode().