ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjCourse Class Reference

Class ilObjCourse. More...

+ Inheritance diagram for ilObjCourse:
+ Collaboration diagram for ilObjCourse:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 getShowMembersExport ()
 
 setShowMembersExport ($a_mem_export)
 
 getRegistrationAccessCode ()
 get access code More...
 
 setRegistrationAccessCode ($a_code)
 Set refistration access code. More...
 
 isRegistrationAccessCodeEnabled ()
 Check if access code is enabled. More...
 
 enableRegistrationAccessCode ($a_status)
 En/disable registration access code. More...
 
 getImportantInformation ()
 
 setImportantInformation ($a_info)
 
 getSyllabus ()
 
 setSyllabus ($a_syllabus)
 
 getTargetGroup ()
 
 setTargetGroup (?string $a_tg)
 
 getContactName ()
 
 setContactName ($a_cn)
 
 getContactConsultation ()
 
 setContactConsultation ($a_value)
 
 getContactPhone ()
 
 setContactPhone ($a_value)
 
 getContactEmail ()
 
 setContactEmail ($a_value)
 
 getContactResponsibility ()
 
 setContactResponsibility ($a_value)
 
 getActivationUnlimitedStatus ()
 get activation unlimited no start or no end More...
 
 getActivationStart ()
 
 setActivationStart ($a_value)
 
 getActivationEnd ()
 
 setActivationEnd ($a_value)
 
 setActivationVisibility ($a_value)
 
 getActivationVisibility ()
 
 getSubscriptionLimitationType ()
 
 setSubscriptionLimitationType ($a_type)
 
 getSubscriptionUnlimitedStatus ()
 
 getSubscriptionStart ()
 
 setSubscriptionStart ($a_value)
 
 getSubscriptionEnd ()
 
 setSubscriptionEnd ($a_value)
 
 getSubscriptionType ()
 
 setSubscriptionType ($a_value)
 
 getSubscriptionPassword ()
 
 setSubscriptionPassword ($a_value)
 
 enabledObjectiveView ()
 
 enabledWaitingList ()
 
 enableWaitingList ($a_status)
 
 inSubscriptionTime ()
 
 enableSessionLimit ($a_status)
 en/disable limited number of sessions More...
 
 isSessionLimitEnabled ()
 
 enableSubscriptionMembershipLimitation ($a_status)
 enable max members More...
 
 setNumberOfPreviousSessions ($a_num)
 Set number of previous sessions. More...
 
 getNumberOfPreviousSessions ()
 Set number of previous sessions. More...
 
 setNumberOfNextSessions ($a_num)
 Set number of previous sessions. More...
 
 getNumberOfNextSessions ()
 Set number of previous sessions. More...
 
 isSubscriptionMembershipLimited ()
 is membership limited More...
 
 getSubscriptionMaxMembers ()
 
 setSubscriptionMaxMembers ($a_value)
 
 getSubItems ( $a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
 Get subitems of container. More...
 
 getSubscriptionNotify ()
 
 setSubscriptionNotify ($a_value)
 
 setViewMode ($a_mode)
 
 getViewMode ()
 Get container view mode. More...
 
 setTimingMode ($a_mode)
 
 getTimingMode ()
 
 getArchiveStart ()
 
 setArchiveStart ($a_value)
 
 getArchiveEnd ()
 
 setArchiveEnd ($a_value)
 
 getArchiveType ()
 
 setArchiveType ($a_value)
 
 setAboStatus ($a_status)
 
 getAboStatus ()
 
 setShowMembers ($a_status)
 
 getShowMembers ()
 
 setMailToMembersType ($a_type)
 Set mail to members type. More...
 
 getMailToMembersType ()
 Get mail to members type. More...
 
 getMessage ()
 
 setMessage ($a_message)
 
 appendMessage ($a_message)
 
 isActivated ()
 Check if course is active and not offline. More...
 
 allowAbo ()
 
 read ()
 read More...
 
 create ($a_upload=false)
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set LocationZoom. More...
 
 getLocationZoom ()
 Get LocationZoom. More...
 
 setEnableCourseMap ($a_enablemap)
 Set Enable Course Map. More...
 
 getEnableMap ()
 Type independent wrapper. More...
 
 getEnableCourseMap ()
 Get Enable Course Map. More...
 
 setCoursePeriod (\ilDateTime $start=null, \ilDateTime $end=null)
 
 getCourseStartTimeIndication ()
 
 getCourseStart ()
 
 getCourseEnd ()
 
 setCancellationEnd (ilDate $a_value=null)
 
 getCancellationEnd ()
 
 setSubscriptionMinMembers ($a_value)
 
 getSubscriptionMinMembers ()
 
 setWaitingListAutoFill ($a_value)
 
 hasWaitingListAutoFill ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone course (no member data) More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (start objects, preconditions) More...
 
 cloneAutoGeneratedRoles ($new_obj)
 Clone automatic genrated roles (permissions and template permissions) More...
 
 validate ()
 
 validateInfoSettings ()
 
 hasContactData ()
 
 delete ()
 delete course and all related data More...
 
 update ()
 update complete object More...
 
 updateSettings ()
 Update settings. More...
 
 cloneSettings (\ilObjCourse $new_obj)
 Clone entries in settings table. More...
 
 __createDefaultSettings ()
 
 __readSettings ()
 
 initWaitingList ()
 
 getMemberObject ()
 Get course member object. More...
 
 getMembersObject ()
 
 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) @access public More...
 
 setParentRolePermissions ($a_parent_ref)
 This method is called before "initDefaultRoles". More...
 
 __getCrsNonMemberTemplateId ()
 get course non-member template @access private More...
 
 getLocalCourseRoles ($a_translate=false)
 get ALL local roles of course, also those created and defined afterwards only fetch data once from database. More...
 
 getDefaultCourseRoles ($a_crs_id="")
 get default course roles, returns the defaultlike create roles il_crs_tutor, il_crs_admin and il_crs_member @access public More...
 
 __getLocalRoles ()
 
 __deleteSettings ()
 
 getDefaultMemberRole ()
 
 getDefaultTutorRole ()
 
 getDefaultAdminRole ()
 
 MDUpdateListener ($a_element)
 Overwriten Metadata update listener for ECS functionalities. More...
 
 addAdditionalSubItemInformation (&$a_item_data)
 Add additional information to sub item, e.g. More...
 
 register ($a_user_id, $a_role=ilCourseConstants::CRS_MEMBER, $a_force_registration=false)
 
 getAutoNotification ()
 Returns automatic notification status from $this->auto_notification. More...
 
 setAutoNotification ($value)
 Sets automatic notification status in $this->auto_notification, using given $status. More...
 
 setStatusDetermination ($a_value)
 Set status determination mode. More...
 
 getStatusDetermination ()
 Get status determination mode. More...
 
 syncMembersStatusWithLP ()
 Set course status for all members by lp status. More...
 
 checkLPStatusSync ($a_member_id)
 sync course status from lp More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 handleAutoFill ()
 Handle course auto fill. More...
 
- Public Member Functions inherited from ilContainer
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 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)
 
 isClassificationFilterActive ()
 Is classification filter active? More...
 
 filteredSubtree ()
 Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs. More...
 
 getSubItems ( $a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
 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)
 maybe this method should be in tree object!?
Todo:
role/rbac stuff
Parameters
int$a_parent_refRef-ID of the parent object
More...
 
 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 @access 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 @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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 @access public More...
 
 getLastUpdateDate ()
 get last update date @access 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) @access 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...
 
- Public Member Functions inherited from ilMembershipRegistrationCodes
 register ($a_user_id)
 Register an user. More...
 

Static Public Member Functions

static lookupShowMembersEnabled ($a_obj_id)
 Check if show member is enabled. More...
 
static _isSubscriptionNotificationEnabled ($a_course_id)
 Check if subscription notification is enabled. More...
 
static lookupTimingMode ($a_obj_id)
 
static _lookupViewMode ($a_id)
 lookup view mode of container More...
 
static _lookupAboStatus ($a_id)
 
static _isActivated ($a_obj_id)
 Is activated. More...
 
static _registrationEnabled ($a_obj_id)
 Registration enabled? Method is in Access class, since it is needed by Access/ListGUI. More...
 
static lookupCourseNonMemberTemplatesId ()
 Lookup course non member id. More...
 
static _deleteUser ($a_usr_id)
 
static lookupObjectsByCode ($a_code)
 
static mayLeave ($a_course_id, $a_user_id=null, &$a_date=null)
 
static findCoursesWithNotEnoughMembers ()
 Minimum members check @global type $ilDB. 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, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 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@access public 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...
 
static lookupObjectsByCode ($a_code)
 Lookup all objects with reg_access_code enabled and. More...
 

Data Fields

const CAL_REG_START = 1
 
const CAL_REG_END = 2
 
const CAL_ACTIVATION_START = 3
 
const CAL_ACTIVATION_END = 4
 
const CAL_COURSE_START = 5
 
const CAL_COURSE_END = 6
 
const CAL_COURSE_TIMING_START = 7
 
const CAL_COURSE_TIMING_END = 8
 
const STATUS_DETERMINATION_LP = 1
 
const STATUS_DETERMINATION_MANUAL = 2
 
 $archives_obj
 
- 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
 

Protected Member Functions

 toggleCourseStartTimeIndication (bool $time_indication)
 
 setCourseStart (ilDateTime $a_value=null)
 
 setCourseEnd (ilDateTime $a_value=null)
 
 initCourseMemberObject ()
 Init course member object @global ilObjUser $ilUser. More...
 
 initCourseMembersObject ()
 Init course member object @global ilObjUser $ilUser. More...
 
 prepareAppointments ($a_mode='create')
 Prepare calendar appointments. More...
 
- Protected Member Functions inherited from ilContainer
 getInitialSubitems ()
 Get initial subitems. More...
 
 applyContainerUserFilter ($objects, ilContainerUserFilter $container_user_filter=null)
 Apply container user filter on objects. More...
 
 legacyOnlineFilter ($obj_ids, $objects, $val)
 Legacy online filter. More...
 

Protected Attributes

 $course_logger = null
 
 $course_start_time_indication = false
 
 $crs_start
 
 $crs_end
 
 $leave_end
 
 $min_members
 
 $auto_fill_from_waiting
 
 $member_export = false
 
- Protected Attributes inherited from ilContainer
 $news
 
 $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
 
 $recommended_content_manager
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Private Attributes

 $member_obj = null
 
 $members_obj = null
 
 $latitude = ''
 
 $longitude = ''
 
 $locationzoom = 0
 
 $enablemap = 0
 
 $session_limit = 0
 
 $session_prev = -1
 
 $session_next = -1
 
 $reg_access_code = ''
 
 $reg_access_code_enabled = false
 
 $status_dt = null
 
 $mail_members = ilCourseConstants::MAIL_ALLOWED_ALL
 
 $timing_mode = ilCourseConstants::IL_CRS_VIEW_TIMING_ABSOLUTE
 
 $auto_notification = true
 
 $target_group = ''
 

Additional Inherited Members

- Static Public Attributes inherited from ilContainer
static $data_preloaded = false
 

Detailed Description

Class ilObjCourse.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilObjCourse::__construct (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor @access public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Reimplemented from ilContainer.

Definition at line 125 of file class.ilObjCourse.php.

126 {
127
128 #define("ILIAS_MODULE","course");
129 #define("KEEP_IMAGE_PATH",1);
130
131 $this->SUBSCRIPTION_DEACTIVATED = 1;
132 $this->SUBSCRIPTION_CONFIRMATION = 2;
133 $this->SUBSCRIPTION_DIRECT = 3;
134 $this->SUBSCRIPTION_PASSWORD = 4;
135 $this->SUBSCRIPTION_AUTOSUBSCRIPTION = 5;
136 $this->ARCHIVE_DISABLED = 1;
137 $this->ARCHIVE_READ = 2;
138 $this->ARCHIVE_DOWNLOAD = 3;
139 $this->ABO_ENABLED = 1;
140 $this->ABO_DISABLED = 0;
141 $this->SHOW_MEMBERS_ENABLED = 1;
142 $this->SHOW_MEMBERS_DISABLED = 0;
143 $this->setStatusDetermination(self::STATUS_DETERMINATION_LP);
144
145 $this->type = "crs";
146
147 $this->course_logger = $GLOBALS['DIC']->logger()->crs();
148
149 parent::__construct($a_id, $a_call_by_reference);
150 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
setStatusDetermination($a_value)
Set status determination mode.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $GLOBALS, ILIAS\GlobalScreen\Provider\__construct(), and setStatusDetermination().

+ Here is the call graph for this function:

Member Function Documentation

◆ __createDefaultSettings()

ilObjCourse::__createDefaultSettings ( )

Definition at line 1425 of file class.ilObjCourse.php.

1426 {
1427 global $DIC;
1428
1429 $ilDB = $DIC['ilDB'];
1430
1431 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1433
1434 $query = "INSERT INTO crs_settings (obj_id,syllabus,contact_name,contact_responsibility," .
1435 "contact_phone,contact_email,contact_consultation," .
1436 "sub_limitation_type,sub_start,sub_end,sub_type,sub_password,sub_mem_limit," .
1437 "sub_max_members,sub_notify,view_mode,timing_mode,abo," .
1438 "latitude,longitude,location_zoom,enable_course_map,waiting_list,show_members,show_members_export, " .
1439 "session_limit,session_prev,session_next, reg_ac_enabled, reg_ac, auto_notification, status_dt,mail_members_type) " .
1440 "VALUES( " .
1441 $ilDB->quote($this->getId(), 'integer') . ", " .
1442 $ilDB->quote($this->getSyllabus(), 'text') . ", " .
1443 $ilDB->quote($this->getContactName(), 'text') . ", " .
1444 $ilDB->quote($this->getContactResponsibility(), 'text') . ", " .
1445 $ilDB->quote($this->getContactPhone(), 'text') . ", " .
1446 $ilDB->quote($this->getContactEmail(), 'text') . ", " .
1447 $ilDB->quote($this->getContactConsultation(), 'text') . ", " .
1448 $ilDB->quote(IL_CRS_SUBSCRIPTION_DEACTIVATED, 'integer') . ", " .
1449 $ilDB->quote($this->getSubscriptionStart(), 'integer') . ", " .
1450 $ilDB->quote($this->getSubscriptionEnd(), 'integer') . ", " .
1451 $ilDB->quote(IL_CRS_SUBSCRIPTION_DIRECT, 'integer') . ", " .
1452 $ilDB->quote($this->getSubscriptionPassword(), 'text') . ", " .
1453 "0, " .
1454 $ilDB->quote($this->getSubscriptionMaxMembers(), 'integer') . ", " .
1455 "1, " .
1456 "0, " .
1457 $ilDB->quote(IL_CRS_VIEW_TIMING_ABSOLUTE, 'integer') . ', ' .
1458 $ilDB->quote($this->ABO_ENABLED, 'integer') . ", " .
1459 $ilDB->quote($this->getLatitude(), 'text') . ", " .
1460 $ilDB->quote($this->getLongitude(), 'text') . ", " .
1461 $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
1462 $ilDB->quote($this->getEnableCourseMap(), 'integer') . ", " .
1463 #"objective_view = '0', ".
1464 "1, " .
1465 "1," .
1466 '0,' .
1467 $ilDB->quote($this->isSessionLimitEnabled(), 'integer') . ', ' .
1468 $ilDB->quote($this->getNumberOfPreviousSessions(), 'integer') . ', ' .
1469 $ilDB->quote($this->getNumberOfPreviousSessions(), 'integer') . ', ' .
1470 $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
1471 $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
1472 $ilDB->quote((int) $this->getAutoNotification(), 'integer') . ', ' .
1473 $ilDB->quote((int) $this->getStatusDetermination(), 'integer') . ', ' .
1474 $ilDB->quote((int) $this->getMailToMembersType(), 'integer') . ' ' .
1475 ")";
1476
1477 $res = $ilDB->manipulate($query);
1478 $this->__readSettings();
1479
1480 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
1481 $sorting = new ilContainerSortingSettings($this->getId());
1482 $sorting->setSortMode(ilContainer::SORT_MANUAL);
1483 $sorting->update();
1484 }
const IL_CRS_VIEW_TIMING_ABSOLUTE
const IL_CRS_SUBSCRIPTION_DEACTIVATED
const IL_CRS_SUBSCRIPTION_DIRECT
static generateCode()
Generate new registration key.
getMailToMembersType()
Get mail to members type.
getLatitude()
Get Latitude.
setRegistrationAccessCode($a_code)
Set refistration access code.
getLocationZoom()
Get LocationZoom.
getEnableCourseMap()
Get Enable Course Map.
getRegistrationAccessCode()
get access code
getStatusDetermination()
Get status determination mode.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getAutoNotification()
Returns automatic notification status from $this->auto_notification.
getNumberOfPreviousSessions()
Set number of previous sessions.
getLongitude()
Get Longitude.
getId()
get object id @access public
global $DIC
Definition: goto.php:24
$query
foreach($_POST as $key=> $value) $res
global $ilDB

References $DIC, $ilDB, $query, $res, __readSettings(), ilMembershipRegistrationCodeUtils\generateCode(), getAutoNotification(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getEnableCourseMap(), ilObject\getId(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getNumberOfPreviousSessions(), getRegistrationAccessCode(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionMaxMembers(), getSubscriptionPassword(), getSubscriptionStart(), getSyllabus(), IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_VIEW_TIMING_ABSOLUTE, isRegistrationAccessCodeEnabled(), isSessionLimitEnabled(), setRegistrationAccessCode(), and ilContainer\SORT_MANUAL.

Referenced by create(), and updateSettings().

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

◆ __deleteSettings()

ilObjCourse::__deleteSettings ( )

Definition at line 1828 of file class.ilObjCourse.php.

1829 {
1830 global $DIC;
1831
1832 $ilDB = $DIC['ilDB'];
1833
1834 $query = "DELETE FROM crs_settings " .
1835 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer') . " ";
1836 $res = $ilDB->manipulate($query);
1837
1838 return true;
1839 }

References $DIC, $ilDB, $query, $res, and ilObject\getId().

Referenced by delete().

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

◆ __getCrsNonMemberTemplateId()

ilObjCourse::__getCrsNonMemberTemplateId ( )

get course non-member template @access private

Parameters
returnobj_id of roletemplate containing permissionsettings for non-member roles of a course.

Definition at line 1704 of file class.ilObjCourse.php.

1705 {
1706 global $DIC;
1707
1708 $ilDB = $DIC['ilDB'];
1709
1710 $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_crs_non_member'";
1711 $res = $this->ilias->db->query($q);
1712 $row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
1713
1714 return $row["obj_id"];
1715 }
redirection script todo: (a better solution should control the processing via a xml file)

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by setParentRolePermissions().

+ Here is the caller graph for this function:

◆ __getLocalRoles()

ilObjCourse::__getLocalRoles ( )

Definition at line 1817 of file class.ilObjCourse.php.

1818 {
1819 global $DIC;
1820
1821 $rbacreview = $DIC['rbacreview'];
1822
1823 // GET role_objects of predefined roles
1824
1825 return $rbacreview->getRolesOfRoleFolder($this->getRefId(), false);
1826 }
getRefId()
get reference id @access public

References $DIC, ilObject\$rbacreview, and ilObject\getRefId().

Referenced by getDefaultAdminRole(), getDefaultMemberRole(), and getDefaultTutorRole().

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

◆ __readSettings()

ilObjCourse::__readSettings ( )

Definition at line 1487 of file class.ilObjCourse.php.

1488 {
1489 global $DIC;
1490
1491 $ilDB = $DIC['ilDB'];
1492
1493 $query = "SELECT * FROM crs_settings WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer') . "";
1494
1495 $res = $ilDB->query($query);
1496 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1497 $this->setSyllabus($row->syllabus);
1498 $this->setTargetGroup($row->target_group);
1499 $this->setContactName($row->contact_name);
1500 $this->setContactResponsibility($row->contact_responsibility);
1501 $this->setContactPhone($row->contact_phone);
1502 $this->setContactEmail($row->contact_email);
1503 $this->setContactConsultation($row->contact_consultation);
1504 $this->setOfflineStatus(!(bool) $row->activation_type); // see below
1505 $this->setSubscriptionLimitationType($row->sub_limitation_type);
1506 $this->setSubscriptionStart($row->sub_start);
1507 $this->setSubscriptionEnd($row->sub_end);
1508 $this->setSubscriptionType($row->sub_type);
1509 $this->setSubscriptionPassword($row->sub_password);
1510 $this->enableSubscriptionMembershipLimitation($row->sub_mem_limit);
1511 $this->setSubscriptionMaxMembers($row->sub_max_members);
1512 $this->setSubscriptionNotify($row->sub_notify);
1513 $this->setViewMode($row->view_mode);
1514 $this->setTimingMode((int) $row->timing_mode);
1515 $this->setAboStatus($row->abo);
1516 $this->enableWaitingList($row->waiting_list);
1517 $this->setImportantInformation($row->important);
1518 $this->setShowMembers($row->show_members);
1519
1520 if (\ilPrivacySettings::_getInstance()->participantsListInCoursesEnabled()) {
1521 $this->setShowMembersExport($row->show_members_export);
1522 } else {
1523 $this->setShowMembersExport(false);
1524 }
1525 $this->setLatitude($row->latitude);
1526 $this->setLongitude($row->longitude);
1527 $this->setLocationZoom($row->location_zoom);
1528 $this->setEnableCourseMap($row->enable_course_map);
1529 $this->enableSessionLimit($row->session_limit);
1530 $this->setNumberOfPreviousSessions($row->session_prev);
1531 $this->setNumberOfNextSessions($row->session_next);
1532 $this->enableRegistrationAccessCode($row->reg_ac_enabled);
1533 $this->setRegistrationAccessCode($row->reg_ac);
1534 $this->setAutoNotification($row->auto_notification == 1 ? true : false);
1535 $this->setStatusDetermination((int) $row->status_dt);
1536 $this->setMailToMembersType($row->mail_members_type);
1537
1538 if ($row->period_time_indication) {
1539 $this->setCoursePeriod(
1540 new \ilDateTime($row->period_start, IL_CAL_DATETIME, \ilTimeZone::UTC),
1541 new \ilDateTime($row->period_end, IL_CAL_DATETIME, \ilTimeZone::UTC)
1542 );
1543 } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
1544 $this->setCoursePeriod(
1545 new \ilDate($row->period_start, IL_CAL_DATE),
1546 new \ilDate($row->period_end, IL_CAL_DATE)
1547 );
1548 }
1549 $this->toggleCourseStartTimeIndication((bool) $row->period_time_indication);
1550 $this->setCancellationEnd($row->leave_end ? new ilDate($row->leave_end, IL_CAL_UNIX) : null);
1551 $this->setWaitingListAutoFill($row->auto_wait);
1552 $this->setSubscriptionMinMembers($row->min_members ? $row->min_members : null);
1553 }
1554
1555 // moved activation to ilObjectActivation
1556 if ($this->ref_id) {
1557 include_once "./Services/Object/classes/class.ilObjectActivation.php";
1558 $activation = ilObjectActivation::getItem($this->ref_id);
1559 switch ($activation["timing_type"]) {
1561 $this->setActivationStart($activation["timing_start"]);
1562 $this->setActivationEnd($activation["timing_end"]);
1563 $this->setActivationVisibility($activation["visible"]);
1564 break;
1565 }
1566 }
1567 return true;
1568 }
const IL_CAL_DATE
const IL_CAL_UNIX
const IL_CAL_DATETIME
@classDescription Date and time handling
Class for single dates.
setTargetGroup(?string $a_tg)
setLongitude($a_longitude)
Set Longitude.
setActivationStart($a_value)
setSubscriptionNotify($a_value)
setTimingMode($a_mode)
enableWaitingList($a_status)
setShowMembersExport($a_mem_export)
enableSubscriptionMembershipLimitation($a_status)
enable max members
enableSessionLimit($a_status)
en/disable limited number of sessions
setNumberOfNextSessions($a_num)
Set number of previous sessions.
setWaitingListAutoFill($a_value)
setSubscriptionType($a_value)
setContactEmail($a_value)
setActivationEnd($a_value)
setContactPhone($a_value)
setSubscriptionEnd($a_value)
setLatitude($a_latitude)
Set Latitude.
enableRegistrationAccessCode($a_status)
En/disable registration access code.
setSubscriptionMaxMembers($a_value)
toggleCourseStartTimeIndication(bool $time_indication)
setShowMembers($a_status)
setMailToMembersType($a_type)
Set mail to members type.
setCoursePeriod(\ilDateTime $start=null, \ilDateTime $end=null)
setSubscriptionPassword($a_value)
setSubscriptionStart($a_value)
setImportantInformation($a_info)
setNumberOfPreviousSessions($a_num)
Set number of previous sessions.
setContactConsultation($a_value)
setSyllabus($a_syllabus)
setSubscriptionMinMembers($a_value)
setContactResponsibility($a_value)
setAboStatus($a_status)
setViewMode($a_mode)
setEnableCourseMap($a_enablemap)
Set Enable Course Map.
setSubscriptionLimitationType($a_type)
setCancellationEnd(ilDate $a_value=null)
setLocationZoom($a_locationzoom)
Set LocationZoom.
setAutoNotification($value)
Sets automatic notification status in $this->auto_notification, using given $status.
setActivationVisibility($a_value)
static getItem($a_ref_id)
Get item data.
setOfflineStatus($a_status)
Set offline status.
static _getInstance()
Get instance of ilPrivacySettings.

References $DIC, $ilDB, $query, $res, ilPrivacySettings\_getInstance(), enableRegistrationAccessCode(), enableSessionLimit(), enableSubscriptionMembershipLimitation(), enableWaitingList(), ilDBConstants\FETCHMODE_OBJECT, ilObject\getId(), ilObjectActivation\getItem(), IL_CAL_DATE, IL_CAL_DATETIME, IL_CAL_UNIX, setAboStatus(), setActivationEnd(), setActivationStart(), setActivationVisibility(), setAutoNotification(), setCancellationEnd(), setContactConsultation(), setContactEmail(), setContactName(), setContactPhone(), setContactResponsibility(), setCoursePeriod(), setEnableCourseMap(), setImportantInformation(), setLatitude(), setLocationZoom(), setLongitude(), setMailToMembersType(), setNumberOfNextSessions(), setNumberOfPreviousSessions(), ilObject\setOfflineStatus(), setRegistrationAccessCode(), setShowMembers(), setShowMembersExport(), setStatusDetermination(), setSubscriptionEnd(), setSubscriptionLimitationType(), setSubscriptionMaxMembers(), setSubscriptionMinMembers(), setSubscriptionNotify(), setSubscriptionPassword(), setSubscriptionStart(), setSubscriptionType(), setSyllabus(), setTargetGroup(), setTimingMode(), setViewMode(), setWaitingListAutoFill(), ilObjectActivation\TIMINGS_ACTIVATION, toggleCourseStartTimeIndication(), and ilTimeZone\UTC.

Referenced by __createDefaultSettings(), and read().

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

◆ _deleteUser()

static ilObjCourse::_deleteUser (   $a_usr_id)
static

Definition at line 1881 of file class.ilObjCourse.php.

1882 {
1883 // Delete all user related data
1884 // delete lm_history
1885 include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
1887
1888 include_once './Modules/Course/classes/class.ilCourseParticipants.php';
1890
1891 // Course objectives
1892 include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1894 }
static _deleteUser($a_usr_id)
Delete user @global type $ilDB.
static deleteResultsForUser($a_user_id)
Delete all result entries for user.
static _deleteUser($a_usr_id)
Delete user data.

References ilCourseLMHistory\_deleteUser(), ilParticipants\_deleteUser(), and ilLOUserResults\deleteResultsForUser().

Referenced by ilObjUser\delete().

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

◆ _isActivated()

static ilObjCourse::_isActivated (   $a_obj_id)
static

Is activated.

Method is in Access class, since it is needed by Access/ListGUI.

Parameters
intid of user
Returns
boolean

Definition at line 718 of file class.ilObjCourse.php.

719 {
720 include_once("./Modules/Course/classes/class.ilObjCourseAccess.php");
721 return ilObjCourseAccess::_isActivated($a_obj_id);
722 }
static _isActivated($a_obj_id, &$a_visible_flag=null, $a_mind_member_view=true)
Is activated?

References ilObjCourseAccess\_isActivated().

Referenced by ilStartUpGUI\_checkGoto(), and ilObjCourseGUI\executeCommand().

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

◆ _isSubscriptionNotificationEnabled()

static ilObjCourse::_isSubscriptionNotificationEnabled (   $a_course_id)
static

Check if subscription notification is enabled.

@access public

Parameters
intcourse_id

Definition at line 487 of file class.ilObjCourse.php.

488 {
489 global $DIC;
490
491 $ilDB = $DIC['ilDB'];
492
493 $query = "SELECT * FROM crs_settings " .
494 "WHERE obj_id = " . $ilDB->quote($a_course_id, 'integer') . " " .
495 "AND sub_notify = 1";
496 $res = $ilDB->query($query);
497 return $res->numRows() ? true : false;
498 }
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.

References $DIC, $ilDB, $query, $res, and true.

◆ _lookupAboStatus()

static ilObjCourse::_lookupAboStatus (   $a_id)
static

Definition at line 603 of file class.ilObjCourse.php.

604 {
605 global $DIC;
606
607 $ilDB = $DIC['ilDB'];
608
609 $query = "SELECT abo FROM crs_settings WHERE obj_id = " . $ilDB->quote($a_id, 'integer') . " ";
610 $res = $ilDB->query($query);
611 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
612 return $row->abo;
613 }
614 return false;
615 }

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilObjFolderGUI\modifyItemGUI(), ilObjGroupGUI\modifyItemGUI(), and ilObjSessionGUI\modifyItemGUI().

+ Here is the caller graph for this function:

◆ _lookupViewMode()

static ilObjCourse::_lookupViewMode (   $a_id)
static

lookup view mode of container

Parameters
int$a_id
Returns
mixed int | bool

Definition at line 589 of file class.ilObjCourse.php.

590 {
591 global $DIC;
592
593 $ilDB = $DIC['ilDB'];
594
595 $query = "SELECT view_mode FROM crs_settings WHERE obj_id = " . $ilDB->quote($a_id, 'integer') . " ";
596 $res = $ilDB->query($query);
597 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
598 return $row->view_mode;
599 }
600 return false;
601 }

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilObjCourseGUI\_modifyItemGUI(), ilCourseLP\checkObjectives(), ilCalendarScheduleFilterTimings\enabledCourseTimings(), ilObjFolderGUI\forwardToTimingsView(), ilPortfolioPageGUI\getCoursesOfUser(), and ilObjGroup\translateViewMode().

+ Here is the caller graph for this function:

◆ _registrationEnabled()

static ilObjCourse::_registrationEnabled (   $a_obj_id)
static

Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.

Parameters
intid of user
Returns
boolean

Definition at line 730 of file class.ilObjCourse.php.

731 {
732 include_once("./Modules/Course/classes/class.ilObjCourseAccess.php");
734 }
static _registrationEnabled($a_obj_id)

References ilObjCourseAccess\_registrationEnabled().

Referenced by ilStartUpGUI\_checkGoto(), and ilObjCourseGUI\executeCommand().

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

◆ addAdditionalSubItemInformation()

ilObjCourse::addAdditionalSubItemInformation ( $a_item_data)

Add additional information to sub item, e.g.

used in courses for timings information etc.

Reimplemented from ilContainer.

Definition at line 1927 of file class.ilObjCourse.php.

1928 {
1929 include_once './Services/Object/classes/class.ilObjectActivation.php';
1931 }
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.

References ilObjectActivation\addAdditionalSubItemInformation().

+ Here is the call graph for this function:

◆ allowAbo()

ilObjCourse::allowAbo ( )

Definition at line 737 of file class.ilObjCourse.php.

738 {
739 return $this->ABO == $this->ABO_ENABLED;
740 }

◆ appendMessage()

ilObjCourse::appendMessage (   $a_message)

Definition at line 685 of file class.ilObjCourse.php.

686 {
687 if ($this->getMessage()) {
688 $this->message .= "<br /> ";
689 }
690 $this->message .= $a_message;
691 }

References getMessage().

Referenced by validate().

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

◆ checkLPStatusSync()

ilObjCourse::checkLPStatusSync (   $a_member_id)

sync course status from lp

as lp data is not deleted on course exit new members may already have lp completed

Parameters
int$a_member_id

Definition at line 2220 of file class.ilObjCourse.php.

2221 {
2222 // #11113
2223 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
2226 include_once("Services/Tracking/classes/class.ilLPStatus.php");
2227 // #13811 - we need to suppress creation if status entry
2228 $has_completed = (ilLPStatus::_lookupStatus($this->getId(), $a_member_id, false) == ilLPStatus::LP_STATUS_COMPLETED_NUM);
2229 $this->getMembersObject()->updatePassed($a_member_id, $has_completed, false, true);
2230 }
2231 }
const LP_STATUS_COMPLETED_NUM
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
const STATUS_DETERMINATION_LP
static _enabledLearningProgress()
check wether learing progress is enabled or not

References ilObjUserTracking\_enabledLearningProgress(), ilLPStatus\_lookupStatus(), ilObject\getId(), getMembersObject(), getStatusDetermination(), ilLPStatus\LP_STATUS_COMPLETED_NUM, and STATUS_DETERMINATION_LP.

Referenced by handleAutoFill().

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

◆ cloneAutoGeneratedRoles()

ilObjCourse::cloneAutoGeneratedRoles (   $new_obj)

Clone automatic genrated roles (permissions and template permissions)

@access public

Parameters
objectnew course object

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

1095 {
1096 global $DIC;
1097
1098 $ilLog = $DIC['ilLog'];
1099 $rbacadmin = $DIC['rbacadmin'];
1100 $rbacreview = $DIC['rbacreview'];
1101
1102 $admin = $this->getDefaultAdminRole();
1103 $new_admin = $new_obj->getDefaultAdminRole();
1104
1105 if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
1106 $ilLog->write(__METHOD__ . ' : Error cloning auto generated role: il_crs_admin');
1107 }
1108 $rbacadmin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
1109 $ilLog->write(__METHOD__ . ' : Finished copying of role crs_admin.');
1110
1111 $tutor = $this->getDefaultTutorRole();
1112 $new_tutor = $new_obj->getDefaultTutorRole();
1113 if (!$tutor || !$new_tutor) {
1114 $ilLog->write(__METHOD__ . ' : Error cloning auto generated role: il_crs_tutor');
1115 }
1116 $rbacadmin->copyRolePermissions($tutor, $this->getRefId(), $new_obj->getRefId(), $new_tutor, true);
1117 $ilLog->write(__METHOD__ . ' : Finished copying of role crs_tutor.');
1118
1119 $member = $this->getDefaultMemberRole();
1120 $new_member = $new_obj->getDefaultMemberRole();
1121 if (!$member || !$new_member) {
1122 $ilLog->write(__METHOD__ . ' : Error cloning auto generated role: il_crs_member');
1123 }
1124 $rbacadmin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
1125 $ilLog->write(__METHOD__ . ' : Finished copying of role crs_member.');
1126
1127 return true;
1128 }

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, getDefaultAdminRole(), getDefaultMemberRole(), getDefaultTutorRole(), and ilObject\getRefId().

Referenced by cloneObject().

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

◆ cloneDependencies()

ilObjCourse::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies (start objects, preconditions)

@access public

Parameters
inttarget ref id of new course
intcopy id

Reimplemented from ilContainer.

Definition at line 1055 of file class.ilObjCourse.php.

1056 {
1057 parent::cloneDependencies($a_target_id, $a_copy_id);
1058
1059 // Clone course start objects
1060 include_once('Services/Container/classes/class.ilContainerStartObjects.php');
1061 $start = new ilContainerStartObjects($this->getRefId(), $this->getId());
1062 $start->cloneDependencies($a_target_id, $a_copy_id);
1063
1064 // Clone course item settings
1065 include_once('Services/Object/classes/class.ilObjectActivation.php');
1066 ilObjectActivation::cloneDependencies($this->getRefId(), $a_target_id, $a_copy_id);
1067
1068 // clone objective settings
1069 include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
1070 ilLOSettings::cloneSettings($a_copy_id, $this->getId(), ilObject::_lookupObjId($a_target_id));
1071
1072 // Clone course learning objectives
1073 include_once('Modules/Course/classes/class.ilCourseObjective.php');
1074 $crs_objective = new ilCourseObjective($this);
1075 $crs_objective->ilClone($a_target_id, $a_copy_id);
1076
1077 // clone membership limitation
1078 foreach (\ilObjCourseGrouping::_getGroupings($this->getId()) as $grouping_id) {
1079 \ilLoggerFactory::getLogger('crs')->info('Handling grouping id: ' . $grouping_id);
1080 $grouping = new \ilObjCourseGrouping($grouping_id);
1081 $grouping->cloneGrouping($a_target_id, $a_copy_id);
1082 }
1083
1084 return true;
1085 }
class ilcourseobjective
static cloneSettings($a_copy_id, $a_container_id, $a_new_container_id)
Clone settings.
static getLogger($a_component_id)
Get component logger.
static _getGroupings($a_course_id)
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
static _lookupObjId($a_id)

References ilObjCourseGrouping\_getGroupings(), ilObject\_lookupObjId(), ilObjectActivation\cloneDependencies(), ilLOSettings\cloneSettings(), ilObject\getId(), ilLoggerFactory\getLogger(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ cloneObject()

ilObjCourse::cloneObject (   $a_target_id,
  $a_copy_id = 0,
  $a_omit_tree = false 
)

Clone course (no member data)

@access public

Parameters
inttarget ref_id
intcopy id

Definition at line 978 of file class.ilObjCourse.php.

979 {
980 global $DIC;
981
982 $ilDB = $DIC['ilDB'];
983 $ilUser = $DIC['ilUser'];
984 $certificateLogger = $DIC->logger()->cert();
985
986
987 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
988
989 $this->cloneAutoGeneratedRoles($new_obj);
990 $this->cloneMetaData($new_obj);
991
992 // Assign admin
993 $new_obj->getMemberObject()->add($ilUser->getId(), IL_CRS_ADMIN);
994 // cognos-blu-patch: begin
995 $new_obj->getMemberObject()->updateContact($ilUser->getId(), 1);
996 // cognos-blu-patch: end
997
998
999 // #14596
1000 $cwo = ilCopyWizardOptions::_getInstance($a_copy_id);
1001 if ($cwo->isRootNode($this->getRefId())) {
1002 $this->setOfflineStatus(true);
1003 }
1004
1005 // Copy settings
1006 $this->cloneSettings($new_obj);
1007
1008 // Course Defined Fields
1009 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1010 ilCourseDefinedFieldDefinition::_clone($this->getId(), $new_obj->getId());
1011
1012 // Clone course files
1013 include_once('Modules/Course/classes/class.ilCourseFile.php');
1014 ilCourseFile::_cloneFiles($this->getId(), $new_obj->getId());
1015
1016 // Copy learning progress settings
1017 include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
1018 $obj_settings = new ilLPObjSettings($this->getId());
1019 $obj_settings->cloneSettings($new_obj->getId());
1020 unset($obj_settings);
1021
1022 // clone certificate (#11085)
1023 $pathFactory = new ilCertificatePathFactory();
1024 $templateRepository = new ilCertificateTemplateRepository($ilDB);
1025
1026 $cloneAction = new ilCertificateCloneAction(
1027 $ilDB,
1028 $pathFactory,
1029 $templateRepository,
1030 $DIC->filesystem()->web(),
1031 $certificateLogger,
1033 );
1034 $cloneAction->cloneCertificate($this, $new_obj);
1035
1036 $book_service = new ilBookingService();
1037 $book_service->cloneSettings($this->getId(), $new_obj->getId());
1038
1039 $badges = ilBadge::getInstancesByParentId($this->getId());
1040 foreach ($badges as $badge) {
1041 $badge->clone($new_obj->getId());
1042 }
1043
1044 return $new_obj;
1045 }
const IL_CRS_ADMIN
Base class for course and group participants.
static getInstancesByParentId($a_parent_id, array $a_filter=null)
Low level api for booking service.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _clone($a_source_id, $a_target_id)
Clone fields.
static _cloneFiles($a_source_id, $a_target_id)
Clone course files.
cloneSettings(\ilObjCourse $new_obj)
Clone entries in settings table.
cloneAutoGeneratedRoles($new_obj)
Clone automatic genrated roles (permissions and template permissions)
cloneMetaData($target_obj)
Copy meta data.
$ilUser
Definition: imgupload.php:18

References $DIC, $ilDB, $ilUser, ilCourseDefinedFieldDefinition\_clone(), ilCourseFile\_cloneFiles(), ilCopyWizardOptions\_getInstance(), cloneAutoGeneratedRoles(), ilObject\cloneMetaData(), cloneSettings(), ilObject\getId(), ilBadge\getInstancesByParentId(), IL_CRS_ADMIN, and ilObject\setOfflineStatus().

+ Here is the call graph for this function:

◆ cloneSettings()

ilObjCourse::cloneSettings ( \ilObjCourse  $new_obj)

Clone entries in settings table.

@access public

Parameters
ilObjCoursenew course object

Definition at line 1368 of file class.ilObjCourse.php.

1369 {
1370 $new_obj->setSyllabus($this->getSyllabus());
1371 $new_obj->setContactName($this->getContactName());
1372 $new_obj->setContactResponsibility($this->getContactResponsibility());
1373 $new_obj->setContactPhone($this->getContactPhone());
1374 $new_obj->setContactEmail($this->getContactEmail());
1375 $new_obj->setContactConsultation($this->getContactConsultation());
1376 $new_obj->setOfflineStatus($this->getOfflineStatus()); // #9914
1377 $new_obj->setActivationStart($this->getActivationStart());
1378 $new_obj->setActivationEnd($this->getActivationEnd());
1379 $new_obj->setActivationVisibility($this->getActivationVisibility());
1380 $new_obj->setSubscriptionLimitationType($this->getSubscriptionLimitationType());
1381 $new_obj->setSubscriptionStart($this->getSubscriptionStart());
1382 $new_obj->setSubscriptionEnd($this->getSubscriptionEnd());
1383 $new_obj->setSubscriptionType($this->getSubscriptionType());
1384 $new_obj->setSubscriptionPassword($this->getSubscriptionPassword());
1385 $new_obj->enableSubscriptionMembershipLimitation($this->isSubscriptionMembershipLimited());
1386 $new_obj->setSubscriptionMaxMembers($this->getSubscriptionMaxMembers());
1387 $new_obj->setSubscriptionNotify($this->getSubscriptionNotify());
1388 $new_obj->setViewMode($this->getViewMode());
1389 $new_obj->setTimingMode($this->getTimingMode());
1390 $new_obj->setOrderType($this->getOrderType());
1391 $new_obj->setAboStatus($this->getAboStatus());
1392 $new_obj->enableWaitingList($this->enabledWaitingList());
1393 $new_obj->setImportantInformation($this->getImportantInformation());
1394 $new_obj->setTargetGroup($this->getTargetGroup());
1395 $new_obj->setShowMembers($this->getShowMembers());
1396 // patch mem_exp
1397 $new_obj->setShowMembersExport($this->getShowMembersExport());
1398 // patch mem_exp
1399 $new_obj->enableSessionLimit($this->isSessionLimitEnabled());
1400 $new_obj->setNumberOfPreviousSessions($this->getNumberOfPreviousSessions());
1401 $new_obj->setNumberOfNextSessions($this->getNumberOfNextSessions());
1402 $new_obj->setAutoNotification($this->getAutoNotification());
1403 $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
1404 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1405 $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1406 $new_obj->setStatusDetermination($this->getStatusDetermination());
1407 $new_obj->setMailToMembersType($this->getMailToMembersType());
1408 $new_obj->setCoursePeriod(
1409 $this->getCourseStart(),
1410 $this->getCourseEnd()
1411 );
1412 $new_obj->setCancellationEnd($this->getCancellationEnd());
1413 $new_obj->setWaitingListAutoFill($this->hasWaitingListAutoFill());
1414 $new_obj->setSubscriptionMinMembers($this->getSubscriptionMinMembers());
1415
1416 // #10271
1417 $new_obj->setEnableCourseMap($this->getEnableCourseMap());
1418 $new_obj->setLatitude($this->getLatitude());
1419 $new_obj->setLongitude($this->getLongitude());
1420 $new_obj->setLocationZoom($this->getLocationZoom());
1421
1422 $new_obj->update();
1423 }
getNumberOfNextSessions()
Set number of previous sessions.
isSubscriptionMembershipLimited()
is membership limited
getViewMode()
Get container view mode.
getOrderType()
Get order type default implementation.
getOfflineStatus()
Get offline status.

References enabledWaitingList(), enableRegistrationAccessCode(), enableSessionLimit(), enableSubscriptionMembershipLimitation(), enableWaitingList(), ilMembershipRegistrationCodeUtils\generateCode(), getAboStatus(), getActivationEnd(), getActivationStart(), getActivationVisibility(), getAutoNotification(), getCancellationEnd(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getCourseEnd(), getCourseStart(), getEnableCourseMap(), getImportantInformation(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getNumberOfNextSessions(), getNumberOfPreviousSessions(), ilObject\getOfflineStatus(), getOrderType(), getShowMembers(), getShowMembersExport(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionMinMembers(), getSubscriptionNotify(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), getSyllabus(), getTargetGroup(), getTimingMode(), getViewMode(), hasWaitingListAutoFill(), isRegistrationAccessCodeEnabled(), isSessionLimitEnabled(), isSubscriptionMembershipLimited(), setAboStatus(), setActivationEnd(), setActivationStart(), setActivationVisibility(), setAutoNotification(), setCancellationEnd(), setContactConsultation(), setContactEmail(), setContactName(), setContactPhone(), setContactResponsibility(), setCoursePeriod(), setEnableCourseMap(), setImportantInformation(), setLatitude(), setLocationZoom(), setLongitude(), setMailToMembersType(), setNumberOfNextSessions(), setNumberOfPreviousSessions(), ilObject\setOfflineStatus(), ilContainer\setOrderType(), setRegistrationAccessCode(), setShowMembers(), setShowMembersExport(), setStatusDetermination(), setSubscriptionEnd(), setSubscriptionLimitationType(), setSubscriptionMaxMembers(), setSubscriptionMinMembers(), setSubscriptionNotify(), setSubscriptionPassword(), setSubscriptionStart(), setSubscriptionType(), setSyllabus(), setTargetGroup(), setTimingMode(), setViewMode(), setWaitingListAutoFill(), and update().

Referenced by cloneObject().

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

◆ create()

ilObjCourse::create (   $a_upload = false)

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

755 {
756 global $DIC;
757
758 $ilAppEventHandler = $DIC['ilAppEventHandler'];
759
760 parent::create($a_upload);
761
762 if (!$a_upload) {
763 $this->createMetaData();
764 }
766
767 $ilAppEventHandler->raise(
768 'Modules/Course',
769 'create',
770 array('object' => $this,
771 'obj_id' => $this->getId(),
772 'appointments' => $this->prepareAppointments('create'))
773 );
774 }
prepareAppointments($a_mode='create')
Prepare calendar appointments.
createMetaData()
create meta data entry

References $DIC, __createDefaultSettings(), ilObject\createMetaData(), ilObject\getId(), and prepareAppointments().

+ Here is the call graph for this function:

◆ delete()

ilObjCourse::delete ( )

delete course and all related data

@access public

Returns
boolean true if all object data were removed; false if only a references were removed

Reimplemented from ilContainer.

Definition at line 1203 of file class.ilObjCourse.php.

1204 {
1205 global $DIC;
1206
1207 $ilAppEventHandler = $DIC['ilAppEventHandler'];
1208
1209 // always call parent delete function first!!
1210 if (!parent::delete()) {
1211 return false;
1212 }
1213
1214 // delete meta data
1215 $this->deleteMetaData();
1216
1217 // put here course specific stuff
1218
1219 $this->__deleteSettings();
1220
1221 include_once('Modules/Course/classes/class.ilCourseParticipants.php');
1223
1224 include_once './Modules/Course/classes/class.ilCourseObjective.php';
1226
1227 include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
1229
1230 include_once './Modules/Course/classes/class.ilCourseFile.php';
1232
1233 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1235
1236 $ilAppEventHandler->raise(
1237 'Modules/Course',
1238 'delete',
1239 array('object' => $this,
1240 'obj_id' => $this->getId(),
1241 'appointments' => $this->prepareAppointments('delete'))
1242 );
1243
1244
1245 return true;
1246 }
static _deleteByContainer($a_container_id)
Delete all fields of a container.
static _deleteByCourse($a_course_id)
static _deleteAll($course_id)
static _deleteAll($a_course_id)
deleteMetaData()
delete meta data entry
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.

References $DIC, __deleteSettings(), ilObjCourseGrouping\_deleteAll(), ilCourseObjective\_deleteAll(), ilParticipants\_deleteAllEntries(), ilCourseDefinedFieldDefinition\_deleteByContainer(), ilCourseFile\_deleteByCourse(), ilObject\deleteMetaData(), ilObject\getId(), and prepareAppointments().

+ Here is the call graph for this function:

◆ enabledObjectiveView()

ilObjCourse::enabledObjectiveView ( )

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

369 {
370 return $this->view_mode == IL_CRS_VIEW_OBJECTIVE;
371 }
const IL_CRS_VIEW_OBJECTIVE

References IL_CRS_VIEW_OBJECTIVE.

Referenced by getOrderType().

+ Here is the caller graph for this function:

◆ enabledWaitingList()

ilObjCourse::enabledWaitingList ( )

Definition at line 373 of file class.ilObjCourse.php.

374 {
375 return (bool) $this->waiting_list;
376 }

Referenced by cloneSettings(), handleAutoFill(), register(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ enableRegistrationAccessCode()

ilObjCourse::enableRegistrationAccessCode (   $a_status)

En/disable registration access code.

Parameters
object$a_status
Returns

Definition at line 211 of file class.ilObjCourse.php.

212 {
213 $this->reg_access_code_enabled = $a_status;
214 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ enableSessionLimit()

ilObjCourse::enableSessionLimit (   $a_status)

en/disable limited number of sessions

Returns
Parameters
object$a_status

Definition at line 399 of file class.ilObjCourse.php.

400 {
401 $this->session_limit = $a_status;
402 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ enableSubscriptionMembershipLimitation()

ilObjCourse::enableSubscriptionMembershipLimitation (   $a_status)

enable max members

@access public

Parameters
boolstatus
Returns

Definition at line 416 of file class.ilObjCourse.php.

417 {
418 $this->subscription_membership_limitation = $a_status;
419 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ enableWaitingList()

ilObjCourse::enableWaitingList (   $a_status)

Definition at line 378 of file class.ilObjCourse.php.

379 {
380 $this->waiting_list = (bool) $a_status;
381 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ findCoursesWithNotEnoughMembers()

static ilObjCourse::findCoursesWithNotEnoughMembers ( )
static

Minimum members check @global type $ilDB.

Returns
array

Definition at line 2321 of file class.ilObjCourse.php.

2322 {
2323 $ilDB = $GLOBALS['DIC']->database();
2324 $tree = $GLOBALS['DIC']->repositoryTree();
2325
2326 $res = array();
2327
2328 $before = new ilDateTime(time(), IL_CAL_UNIX);
2329 $before->increment(IL_CAL_DAY, -1);
2330 $now = $before->get(IL_CAL_UNIX);
2331
2332 include_once "Modules/Course/classes/class.ilCourseParticipants.php";
2333
2334 $set = $ilDB->query("SELECT obj_id, min_members" .
2335 " FROM crs_settings" .
2336 " WHERE min_members > " . $ilDB->quote(0, "integer") .
2337 " AND sub_mem_limit = " . $ilDB->quote(1, "integer") . // #17206
2338 " AND ((leave_end IS NOT NULL" .
2339 " AND leave_end < " . $ilDB->quote($now, "text") . ")" .
2340 " OR (leave_end IS NULL" .
2341 " AND sub_end IS NOT NULL" .
2342 " AND sub_end < " . $ilDB->quote($now, "text") . "))" .
2343 " AND (period_start IS NULL OR period_start > " . $ilDB->quote($now, "integer") . ")");
2344 while ($row = $ilDB->fetchAssoc($set)) {
2345 $refs = ilObject::_getAllReferences($row['obj_id']);
2346 $ref = end($refs);
2347
2348 if ($tree->isDeleted($ref)) {
2349 continue;
2350 }
2351
2352 $part = new ilCourseParticipants($row["obj_id"]);
2353 $reci = $part->getNotificationRecipients();
2354 if (sizeof($reci)) {
2355 $missing = (int) $row["min_members"] - $part->getCountMembers();
2356 if ($missing > 0) {
2357 $res[$row["obj_id"]] = array($missing, $reci);
2358 }
2359 }
2360 }
2361
2362 return $res;
2363 }
const IL_CAL_DAY
static _getAllReferences($a_id)
get all reference ids of object

References $GLOBALS, $ilDB, $res, ilContainer\$tree, ilObject\_getAllReferences(), IL_CAL_DAY, and IL_CAL_UNIX.

Referenced by ilMembershipCronMinMembers\getCourses().

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

◆ getAboStatus()

ilObjCourse::getAboStatus ( )

Definition at line 645 of file class.ilObjCourse.php.

646 {
647 return $this->abo;
648 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getActivationEnd()

ilObjCourse::getActivationEnd ( )

Definition at line 306 of file class.ilObjCourse.php.

307 {
308 return $this->activation_end;
309 }

Referenced by cloneSettings(), getActivationUnlimitedStatus(), isActivated(), prepareAppointments(), and updateSettings().

+ Here is the caller graph for this function:

◆ getActivationStart()

ilObjCourse::getActivationStart ( )

Definition at line 298 of file class.ilObjCourse.php.

299 {
300 return $this->activation_start;
301 }

Referenced by cloneSettings(), getActivationUnlimitedStatus(), isActivated(), prepareAppointments(), and updateSettings().

+ Here is the caller graph for this function:

◆ getActivationUnlimitedStatus()

ilObjCourse::getActivationUnlimitedStatus ( )

get activation unlimited no start or no end

Returns
bool

Definition at line 294 of file class.ilObjCourse.php.

295 {
296 return !$this->getActivationStart() || !$this->getActivationEnd();
297 }

References getActivationEnd(), and getActivationStart().

Referenced by isActivated(), and prepareAppointments().

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

◆ getActivationVisibility()

ilObjCourse::getActivationVisibility ( )

Definition at line 318 of file class.ilObjCourse.php.

319 {
320 return $this->activation_visibility;
321 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getArchiveEnd()

ilObjCourse::getArchiveEnd ( )

Definition at line 625 of file class.ilObjCourse.php.

626 {
627 return $this->archive_end ? $this->archive_end : mktime(0, 0, 0, 12, 12, date("Y", time()) + 2);
628 }

◆ getArchiveStart()

ilObjCourse::getArchiveStart ( )

Definition at line 617 of file class.ilObjCourse.php.

618 {
619 return $this->archive_start ? $this->archive_start : time();
620 }

◆ getArchiveType()

ilObjCourse::getArchiveType ( )

Definition at line 633 of file class.ilObjCourse.php.

634 {
635 return $this->archive_type ? IL_CRS_ARCHIVE_DOWNLOAD : IL_CRS_ARCHIVE_NONE;
636 }
const IL_CRS_ARCHIVE_NONE
const IL_CRS_ARCHIVE_DOWNLOAD

References IL_CRS_ARCHIVE_DOWNLOAD, and IL_CRS_ARCHIVE_NONE.

◆ getAutoNotification()

ilObjCourse::getAutoNotification ( )

Returns automatic notification status from $this->auto_notification.

Returns
boolean

Definition at line 2154 of file class.ilObjCourse.php.

2155 {
2157 }

References $auto_notification.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getCancellationEnd()

ilObjCourse::getCancellationEnd ( )

Definition at line 942 of file class.ilObjCourse.php.

943 {
944 return $this->leave_end;
945 }

References $leave_end.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getContactConsultation()

ilObjCourse::getContactConsultation ( )

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

258 {
259 return $this->contact_consultation;
260 }

Referenced by __createDefaultSettings(), cloneSettings(), hasContactData(), and updateSettings().

+ Here is the caller graph for this function:

◆ getContactEmail()

ilObjCourse::getContactEmail ( )

Definition at line 273 of file class.ilObjCourse.php.

274 {
275 return $this->contact_email;
276 }

Referenced by __createDefaultSettings(), cloneSettings(), hasContactData(), updateSettings(), and validateInfoSettings().

+ Here is the caller graph for this function:

◆ getContactName()

ilObjCourse::getContactName ( )

Definition at line 249 of file class.ilObjCourse.php.

250 {
251 return $this->contact_name;
252 }

Referenced by __createDefaultSettings(), cloneSettings(), hasContactData(), and updateSettings().

+ Here is the caller graph for this function:

◆ getContactPhone()

ilObjCourse::getContactPhone ( )

Definition at line 265 of file class.ilObjCourse.php.

266 {
267 return $this->contact_phone;
268 }

Referenced by __createDefaultSettings(), cloneSettings(), hasContactData(), and updateSettings().

+ Here is the caller graph for this function:

◆ getContactResponsibility()

ilObjCourse::getContactResponsibility ( )

Definition at line 281 of file class.ilObjCourse.php.

282 {
283 return $this->contact_responsibility;
284 }

Referenced by __createDefaultSettings(), cloneSettings(), hasContactData(), and updateSettings().

+ Here is the caller graph for this function:

◆ getCourseEnd()

ilObjCourse::getCourseEnd ( )
Returns
\ilDateTime|null

Definition at line 932 of file class.ilObjCourse.php.

932 : ?\ilDateTime
933 {
934 return $this->crs_end;
935 }

References $crs_end.

Referenced by cloneSettings(), prepareAppointments(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getCourseStart()

ilObjCourse::getCourseStart ( )
Returns
\ilDateTime | null

Definition at line 916 of file class.ilObjCourse.php.

916 : ?\ilDateTime
917 {
918 return $this->crs_start;
919 }

References $crs_start.

Referenced by cloneSettings(), prepareAppointments(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getCourseStartTimeIndication()

ilObjCourse::getCourseStartTimeIndication ( )
Returns
bool

Definition at line 899 of file class.ilObjCourse.php.

899 : bool
900 {
902 }

References $course_start_time_indication.

Referenced by prepareAppointments(), and updateSettings().

+ Here is the caller graph for this function:

◆ getDefaultAdminRole()

ilObjCourse::getDefaultAdminRole ( )

Definition at line 1867 of file class.ilObjCourse.php.

1868 {
1869 $local_roles = $this->__getLocalRoles();
1870
1871 foreach ($local_roles as $role_id) {
1872 if ($tmp_role = &ilObjectFactory::getInstanceByObjId($role_id, false)) {
1873 if (!strcmp($tmp_role->getTitle(), "il_crs_admin_" . $this->getRefId())) {
1874 return $role_id;
1875 }
1876 }
1877 }
1878 return false;
1879 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id

References __getLocalRoles(), and ilObjectFactory\getInstanceByObjId().

Referenced by cloneAutoGeneratedRoles().

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

◆ getDefaultCourseRoles()

ilObjCourse::getDefaultCourseRoles (   $a_crs_id = "")

get default course roles, returns the defaultlike create roles il_crs_tutor, il_crs_admin and il_crs_member @access public

Parameters
returnsthe obj_ids of course specific roles in an associative array. key=descripiton of the role (i.e. "il_crs_tutor", "il_crs_admin", "il_crs_member". value=obj_id of the role

Definition at line 1779 of file class.ilObjCourse.php.

1780 {
1781 global $DIC;
1782
1783 $rbacadmin = $DIC['rbacadmin'];
1784 $rbacreview = $DIC['rbacreview'];
1785
1786 if (strlen($a_crs_id) > 0) {
1787 $crs_id = $a_crs_id;
1788 } else {
1789 $crs_id = $this->getRefId();
1790 }
1791
1792 $role_arr = $rbacreview->getRolesOfRoleFolder($crs_id);
1793
1794 foreach ($role_arr as $role_id) {
1795 $role_Obj = &$this->ilias->obj_factory->getInstanceByObjId($role_id);
1796
1797 $crs_Member = "il_crs_member_" . $crs_id;
1798 $crs_Admin = "il_crs_admin_" . $crs_id;
1799 $crs_Tutor = "il_crs_tutor_" . $crs_id;
1800
1801 if (strcmp($role_Obj->getTitle(), $crs_Member) == 0) {
1802 $arr_crsDefaultRoles["crs_member_role"] = $role_Obj->getId();
1803 }
1804
1805 if (strcmp($role_Obj->getTitle(), $crs_Admin) == 0) {
1806 $arr_crsDefaultRoles["crs_admin_role"] = $role_Obj->getId();
1807 }
1808
1809 if (strcmp($role_Obj->getTitle(), $crs_Tutor) == 0) {
1810 $arr_crsDefaultRoles["crs_tutor_role"] = $role_Obj->getId();
1811 }
1812 }
1813
1814 return $arr_crsDefaultRoles;
1815 }

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, and ilObject\getRefId().

+ Here is the call graph for this function:

◆ getDefaultMemberRole()

ilObjCourse::getDefaultMemberRole ( )

Definition at line 1842 of file class.ilObjCourse.php.

1843 {
1844 $local_roles = $this->__getLocalRoles();
1845
1846 foreach ($local_roles as $role_id) {
1847 $title = ilObject::_lookupTitle($role_id);
1848 if (substr($title, 0, 8) == 'il_crs_m') {
1849 return $role_id;
1850 }
1851 }
1852 return 0;
1853 }
static _lookupTitle($a_id)
lookup object title

References ilObject\$title, __getLocalRoles(), and ilObject\_lookupTitle().

Referenced by cloneAutoGeneratedRoles().

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

◆ getDefaultTutorRole()

ilObjCourse::getDefaultTutorRole ( )

Definition at line 1854 of file class.ilObjCourse.php.

1855 {
1856 $local_roles = $this->__getLocalRoles();
1857
1858 foreach ($local_roles as $role_id) {
1859 if ($tmp_role = &ilObjectFactory::getInstanceByObjId($role_id, false)) {
1860 if (!strcmp($tmp_role->getTitle(), "il_crs_tutor_" . $this->getRefId())) {
1861 return $role_id;
1862 }
1863 }
1864 }
1865 return false;
1866 }

References __getLocalRoles(), and ilObjectFactory\getInstanceByObjId().

Referenced by cloneAutoGeneratedRoles().

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

◆ getEnableCourseMap()

ilObjCourse::getEnableCourseMap ( )

Get Enable Course Map.

Returns
boolean Enable Course Map

Definition at line 860 of file class.ilObjCourse.php.

861 {
862 return $this->enablemap;
863 }

References $enablemap.

Referenced by __createDefaultSettings(), cloneSettings(), getEnableMap(), and updateSettings().

+ Here is the caller graph for this function:

◆ getEnableMap()

ilObjCourse::getEnableMap ( )

Type independent wrapper.

Returns
type

Definition at line 850 of file class.ilObjCourse.php.

851 {
852 return $this->getEnableCourseMap();
853 }

References getEnableCourseMap().

+ Here is the call graph for this function:

◆ getImportantInformation()

ilObjCourse::getImportantInformation ( )

Definition at line 216 of file class.ilObjCourse.php.

217 {
218 return $this->important;
219 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getLatitude()

ilObjCourse::getLatitude ( )

Get Latitude.

Returns
string Latitude

Definition at line 791 of file class.ilObjCourse.php.

792 {
793 return $this->latitude;
794 }

References $latitude.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getLocalCourseRoles()

ilObjCourse::getLocalCourseRoles (   $a_translate = false)

get ALL local roles of course, also those created and defined afterwards only fetch data once from database.

info is stored in object variable @access public

Returns
return array [title|id] of roles...

Definition at line 1740 of file class.ilObjCourse.php.

1741 {
1742 global $DIC;
1743
1744 $rbacadmin = $DIC['rbacadmin'];
1745 $rbacreview = $DIC['rbacreview'];
1746
1747 if (empty($this->local_roles)) {
1748 $this->local_roles = array();
1749 $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1750
1751 foreach ($role_arr as $role_id) {
1752 if ($rbacreview->isAssignable($role_id, $this->getRefId()) == true) {
1753 $role_Obj = $this->ilias->obj_factory->getInstanceByObjId($role_id);
1754
1755 if ($a_translate) {
1756 $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1757 } else {
1758 $role_name = $role_Obj->getTitle();
1759 }
1760 $this->local_roles[$role_name] = $role_Obj->getId();
1761 }
1762 }
1763 }
1764
1765 return $this->local_roles;
1766 }
static _getTranslation($a_role_title)

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, ilObjRole\_getTranslation(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ getLocationZoom()

ilObjCourse::getLocationZoom ( )

Get LocationZoom.

Returns
int LocationZoom

Definition at line 831 of file class.ilObjCourse.php.

832 {
833 return $this->locationzoom;
834 }

References $locationzoom.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getLongitude()

ilObjCourse::getLongitude ( )

Get Longitude.

Returns
string Longitude

Definition at line 811 of file class.ilObjCourse.php.

812 {
813 return $this->longitude;
814 }

References $longitude.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjCourse::getMailToMembersType ( )

Get mail to members type.

Returns
int

Definition at line 672 of file class.ilObjCourse.php.

673 {
674 return $this->mail_members;
675 }

References $mail_members.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getMemberObject()

ilObjCourse::getMemberObject ( )

Get course member object.

Returns
ilCourseParticipant

Definition at line 1617 of file class.ilObjCourse.php.

1618 {
1619 if (!$this->member_obj instanceof ilCourseParticipant) {
1620 $this->initCourseMemberObject();
1621 }
1622 return $this->member_obj;
1623 }
initCourseMemberObject()
Init course member object @global ilObjUser $ilUser.

References $member_obj, and initCourseMemberObject().

+ Here is the call graph for this function:

◆ getMembersObject()

ilObjCourse::getMembersObject ( )
Returns
ilCourseParticipants

Definition at line 1628 of file class.ilObjCourse.php.

1629 {
1630 if (!$this->members_obj instanceof ilCourseParticipants) {
1631 $this->initCourseMembersObject();
1632 }
1633 return $this->members_obj;
1634 }
initCourseMembersObject()
Init course member object @global ilObjUser $ilUser.

References $members_obj, and initCourseMembersObject().

Referenced by checkLPStatusSync(), handleAutoFill(), and syncMembersStatusWithLP().

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

◆ getMessage()

ilObjCourse::getMessage ( )

Definition at line 677 of file class.ilObjCourse.php.

678 {
679 return $this->message;
680 }
$message
Definition: xapiexit.php:14

References $message.

Referenced by appendMessage(), and validate().

+ Here is the caller graph for this function:

◆ getNumberOfNextSessions()

ilObjCourse::getNumberOfNextSessions ( )

Set number of previous sessions.

Returns

Definition at line 454 of file class.ilObjCourse.php.

455 {
456 return $this->session_next;
457 }

References $session_next.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getNumberOfPreviousSessions()

ilObjCourse::getNumberOfPreviousSessions ( )

Set number of previous sessions.

Returns

Definition at line 435 of file class.ilObjCourse.php.

436 {
437 return $this->session_prev;
438 }

References $session_prev.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getOrderType()

ilObjCourse::getOrderType ( )

Get order type default implementation.

Reimplemented from ilContainer.

Definition at line 2233 of file class.ilObjCourse.php.

2234 {
2235 if ($this->enabledObjectiveView()) {
2237 }
2238 return parent::getOrderType();
2239 }

References enabledObjectiveView(), and ilContainer\SORT_MANUAL.

Referenced by cloneSettings(), and update().

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

◆ getRegistrationAccessCode()

ilObjCourse::getRegistrationAccessCode ( )

get access code

Returns

Definition at line 182 of file class.ilObjCourse.php.

183 {
185 }

References $reg_access_code.

Referenced by __createDefaultSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjCourse::getShowMembers ( )

Definition at line 653 of file class.ilObjCourse.php.

654 {
655 return $this->show_members;
656 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getShowMembersExport()

ilObjCourse::getShowMembersExport ( )

Definition at line 168 of file class.ilObjCourse.php.

169 {
171 }

References $member_export.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getStatusDetermination()

ilObjCourse::getStatusDetermination ( )

Get status determination mode.

Returns
int

Definition at line 2196 of file class.ilObjCourse.php.

2197 {
2198 return $this->status_dt;
2199 }

References $status_dt.

Referenced by __createDefaultSettings(), checkLPStatusSync(), cloneSettings(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubItems()

ilObjCourse::getSubItems (   $a_admin_panel_enabled = false,
  $a_include_side_block = false,
  $a_get_single = 0,
\ilContainerUserFilter  $container_user_filter = null 
)

Get subitems of container.

Parameters
bool$a_admin_panel_enabled,[optional]
bool$a_include_side_block,[optional]
Returns
array

Reimplemented from ilContainer.

Definition at line 506 of file class.ilObjCourse.php.

511 {
512 // Caching
513 if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block])) {
514 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
515 }
516
517 // Results are stored in $this->items
518 parent::getSubItems($a_admin_panel_enabled, $a_include_side_block, $a_get_single);
520 $this->items,
521 $this,
522 (bool) $a_admin_panel_enabled,
523 (bool) $a_include_side_block
524 );
525 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
526 }
static prepareSessionPresentationLimitation(array $items, ilContainer $container, bool $admin_panel_enabled=false, bool $include_side_block=false)

References ilContainerSessionsContentGUI\prepareSessionPresentationLimitation().

+ Here is the call graph for this function:

◆ getSubscriptionEnd()

ilObjCourse::getSubscriptionEnd ( )

Definition at line 343 of file class.ilObjCourse.php.

344 {
345 return $this->subscription_end;
346 }

Referenced by __createDefaultSettings(), cloneSettings(), inSubscriptionTime(), prepareAppointments(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionLimitationType()

ilObjCourse::getSubscriptionLimitationType ( )

Definition at line 323 of file class.ilObjCourse.php.

324 {
325 return $this->subscription_limitation_type;
326 }

Referenced by cloneSettings(), prepareAppointments(), register(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionMaxMembers()

ilObjCourse::getSubscriptionMaxMembers ( )

Definition at line 470 of file class.ilObjCourse.php.

471 {
472 return $this->subscription_max_members;
473 }

Referenced by __createDefaultSettings(), cloneSettings(), handleAutoFill(), register(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionMinMembers()

ilObjCourse::getSubscriptionMinMembers ( )

Definition at line 955 of file class.ilObjCourse.php.

956 {
957 return $this->min_members;
958 }

References $min_members.

Referenced by cloneSettings(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionNotify()

ilObjCourse::getSubscriptionNotify ( )

Definition at line 528 of file class.ilObjCourse.php.

529 {
530 return true;
531 return $this->subscription_notify ? true : false;
532 }

References true.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getSubscriptionPassword()

ilObjCourse::getSubscriptionPassword ( )

Definition at line 360 of file class.ilObjCourse.php.

361 {
362 return $this->subscription_password;
363 }

Referenced by __createDefaultSettings(), cloneSettings(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionStart()

ilObjCourse::getSubscriptionStart ( )

Definition at line 335 of file class.ilObjCourse.php.

336 {
337 return $this->subscription_start;
338 }

Referenced by __createDefaultSettings(), cloneSettings(), inSubscriptionTime(), prepareAppointments(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionType()

ilObjCourse::getSubscriptionType ( )

Definition at line 351 of file class.ilObjCourse.php.

352 {
353 return $this->subscription_type ? $this->subscription_type : IL_CRS_SUBSCRIPTION_DIRECT;
354 #return $this->subscription_type ? $this->subscription_type : $this->SUBSCRIPTION_DEACTIVATED;
355 }

References IL_CRS_SUBSCRIPTION_DIRECT.

Referenced by cloneSettings(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ getSubscriptionUnlimitedStatus()

ilObjCourse::getSubscriptionUnlimitedStatus ( )

Definition at line 331 of file class.ilObjCourse.php.

332 {
333 return $this->subscription_limitation_type == IL_CRS_SUBSCRIPTION_UNLIMITED;
334 }
const IL_CRS_SUBSCRIPTION_UNLIMITED

References IL_CRS_SUBSCRIPTION_UNLIMITED.

Referenced by inSubscriptionTime().

+ Here is the caller graph for this function:

◆ getSyllabus()

ilObjCourse::getSyllabus ( )

Definition at line 224 of file class.ilObjCourse.php.

225 {
226 return $this->syllabus;
227 }

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getTargetGroup()

ilObjCourse::getTargetGroup ( )
Returns
string|null

Definition at line 236 of file class.ilObjCourse.php.

236 : ?string
237 {
238 return $this->target_group;
239 }

References $target_group.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getTimingMode()

ilObjCourse::getTimingMode ( )
Returns
int

Definition at line 578 of file class.ilObjCourse.php.

579 {
580 return $this->timing_mode;
581 }

References $timing_mode.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getViewMode()

ilObjCourse::getViewMode ( )

Get container view mode.

Reimplemented from ilContainer.

Definition at line 542 of file class.ilObjCourse.php.

543 {
544 return $this->view_mode;
545 }

Referenced by cloneSettings(), prepareAppointments(), and updateSettings().

+ Here is the caller graph for this function:

◆ handleAutoFill()

ilObjCourse::handleAutoFill ( )

Handle course auto fill.

Definition at line 2244 of file class.ilObjCourse.php.

2245 {
2246 if (
2247 !$this->enabledWaitingList() or
2248 !$this->hasWaitingListAutoFill()
2249 ) {
2250 $this->course_logger->debug('Waiting list or auto fill disabled.');
2251 return;
2252 }
2253
2254 $max = $this->getSubscriptionMaxMembers();
2256
2257 $this->course_logger->debug('Max members: ' . $max);
2258 $this->course_logger->debug('Current members: ' . $now);
2259
2260 if ($max <= $now) {
2261 return;
2262 }
2263
2264 // see assignFromWaitingListObject()
2265 include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
2266 $waiting_list = new ilCourseWaitingList($this->getId());
2267
2268 foreach ($waiting_list->getUserIds() as $user_id) {
2269 if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
2270 $this->course_logger->warning('Cannot create user instance for id: ' . $user_id);
2271 continue;
2272 }
2273 if ($this->getMembersObject()->isAssigned($user_id)) {
2274 $this->course_logger->warning('User is already assigned to course. uid: ' . $user_id . ' course_id: ' . $this->getRefId());
2275 continue;
2276 }
2277 $this->getMembersObject()->add($user_id, IL_CRS_MEMBER);
2278 $this->getMembersObject()->sendNotification($this->getMembersObject()->NOTIFY_ACCEPT_USER, $user_id, true);
2279 $waiting_list->removeFromList($user_id);
2280 $this->checkLPStatusSync($user_id);
2281
2282 $this->course_logger->info('Assigned user from waiting list to course: ' . $this->getTitle());
2283 $now++;
2284 if ($now >= $max) {
2285 break;
2286 }
2287 }
2288 }
const IL_CRS_MEMBER
checkLPStatusSync($a_member_id)
sync course status from lp
getTitle()
get object title @access public
static lookupNumberOfMembers($a_ref_id)
Lookup number of members @global ilRbacReview $rbacreview @global <type> $ilObjDataCache.

References checkLPStatusSync(), enabledWaitingList(), ilObject\getId(), ilObjectFactory\getInstanceByObjId(), getMembersObject(), ilObject\getRefId(), getSubscriptionMaxMembers(), ilObject\getTitle(), hasWaitingListAutoFill(), IL_CRS_MEMBER, and ilParticipants\lookupNumberOfMembers().

+ Here is the call graph for this function:

◆ hasContactData()

ilObjCourse::hasContactData ( )

Definition at line 1187 of file class.ilObjCourse.php.

1188 {
1189 return strlen($this->getContactName()) or
1190 strlen($this->getContactResponsibility()) or
1191 strlen($this->getContactEmail()) or
1192 strlen($this->getContactPhone()) or
1193 strlen($this->getContactConsultation());
1194 }

References getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), and getContactResponsibility().

+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjCourse::hasWaitingListAutoFill ( )

Definition at line 965 of file class.ilObjCourse.php.

966 {
967 return (bool) $this->auto_fill_from_waiting;
968 }

References $auto_fill_from_waiting.

Referenced by cloneSettings(), handleAutoFill(), and updateSettings().

+ Here is the caller graph for this function:

◆ initCourseMemberObject()

ilObjCourse::initCourseMemberObject ( )
protected

Init course member object @global ilObjUser $ilUser.

Returns
<type>

Definition at line 1586 of file class.ilObjCourse.php.

1587 {
1588 global $DIC;
1589
1590 $ilUser = $DIC['ilUser'];
1591
1592 include_once "./Modules/Course/classes/class.ilCourseParticipant.php";
1593 $this->member_obj = ilCourseParticipant::_getInstanceByObjId($this->getId(), $ilUser->getId());
1594 return true;
1595 }
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.

References $DIC, $ilUser, ilCourseParticipant\_getInstanceByObjId(), and ilObject\getId().

Referenced by getMemberObject().

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

◆ initCourseMembersObject()

ilObjCourse::initCourseMembersObject ( )
protected

Init course member object @global ilObjUser $ilUser.

Returns
<type>

Definition at line 1602 of file class.ilObjCourse.php.

1603 {
1604 global $DIC;
1605
1606 $ilUser = $DIC['ilUser'];
1607
1608 include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
1609 $this->members_obj = ilCourseParticipants::_getInstanceByObjId($this->getId());
1610 return true;
1611 }
static _getInstanceByObjId($a_obj_id)
Get singleton instance.

References $DIC, $ilUser, ilCourseParticipants\_getInstanceByObjId(), and ilObject\getId().

Referenced by getMembersObject().

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

◆ initDefaultRoles()

ilObjCourse::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) @access public

Returns
array empty array

Reimplemented from ilObject.

Definition at line 1639 of file class.ilObjCourse.php.

1640 {
1641 global $DIC;
1642
1643 $rbacadmin = $DIC['rbacadmin'];
1644 $rbacreview = $DIC['rbacreview'];
1645 $ilDB = $DIC['ilDB'];
1646
1647 include_once './Services/AccessControl/classes/class.ilObjRole.php';
1649 'il_crs_admin_' . $this->getRefId(),
1650 "Admin of crs obj_no." . $this->getId(),
1651 'il_crs_admin',
1652 $this->getRefId()
1653 );
1655 'il_crs_tutor_' . $this->getRefId(),
1656 "Tutor of crs obj_no." . $this->getId(),
1657 'il_crs_tutor',
1658 $this->getRefId()
1659 );
1661 'il_crs_member_' . $this->getRefId(),
1662 "Member of crs obj_no." . $this->getId(),
1663 'il_crs_member',
1664 $this->getRefId()
1665 );
1666
1667 return array();
1668 }
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)

References $DIC, $ilDB, ilObject\$rbacadmin, ilObject\$rbacreview, ilObjRole\createDefaultRole(), ilObject\getId(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ initWaitingList()

ilObjCourse::initWaitingList ( )

Definition at line 1570 of file class.ilObjCourse.php.

1571 {
1572 include_once "./Modules/Course/classes/class.ilCourseWaitingList.php";
1573
1574 if (!is_object($this->waiting_list_obj)) {
1575 $this->waiting_list_obj = new ilCourseWaitingList($this->getId());
1576 }
1577 return true;
1578 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ inSubscriptionTime()

ilObjCourse::inSubscriptionTime ( )

Definition at line 383 of file class.ilObjCourse.php.

384 {
385 if ($this->getSubscriptionUnlimitedStatus()) {
386 return true;
387 }
388 if (time() > $this->getSubscriptionStart() and time() < $this->getSubscriptionEnd()) {
389 return true;
390 }
391 return false;
392 }

References getSubscriptionEnd(), getSubscriptionStart(), and getSubscriptionUnlimitedStatus().

Referenced by register().

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

◆ isActivated()

ilObjCourse::isActivated ( )

Check if course is active and not offline.

Returns
bool

Definition at line 697 of file class.ilObjCourse.php.

698 {
699 if ($this->getOfflineStatus()) {
700 return false;
701 }
702 if ($this->getActivationUnlimitedStatus()) {
703 return true;
704 }
705 if (time() < $this->getActivationStart() or
706 time() > $this->getActivationEnd()) {
707 return false;
708 }
709 return true;
710 }
getActivationUnlimitedStatus()
get activation unlimited no start or no end

References getActivationEnd(), getActivationStart(), getActivationUnlimitedStatus(), and ilObject\getOfflineStatus().

+ Here is the call graph for this function:

◆ isRegistrationAccessCodeEnabled()

ilObjCourse::isRegistrationAccessCodeEnabled ( )

Check if access code is enabled.

Returns

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

202 {
203 return (bool) $this->reg_access_code_enabled;
204 }

References $reg_access_code_enabled.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ isSessionLimitEnabled()

ilObjCourse::isSessionLimitEnabled ( )

Definition at line 404 of file class.ilObjCourse.php.

405 {
406 return (bool) $this->session_limit;
407 }

References $session_limit.

Referenced by __createDefaultSettings(), cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ isSubscriptionMembershipLimited()

ilObjCourse::isSubscriptionMembershipLimited ( )

is membership limited

@access public

Parameters

return

Definition at line 465 of file class.ilObjCourse.php.

466 {
467 return (bool) $this->subscription_membership_limitation;
468 }

Referenced by cloneSettings(), register(), updateSettings(), and validate().

+ Here is the caller graph for this function:

◆ lookupCourseNonMemberTemplatesId()

static ilObjCourse::lookupCourseNonMemberTemplatesId ( )
static

Lookup course non member id.

Returns
int

Definition at line 1721 of file class.ilObjCourse.php.

1722 {
1723 global $DIC;
1724
1725 $ilDB = $DIC['ilDB'];
1726
1727 $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_crs_non_member', 'text');
1728 $res = $ilDB->query($query);
1729 $row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
1730
1731 return isset($row['obj_id']) ? $row['obj_id'] : 0;
1732 }

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by ilRbacAdmin\adjustMovedObjectPermissions().

+ Here is the caller graph for this function:

◆ lookupObjectsByCode()

static ilObjCourse::lookupObjectsByCode (   $a_code)
static
See also
interface.ilMembershipRegistrationCodes
Returns
array obj ids

Implements ilMembershipRegistrationCodes.

Definition at line 2041 of file class.ilObjCourse.php.

2042 {
2043 global $DIC;
2044
2045 $ilDB = $DIC['ilDB'];
2046
2047 $query = "SELECT obj_id FROM crs_settings " .
2048 "WHERE reg_ac_enabled = " . $ilDB->quote(1, 'integer') . " " .
2049 "AND reg_ac = " . $ilDB->quote($a_code, 'text');
2050 $res = $ilDB->query($query);
2051
2052 $obj_ids = array();
2053 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
2054 $obj_ids[] = $row->obj_id;
2055 }
2056 return $obj_ids;
2057 }

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMembershipRegistrationCodeUtils\lookupObjectsByCode().

+ Here is the caller graph for this function:

◆ lookupShowMembersEnabled()

static ilObjCourse::lookupShowMembersEnabled (   $a_obj_id)
static

Check if show member is enabled.

Parameters
int$a_obj_id
Returns
bool

Definition at line 157 of file class.ilObjCourse.php.

158 {
159 $query = 'SELECT show_members FROM crs_settings ' .
160 'WHERE obj_id = ' . $GLOBALS['DIC']['ilDB']->quote($a_obj_id, 'integer');
161 $res = $GLOBALS['DIC']['ilDB']->query($query);
162 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
163 return (bool) $row->show_members;
164 }
165 return false;
166 }

References $GLOBALS, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilAwarenessUserProviderCurrentCourse\getInitialUserSet(), and ilParticipants\hasParticipantListAccess().

+ Here is the caller graph for this function:

◆ lookupTimingMode()

static ilObjCourse::lookupTimingMode (   $a_obj_id)
static
Parameters
$a_obj_id
Returns
int

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

552 {
553 global $DIC;
554
555 $ilDB = $DIC['ilDB'];
556
557 $query = 'SELECT timing_mode FROM crs_settings ' .
558 'WHERE obj_id = ' . $ilDB->quote($a_obj_id, 'integer');
559 $res = $ilDB->query($query);
560
561 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
562 return (int) $row->timing_mode;
563 }
565 }

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ilCourseConstants\IL_CRS_VIEW_TIMING_ABSOLUTE.

Referenced by ilCalendarScheduleFilterTimings\addCustomEvents(), ilCourseAppEventListener\initializeTimings(), ilObjectActivationGUI\initTimingMode(), and ilCalendarScheduleFilterTimings\modifyEvent().

+ Here is the caller graph for this function:

◆ mayLeave()

static ilObjCourse::mayLeave (   $a_course_id,
  $a_user_id = null,
$a_date = null 
)
static

Definition at line 2290 of file class.ilObjCourse.php.

2291 {
2292 global $DIC;
2293
2294 $ilUser = $DIC['ilUser'];
2295 $ilDB = $DIC['ilDB'];
2296
2297 if (!$a_user_id) {
2298 $a_user_id = $ilUser->getId();
2299 }
2300
2301 $set = $ilDB->query("SELECT leave_end" .
2302 " FROM crs_settings" .
2303 " WHERE obj_id = " . $ilDB->quote($a_course_id, "integer"));
2304 $row = $ilDB->fetchAssoc($set);
2305 if ($row && $row["leave_end"]) {
2306 // timestamp to date
2307 $limit = date("Ymd", $row["leave_end"]);
2308 if ($limit < date("Ymd")) {
2309 $a_date = new ilDate(date("Y-m-d", $row["leave_end"]), IL_CAL_DATE);
2310 return false;
2311 }
2312 }
2313 return true;
2314 }

References $DIC, $ilDB, $ilUser, and IL_CAL_DATE.

Referenced by ilObjCourseAccess\_checkAccess().

+ Here is the caller graph for this function:

◆ MDUpdateListener()

ilObjCourse::MDUpdateListener (   $a_element)

Overwriten Metadata update listener for ECS functionalities.

@access public

Reimplemented from ilObject.

Definition at line 1902 of file class.ilObjCourse.php.

1903 {
1904 global $DIC;
1905
1906 $ilLog = $DIC['ilLog'];
1907
1908 parent::MDUpdateListener($a_element);
1909
1910 switch ($a_element) {
1911 case 'General':
1912 // Update ecs content
1913 include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
1914 $ecs = new ilECSCourseSettings($this);
1915 $ecs->handleContentUpdate();
1916 break;
1917
1918 default:
1919 return true;
1920 }
1921 }
Class ilECSCourseSettings.

References $DIC.

◆ prepareAppointments()

ilObjCourse::prepareAppointments (   $a_mode = 'create')
protected

Prepare calendar appointments.

@access protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

Definition at line 1940 of file class.ilObjCourse.php.

1941 {
1942 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1943 include_once('./Services/Calendar/classes/class.ilDateTime.php');
1944
1945 switch ($a_mode) {
1946 case 'create':
1947 case 'update':
1948 if (!$this->getActivationUnlimitedStatus() and !$this->getOfflineStatus()) {
1949 $app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_START);
1950 $app->setTitle($this->getTitle());
1951 $app->setSubtitle('crs_cal_activation_start');
1952 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1953 $app->setDescription($this->getLongDescription());
1954 $app->setStart(new ilDateTime($this->getActivationStart(), IL_CAL_UNIX));
1955 $apps[] = $app;
1956
1957 $app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_END);
1958 $app->setTitle($this->getTitle());
1959 $app->setSubtitle('crs_cal_activation_end');
1960 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1961 $app->setDescription($this->getLongDescription());
1962 $app->setStart(new ilDateTime($this->getActivationEnd(), IL_CAL_UNIX));
1963 $apps[] = $app;
1964 }
1966 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1967 $app->setTitle($this->getTitle());
1968 $app->setSubtitle('crs_cal_reg_start');
1969 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1970 $app->setDescription($this->getLongDescription());
1971 $app->setStart(new ilDateTime($this->getSubscriptionStart(), IL_CAL_UNIX));
1972 $apps[] = $app;
1973
1974 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1975 $app->setTitle($this->getTitle());
1976 $app->setSubtitle('crs_cal_reg_end');
1977 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1978 $app->setDescription($this->getLongDescription());
1979 $app->setStart(new ilDateTime($this->getSubscriptionEnd(), IL_CAL_UNIX));
1980 $apps[] = $app;
1981 }
1982 if ($this->getCourseStart() && $this->getCourseEnd()) {
1983 $app = new ilCalendarAppointmentTemplate(self::CAL_COURSE_START);
1984 $app->setTitle($this->getTitle());
1985 $app->setSubtitle('crs_cal_start');
1986 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1987 $app->setDescription($this->getLongDescription());
1988 $app->setStart($this->getCourseStart());
1989 $app->setFullday(!$this->getCourseStartTimeIndication());
1990 $apps[] = $app;
1991
1992 $app = new ilCalendarAppointmentTemplate(self::CAL_COURSE_END);
1993 $app->setTitle($this->getTitle());
1994 $app->setSubtitle('crs_cal_end');
1995 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1996 $app->setDescription($this->getLongDescription());
1997 $app->setStart($this->getCourseEnd());
1998 $app->setFullday(!$this->getCourseStartTimeIndication());
1999 $apps[] = $app;
2000 }
2001 if (
2003 ) {
2005 foreach ($active as $null => $item) {
2006 if ($item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING) {
2007 // create calendar entry for fixed types
2008 $app = new ilCalendarAppointmentTemplate(self::CAL_COURSE_TIMING_START);
2009 $app->setContextInfo($item['ref_id']);
2010 $app->setTitle($item['title']);
2011 $app->setSubtitle('cal_crs_timing_start');
2012 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
2013 $app->setStart(new ilDate($item['suggestion_start'], IL_CAL_UNIX));
2014 $app->setFullday(true);
2015 $apps[] = $app;
2016
2017 $app = new ilCalendarAppointmentTemplate(self::CAL_COURSE_TIMING_END);
2018 $app->setContextInfo($item['ref_id']);
2019 $app->setTitle($item['title']);
2020 $app->setSubtitle('cal_crs_timing_end');
2021 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
2022 $app->setStart(new ilDate($item['suggestion_end'], IL_CAL_UNIX));
2023 $app->setFullday(true);
2024 $apps[] = $app;
2025 }
2026 }
2027 }
2028 return $apps ? $apps : array();
2029
2030 case 'delete':
2031 // Nothing to do: The category and all assigned appointments will be deleted.
2032 return array();
2033 }
2034 }
const IL_CAL_TRANSLATION_SYSTEM
const IL_CRS_SUBSCRIPTION_LIMITED
Apointment templates are used for automatic generated apointments.
static getTimingsItems($a_container_ref_id)
Get (sub) item data for timings view (no session material, no side blocks)
getLongDescription()
get object long description (stored in object_description)
$app
Definition: cli.php:38

References $app, getActivationEnd(), getActivationStart(), getActivationUnlimitedStatus(), getCourseEnd(), getCourseStart(), getCourseStartTimeIndication(), ilObject\getLongDescription(), ilObject\getOfflineStatus(), ilObject\getRefId(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionStart(), ilObjectActivation\getTimingsItems(), ilObject\getTitle(), getViewMode(), IL_CAL_TRANSLATION_SYSTEM, IL_CAL_UNIX, IL_CRS_SUBSCRIPTION_LIMITED, ilCourseConstants\IL_CRS_VIEW_TIMING, and ilObjectActivation\TIMINGS_PRESETTING.

Referenced by create(), delete(), and update().

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

◆ read()

ilObjCourse::read ( )

read

@access public

Parameters

return

Reimplemented from ilContainer.

Definition at line 745 of file class.ilObjCourse.php.

746 {
747 parent::read();
748
749 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
751
752 $this->__readSettings();
753 }
static _lookupSortMode($a_obj_id)
lookup sort mode
setOrderType($a_value)

References __readSettings(), ilContainerSortingSettings\_lookupSortMode(), ilObject\getId(), and ilContainer\setOrderType().

+ Here is the call graph for this function:

◆ register()

ilObjCourse::register (   $a_user_id,
  $a_role = ilCourseConstants::CRS_MEMBER,
  $a_force_registration = false 
)
See also
ilMembershipRegistrationCodes::register()
Parameters
intuser_id
introle
boolforce registration and do not check registration constraints.
Exceptions
ilMembershipRegistrationException

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

2067 {
2068 global $DIC;
2069
2070 $ilCtrl = $DIC['ilCtrl'];
2071 $tree = $DIC['tree'];
2072 include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
2073 include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
2075
2076 if ($part->isAssigned($a_user_id)) {
2077 return true;
2078 }
2079
2080 if (!$a_force_registration) {
2081 // offline
2082 if (ilObjCourseAccess::_isOffline($this->getId())) {
2084 "Can't register to course, course is offline.",
2086 );
2087 }
2088 // activation
2089 if (!ilObjCourseAccess::_isActivated($this->getId())) {
2091 "Can't register to course, course is not activated.",
2093 );
2094 }
2095
2098 throw new ilMembershipRegistrationException('Cant registrate to course ' . $this->getId() .
2099 ', course subscription is deactivated.', ilMembershipRegistrationException::REGISTRATION_CODE_DISABLED);
2100 }
2101 }
2102
2103 // Time Limitation
2105 if (!$this->inSubscriptionTime()) {
2106 throw new ilMembershipRegistrationException('Cant registrate to course ' . $this->getId() .
2107 ', course is out of registration time.', ilMembershipRegistrationException::OUT_OF_REGISTRATION_PERIOD);
2108 }
2109 }
2110
2111 // Max members
2112 if ($this->isSubscriptionMembershipLimited()) {
2113 $free = max(0, $this->getSubscriptionMaxMembers() - $part->getCountMembers());
2114 include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
2115 $waiting_list = new ilCourseWaitingList($this->getId());
2116 if ($this->enabledWaitingList() and (!$free or $waiting_list->getCountUsers())) {
2117 $waiting_list->addToList($a_user_id);
2118 $this->lng->loadLanguageModule("crs");
2119 $info = sprintf(
2120 $this->lng->txt('crs_added_to_list'),
2121 $waiting_list->getPosition($a_user_id)
2122 );
2123 include_once('./Modules/Course/classes/class.ilCourseParticipants.php');
2124 $participants = ilCourseParticipants::_getInstanceByObjId($this->getId());
2125 $participants->sendNotification($participants->NOTIFY_WAITING_LIST, $a_user_id);
2126
2128 }
2129
2130 if (!$this->enabledWaitingList() && !$free) {
2131 throw new ilMembershipRegistrationException('Cant registrate to course ' . $this->getId() .
2132 ', membership is limited.', ilMembershipRegistrationException::OBJECT_IS_FULL);
2133 }
2134 }
2135 }
2136
2137 $part->add($a_user_id, $a_role);
2138 $part->sendNotification($part->NOTIFY_ACCEPT_USER, $a_user_id);
2139 $part->sendNotification($part->NOTIFY_ADMINS, $a_user_id);
2140
2141
2142 include_once './Modules/Forum/classes/class.ilForumNotification.php';
2144
2145 return true;
2146 }
static checkForumsExistsInsert($ref_id, $user_id=0)
static _usingRegistrationCode()
Using Registration code.
static _isOffline($a_obj_id)
Type-specific implementation of general status.

References $DIC, ilContainer\$tree, ilCourseParticipants\_getInstanceByObjId(), ilObjCourseAccess\_isActivated(), ilObjCourseAccess\_isOffline(), ilObjCourseAccess\_usingRegistrationCode(), ilMembershipRegistrationException\ADDED_TO_WAITINGLIST, ilForumNotification\checkForumsExistsInsert(), enabledWaitingList(), ilObject\getId(), ilObject\getRefId(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_LIMITED, inSubscriptionTime(), isSubscriptionMembershipLimited(), ilMembershipRegistrationException\OBJECT_IS_FULL, ilMembershipRegistrationException\OUT_OF_REGISTRATION_PERIOD, ilMembershipRegistrationException\REGISTRATION_CODE_DISABLED, ilMembershipRegistrationException\REGISTRATION_INVALID_AVAILABILITY, and ilMembershipRegistrationException\REGISTRATION_INVALID_OFFLINE.

+ Here is the call graph for this function:

◆ setAboStatus()

ilObjCourse::setAboStatus (   $a_status)

Definition at line 641 of file class.ilObjCourse.php.

642 {
643 $this->abo = $a_status;
644 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setActivationEnd()

ilObjCourse::setActivationEnd (   $a_value)

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

311 {
312 $this->activation_end = $a_value;
313 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setActivationStart()

ilObjCourse::setActivationStart (   $a_value)

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

303 {
304 $this->activation_start = $a_value;
305 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjCourse::setActivationVisibility (   $a_value)

Definition at line 314 of file class.ilObjCourse.php.

315 {
316 $this->activation_visibility = (bool) $a_value;
317 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setArchiveEnd()

ilObjCourse::setArchiveEnd (   $a_value)

Definition at line 629 of file class.ilObjCourse.php.

630 {
631 $this->archive_end = $a_value;
632 }

◆ setArchiveStart()

ilObjCourse::setArchiveStart (   $a_value)

Definition at line 621 of file class.ilObjCourse.php.

622 {
623 $this->archive_start = $a_value;
624 }

◆ setArchiveType()

ilObjCourse::setArchiveType (   $a_value)

Definition at line 637 of file class.ilObjCourse.php.

638 {
639 $this->archive_type = $a_value;
640 }

◆ setAutoNotification()

ilObjCourse::setAutoNotification (   $value)

Sets automatic notification status in $this->auto_notification, using given $status.

Parameters
mixedboolean

Definition at line 2166 of file class.ilObjCourse.php.

2167 {
2168 $this->auto_notification = $value;
2169 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setCancellationEnd()

ilObjCourse::setCancellationEnd ( ilDate  $a_value = null)

Definition at line 937 of file class.ilObjCourse.php.

938 {
939 $this->leave_end = $a_value;
940 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setContactConsultation()

ilObjCourse::setContactConsultation (   $a_value)

Definition at line 261 of file class.ilObjCourse.php.

262 {
263 $this->contact_consultation = $a_value;
264 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setContactEmail()

ilObjCourse::setContactEmail (   $a_value)

Definition at line 277 of file class.ilObjCourse.php.

278 {
279 $this->contact_email = $a_value;
280 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setContactName()

ilObjCourse::setContactName (   $a_cn)

Definition at line 253 of file class.ilObjCourse.php.

254 {
255 $this->contact_name = $a_cn;
256 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setContactPhone()

ilObjCourse::setContactPhone (   $a_value)

Definition at line 269 of file class.ilObjCourse.php.

270 {
271 $this->contact_phone = $a_value;
272 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setContactResponsibility()

ilObjCourse::setContactResponsibility (   $a_value)

Definition at line 285 of file class.ilObjCourse.php.

286 {
287 $this->contact_responsibility = $a_value;
288 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setCourseEnd()

ilObjCourse::setCourseEnd ( ilDateTime  $a_value = null)
protected
Parameters
\ilDateTime | null$a_value

Definition at line 924 of file class.ilObjCourse.php.

925 {
926 $this->crs_end = $a_value;
927 }

Referenced by setCoursePeriod().

+ Here is the caller graph for this function:

◆ setCoursePeriod()

ilObjCourse::setCoursePeriod ( \ilDateTime  $start = null,
\ilDateTime  $end = null 
)
Parameters
\ilDateTime | null$start
\ilDateTime | null$end
Exceptions
InvalidArgumentException

Definition at line 870 of file class.ilObjCourse.php.

871 {
872 if (
873 ($start instanceof \ilDate && !$end instanceof ilDate) ||
874 ($end instanceof \ilDate && !$start instanceof ilDate)
875 ) {
876 throw new InvalidArgumentException('Different date types not supported.');
877 }
878
879 if ($start instanceof \ilDate) {
881 } else {
883 }
884 $this->setCourseStart($start);
885 $this->setCourseEnd($end);
886 }
setCourseStart(ilDateTime $a_value=null)
setCourseEnd(ilDateTime $a_value=null)

References setCourseEnd(), setCourseStart(), and toggleCourseStartTimeIndication().

Referenced by __readSettings(), and cloneSettings().

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

◆ setCourseStart()

ilObjCourse::setCourseStart ( ilDateTime  $a_value = null)
protected
Parameters
\ilDateTime | null$a_value

Definition at line 908 of file class.ilObjCourse.php.

909 {
910 $this->crs_start = $a_value;
911 }

Referenced by setCoursePeriod().

+ Here is the caller graph for this function:

◆ setEnableCourseMap()

ilObjCourse::setEnableCourseMap (   $a_enablemap)

Set Enable Course Map.

Parameters
boolean$a_enablemapEnable Course Map

Definition at line 841 of file class.ilObjCourse.php.

842 {
843 $this->enablemap = $a_enablemap;
844 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setImportantInformation()

ilObjCourse::setImportantInformation (   $a_info)

Definition at line 220 of file class.ilObjCourse.php.

221 {
222 $this->important = $a_info;
223 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setLatitude()

ilObjCourse::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

782 {
783 $this->latitude = $a_latitude;
784 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjCourse::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

Definition at line 821 of file class.ilObjCourse.php.

822 {
823 $this->locationzoom = $a_locationzoom;
824 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setLongitude()

ilObjCourse::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

Definition at line 801 of file class.ilObjCourse.php.

802 {
803 $this->longitude = $a_longitude;
804 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setMailToMembersType()

ilObjCourse::setMailToMembersType (   $a_type)

Set mail to members type.

See also
ilCourseConstants
Parameters
type$a_type

Definition at line 663 of file class.ilObjCourse.php.

664 {
665 $this->mail_members = $a_type;
666 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setMessage()

ilObjCourse::setMessage (   $a_message)

Definition at line 681 of file class.ilObjCourse.php.

682 {
683 $this->message = $a_message;
684 }

Referenced by validate().

+ Here is the caller graph for this function:

◆ setNumberOfNextSessions()

ilObjCourse::setNumberOfNextSessions (   $a_num)

Set number of previous sessions.

Returns
Parameters
int$a_num

Definition at line 445 of file class.ilObjCourse.php.

446 {
447 $this->session_next = $a_num;
448 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setNumberOfPreviousSessions()

ilObjCourse::setNumberOfPreviousSessions (   $a_num)

Set number of previous sessions.

Returns
Parameters
int$a_num

Definition at line 426 of file class.ilObjCourse.php.

427 {
428 $this->session_prev = $a_num;
429 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setParentRolePermissions()

ilObjCourse::setParentRolePermissions (   $a_parent_ref)

This method is called before "initDefaultRoles".

Therefore now local course roles are created.

Grants permissions on the course object for all parent roles. Each permission is granted by computing the intersection of the template il_crs_non_member and the permission template of the parent role.

Parameters
type$a_parent_ref

Reimplemented from ilObject.

Definition at line 1679 of file class.ilObjCourse.php.

1680 {
1681 global $DIC;
1682
1683 $rbacadmin = $DIC['rbacadmin'];
1684 $rbacreview = $DIC['rbacreview'];
1685
1686 $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1687 foreach ((array) $parent_roles as $parent_role) {
1688 $rbacadmin->initIntersectionPermissions(
1689 $this->getRefId(),
1690 $parent_role['obj_id'],
1691 $parent_role['parent'],
1694 );
1695 }
1696 }
__getCrsNonMemberTemplateId()
get course non-member template @access private
const ROLE_FOLDER_ID
Definition: constants.php:32

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, __getCrsNonMemberTemplateId(), ilObject\getRefId(), and ROLE_FOLDER_ID.

+ Here is the call graph for this function:

◆ setRegistrationAccessCode()

ilObjCourse::setRegistrationAccessCode (   $a_code)

Set refistration access code.

Parameters
string$a_code
Returns

Definition at line 192 of file class.ilObjCourse.php.

193 {
194 $this->reg_access_code = $a_code;
195 }

Referenced by __createDefaultSettings(), __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjCourse::setShowMembers (   $a_status)

Definition at line 649 of file class.ilObjCourse.php.

650 {
651 $this->show_members = $a_status;
652 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setShowMembersExport()

ilObjCourse::setShowMembersExport (   $a_mem_export)

Definition at line 173 of file class.ilObjCourse.php.

174 {
175 $this->member_export = $a_mem_export;
176 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setStatusDetermination()

ilObjCourse::setStatusDetermination (   $a_value)

Set status determination mode.

Parameters
int$a_value

Definition at line 2176 of file class.ilObjCourse.php.

2177 {
2178 $a_value = (int) $a_value;
2179
2180 // #13905
2181 if ($a_value == self::STATUS_DETERMINATION_LP) {
2182 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
2185 }
2186 }
2187
2188 $this->status_dt = $a_value;
2189 }
const STATUS_DETERMINATION_MANUAL

References ilObjUserTracking\_enabledLearningProgress(), and STATUS_DETERMINATION_MANUAL.

Referenced by __construct(), __readSettings(), and cloneSettings().

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

◆ setSubscriptionEnd()

ilObjCourse::setSubscriptionEnd (   $a_value)

Definition at line 347 of file class.ilObjCourse.php.

348 {
349 $this->subscription_end = $a_value;
350 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionLimitationType()

ilObjCourse::setSubscriptionLimitationType (   $a_type)

Definition at line 327 of file class.ilObjCourse.php.

328 {
329 $this->subscription_limitation_type = $a_type;
330 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionMaxMembers()

ilObjCourse::setSubscriptionMaxMembers (   $a_value)

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

475 {
476 $this->subscription_max_members = $a_value;
477 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionMinMembers()

ilObjCourse::setSubscriptionMinMembers (   $a_value)

Definition at line 947 of file class.ilObjCourse.php.

948 {
949 if ($a_value !== null) {
950 $a_value = (int) $a_value;
951 }
952 $this->min_members = $a_value;
953 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionNotify()

ilObjCourse::setSubscriptionNotify (   $a_value)

Definition at line 533 of file class.ilObjCourse.php.

534 {
535 $this->subscription_notify = $a_value ? true : false;
536 }

References true.

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionPassword()

ilObjCourse::setSubscriptionPassword (   $a_value)

Definition at line 364 of file class.ilObjCourse.php.

365 {
366 $this->subscription_password = $a_value;
367 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionStart()

ilObjCourse::setSubscriptionStart (   $a_value)

Definition at line 339 of file class.ilObjCourse.php.

340 {
341 $this->subscription_start = $a_value;
342 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionType()

ilObjCourse::setSubscriptionType (   $a_value)

Definition at line 356 of file class.ilObjCourse.php.

357 {
358 $this->subscription_type = $a_value;
359 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setSyllabus()

ilObjCourse::setSyllabus (   $a_syllabus)

Definition at line 228 of file class.ilObjCourse.php.

229 {
230 $this->syllabus = $a_syllabus;
231 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setTargetGroup()

ilObjCourse::setTargetGroup ( ?string  $a_tg)
Parameters
string | null$a_tg

Definition at line 244 of file class.ilObjCourse.php.

245 {
246 $this->target_group = $a_tg;
247 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setTimingMode()

ilObjCourse::setTimingMode (   $a_mode)
Parameters
int$a_mode

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

571 {
572 $this->timing_mode = $a_mode;
573 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setViewMode()

ilObjCourse::setViewMode (   $a_mode)

Definition at line 538 of file class.ilObjCourse.php.

539 {
540 $this->view_mode = $a_mode;
541 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjCourse::setWaitingListAutoFill (   $a_value)

Definition at line 960 of file class.ilObjCourse.php.

961 {
962 $this->auto_fill_from_waiting = (bool) $a_value;
963 }

Referenced by __readSettings(), and cloneSettings().

+ Here is the caller graph for this function:

◆ syncMembersStatusWithLP()

ilObjCourse::syncMembersStatusWithLP ( )

Set course status for all members by lp status.

Definition at line 2204 of file class.ilObjCourse.php.

2205 {
2206 include_once "Services/Tracking/classes/class.ilLPStatusWrapper.php";
2207 foreach ($this->getMembersObject()->getParticipants() as $user_id) {
2208 // #15529 - force raise on sync
2209 ilLPStatusWrapper::_updateStatus($this->getId(), $user_id, null, false, true);
2210 }
2211 }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.

References ilLPStatusWrapper\_updateStatus(), ilObject\getId(), and getMembersObject().

+ Here is the call graph for this function:

◆ toggleCourseStartTimeIndication()

ilObjCourse::toggleCourseStartTimeIndication ( bool  $time_indication)
protected
Parameters
bool$time_indication

Definition at line 891 of file class.ilObjCourse.php.

892 {
893 $this->course_start_time_indication = $time_indication;
894 }

Referenced by __readSettings(), and setCoursePeriod().

+ Here is the caller graph for this function:

◆ update()

ilObjCourse::update ( )

update complete object

Reimplemented from ilContainer.

Definition at line 1252 of file class.ilObjCourse.php.

1253 {
1254 global $DIC;
1255
1256 $ilAppEventHandler = $DIC['ilAppEventHandler'];
1257 $ilLog = $DIC->logger()->crs();
1258
1259 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
1260 $sorting = new ilContainerSortingSettings($this->getId());
1261 $sorting->setSortMode($this->getOrderType());
1262 $sorting->update();
1263
1264 $this->updateMetaData();
1265 $this->updateSettings();
1266 parent::update();
1267
1268 $ilAppEventHandler->raise(
1269 'Modules/Course',
1270 'update',
1271 array('object' => $this,
1272 'obj_id' => $this->getId(),
1273 'appointments' => $this->prepareAppointments('update'))
1274 );
1275 }
updateSettings()
Update settings.
updateMetaData()
update meta data entry

References $DIC, ilObject\getId(), getOrderType(), prepareAppointments(), ilObject\updateMetaData(), and updateSettings().

Referenced by cloneSettings().

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

◆ updateSettings()

ilObjCourse::updateSettings ( )

Update settings.

Definition at line 1280 of file class.ilObjCourse.php.

1281 {
1282 global $DIC;
1283
1284 $ilDB = $DIC['ilDB'];
1285
1286 // Due to a bug 3.5.alpha maybe no settings exist. => create default settings
1287
1288 $query = "SELECT * FROM crs_settings WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer') . " ";
1289 $res = $ilDB->query($query);
1290
1291 if (!$res->numRows()) {
1292 $this->__createDefaultSettings();
1293 }
1294
1295
1296 $query = "UPDATE crs_settings SET " .
1297 "syllabus = " . $ilDB->quote($this->getSyllabus(), 'text') . ", " .
1298 "contact_name = " . $ilDB->quote($this->getContactName(), 'text') . ", " .
1299 "contact_responsibility = " . $ilDB->quote($this->getContactResponsibility(), 'text') . ", " .
1300 "contact_phone = " . $ilDB->quote($this->getContactPhone(), 'text') . ", " .
1301 "contact_email = " . $ilDB->quote($this->getContactEmail(), 'text') . ", " .
1302 "contact_consultation = " . $ilDB->quote($this->getContactConsultation(), 'text') . ", " .
1303 "activation_type = " . $ilDB->quote(!$this->getOfflineStatus(), 'integer') . ", " .
1304 "sub_limitation_type = " . $ilDB->quote($this->getSubscriptionLimitationType(), 'integer') . ", " .
1305 "sub_start = " . $ilDB->quote($this->getSubscriptionStart(), 'integer') . ", " .
1306 "sub_end = " . $ilDB->quote($this->getSubscriptionEnd(), 'integer') . ", " .
1307 "sub_type = " . $ilDB->quote($this->getSubscriptionType(), 'integer') . ", " .
1308 "sub_password = " . $ilDB->quote($this->getSubscriptionPassword(), 'text') . ", " .
1309 "sub_mem_limit = " . $ilDB->quote((int) $this->isSubscriptionMembershipLimited(), 'integer') . ", " .
1310 "sub_max_members = " . $ilDB->quote($this->getSubscriptionMaxMembers(), 'integer') . ", " .
1311 "sub_notify = " . $ilDB->quote($this->getSubscriptionNotify(), 'integer') . ", " .
1312 "view_mode = " . $ilDB->quote($this->getViewMode(), 'integer') . ", " .
1313 'timing_mode = ' . $ilDB->quote($this->getTimingMode(), 'integer') . ', ' .
1314 "abo = " . $ilDB->quote($this->getAboStatus(), 'integer') . ", " .
1315 "waiting_list = " . $ilDB->quote($this->enabledWaitingList(), 'integer') . ", " .
1316 "important = " . $ilDB->quote($this->getImportantInformation(), 'text') . ", " .
1317 'target_group = ' . $ilDB->quote($this->getTargetGroup(), \ilDBConstants::T_TEXT) . ', ' .
1318 "show_members = " . $ilDB->quote($this->getShowMembers(), 'integer') . ", " .
1319 "show_members_export = " . $ilDB->quote($this->getShowMembersExport(), 'integer') . ", " .
1320 "latitude = " . $ilDB->quote($this->getLatitude(), 'text') . ", " .
1321 "longitude = " . $ilDB->quote($this->getLongitude(), 'text') . ", " .
1322 "location_zoom = " . $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
1323 "enable_course_map = " . $ilDB->quote((int) $this->getEnableCourseMap(), 'integer') . ", " .
1324 'session_limit = ' . $ilDB->quote($this->isSessionLimitEnabled(), 'integer') . ', ' .
1325 'session_prev = ' . $ilDB->quote($this->getNumberOfPreviousSessions(), 'integer') . ', ' .
1326 'session_next = ' . $ilDB->quote($this->getNumberOfNextSessions(), 'integer') . ', ' .
1327 'reg_ac_enabled = ' . $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
1328 'reg_ac = ' . $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
1329 'auto_notification = ' . $ilDB->quote((int) $this->getAutoNotification(), 'integer') . ', ' .
1330 'status_dt = ' . $ilDB->quote((int) $this->getStatusDetermination()) . ', ' .
1331 'mail_members_type = ' . $ilDB->quote((int) $this->getMailToMembersType(), 'integer') . ', ' .
1332 'period_start = ' . $ilDB->quote(\ilCalendarUtil::convertDateToUtcDBTimestamp($this->getCourseStart()), \ilDBConstants::T_TIMESTAMP) . ', ' .
1334 'period_time_indication = ' . $ilDB->quote($this->getCourseStartTimeIndication() ? 1 : 0, \ilDBConstants::T_INTEGER) . ', ' .
1335 'auto_wait = ' . $ilDB->quote((int) $this->hasWaitingListAutoFill(), 'integer') . ', ' .
1336 'leave_end = ' . $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
1337 'min_members = ' . $ilDB->quote((int) $this->getSubscriptionMinMembers(), 'integer') . ' ' .
1338 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer') . "";
1339
1340 $res = $ilDB->manipulate($query);
1341
1342 // moved activation to ilObjectActivation
1343 if ($this->ref_id) {
1344 include_once "./Services/Object/classes/class.ilObjectActivation.php";
1345 ilObjectActivation::getItem($this->ref_id);
1346
1347 $item = new ilObjectActivation;
1348 if (!$this->getActivationStart() || !$this->getActivationEnd()) {
1350 } else {
1351 $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
1352 $item->setTimingStart($this->getActivationStart());
1353 $item->setTimingEnd($this->getActivationEnd());
1354 $item->toggleVisible($this->getActivationVisibility());
1355 }
1356
1357 $item->update($this->ref_id);
1358 }
1359 }
static convertDateToUtcDBTimestamp(\ilDateTime $date=null)
Class ilObjectActivation.
setTimingType($a_type)
Set timing type.

References $DIC, $ilDB, $query, $res, __createDefaultSettings(), ilCalendarUtil\convertDateToUtcDBTimestamp(), enabledWaitingList(), getAboStatus(), getActivationEnd(), getActivationStart(), getActivationVisibility(), getAutoNotification(), getCancellationEnd(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getCourseEnd(), getCourseStart(), getCourseStartTimeIndication(), getEnableCourseMap(), ilObject\getId(), getImportantInformation(), ilObjectActivation\getItem(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getNumberOfNextSessions(), getNumberOfPreviousSessions(), ilObject\getOfflineStatus(), getRegistrationAccessCode(), getShowMembers(), getShowMembersExport(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionMinMembers(), getSubscriptionNotify(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), getSyllabus(), getTargetGroup(), getTimingMode(), getViewMode(), hasWaitingListAutoFill(), IL_CAL_UNIX, isRegistrationAccessCodeEnabled(), isSessionLimitEnabled(), isSubscriptionMembershipLimited(), ilObjectActivation\setTimingType(), ilDBConstants\T_INTEGER, ilDBConstants\T_TEXT, ilDBConstants\T_TIMESTAMP, ilObjectActivation\TIMINGS_ACTIVATION, and ilObjectActivation\TIMINGS_DEACTIVATED.

Referenced by update().

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

◆ validate()

ilObjCourse::validate ( )

Definition at line 1131 of file class.ilObjCourse.php.

1132 {
1133 $this->setMessage('');
1134
1136 $this->getSubscriptionStart() > $this->getSubscriptionEnd()) {
1137 $this->appendMessage($this->lng->txt("subscription_times_not_valid"));
1138 }
1140 $this->appendMessage($this->lng->txt("crs_password_required"));
1141 }
1142 if ($this->isSubscriptionMembershipLimited()) {
1143 if ($this->getSubscriptionMinMembers() <= 0 && $this->getSubscriptionMaxMembers() <= 0) {
1144 $this->appendMessage($this->lng->txt("crs_max_and_min_members_needed"));
1145 }
1146 if ($this->getSubscriptionMaxMembers() <= 0 && $this->enabledWaitingList()) {
1147 $this->appendMessage($this->lng->txt("crs_max_members_needed"));
1148 }
1149 if ($this->getSubscriptionMaxMembers() > 0 && $this->getSubscriptionMinMembers() > $this->getSubscriptionMaxMembers()) {
1150 $this->appendMessage($this->lng->txt("crs_max_and_min_members_invalid"));
1151 }
1152 }
1153 if (!$this->getTitle() || !$this->getStatusDetermination()) {
1154 $this->appendMessage($this->lng->txt('err_check_input'));
1155 }
1156
1157 // :TODO: checkInput() is not used properly
1158 if (($this->getCourseStart() && !$this->getCourseEnd()) ||
1159 (!$this->getCourseStart() && $this->getCourseEnd()) ||
1160 ($this->getCourseStart() && $this->getCourseEnd() && $this->getCourseStart()->get(IL_CAL_UNIX) > $this->getCourseEnd()->get(IL_CAL_UNIX))) {
1161 $this->appendMessage($this->lng->txt("crs_course_period_not_valid"));
1162 }
1163
1164 return $this->getMessage() ? false : true;
1165 }
const IL_CRS_SUBSCRIPTION_PASSWORD
setMessage($a_message)
appendMessage($a_message)

References appendMessage(), enabledWaitingList(), getCourseEnd(), getCourseStart(), getMessage(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionMinMembers(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), ilObject\getTitle(), IL_CAL_UNIX, IL_CRS_SUBSCRIPTION_LIMITED, IL_CRS_SUBSCRIPTION_PASSWORD, isSubscriptionMembershipLimited(), and setMessage().

+ Here is the call graph for this function:

◆ validateInfoSettings()

ilObjCourse::validateInfoSettings ( )

Definition at line 1167 of file class.ilObjCourse.php.

1168 {
1169 global $DIC;
1170
1171 $ilErr = $DIC['ilErr'];
1172 $error = false;
1173 if ($this->getContactEmail()) {
1174 $emails = explode(",", $this->getContactEmail());
1175
1176 foreach ($emails as $email) {
1177 $email = trim($email);
1179 $ilErr->appendMessage($this->lng->txt('contact_email_not_valid') . " '" . $email . "'");
1180 $error = true;
1181 }
1182 }
1183 }
1184 return !$error;
1185 }
static getUserIdByLogin($a_login)
static is_email($a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid.
if( $orgName !==null) if($spconfig->hasValue('contacts')) $email
Definition: metadata.php:285
$ilErr
Definition: raiseError.php:18

References $DIC, $email, ilContainer\$error, $ilErr, getContactEmail(), ilObjUser\getUserIdByLogin(), and ilUtil\is_email().

+ Here is the call graph for this function:

Field Documentation

◆ $archives_obj

ilObjCourse::$archives_obj

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

◆ $auto_fill_from_waiting

ilObjCourse::$auto_fill_from_waiting
protected

Definition at line 93 of file class.ilObjCourse.php.

Referenced by hasWaitingListAutoFill().

◆ $auto_notification

ilObjCourse::$auto_notification = true
private

Definition at line 110 of file class.ilObjCourse.php.

Referenced by getAutoNotification().

◆ $course_logger

ilObjCourse::$course_logger = null
protected

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

◆ $course_start_time_indication

ilObjCourse::$course_start_time_indication = false
protected

Definition at line 78 of file class.ilObjCourse.php.

Referenced by getCourseStartTimeIndication().

◆ $crs_end

ilObjCourse::$crs_end
protected

Definition at line 88 of file class.ilObjCourse.php.

Referenced by getCourseEnd().

◆ $crs_start

ilObjCourse::$crs_start
protected

Definition at line 83 of file class.ilObjCourse.php.

Referenced by getCourseStart().

◆ $enablemap

ilObjCourse::$enablemap = 0
private

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

Referenced by getEnableCourseMap().

◆ $latitude

ilObjCourse::$latitude = ''
private

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

Referenced by getLatitude().

◆ $leave_end

ilObjCourse::$leave_end
protected

Definition at line 91 of file class.ilObjCourse.php.

Referenced by getCancellationEnd().

◆ $locationzoom

ilObjCourse::$locationzoom = 0
private

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

Referenced by getLocationZoom().

◆ $longitude

ilObjCourse::$longitude = ''
private

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

Referenced by getLongitude().

◆ $mail_members

ilObjCourse::$mail_members = ilCourseConstants::MAIL_ALLOWED_ALL
private

Definition at line 73 of file class.ilObjCourse.php.

Referenced by getMailToMembersType().

◆ $member_export

ilObjCourse::$member_export = false
protected

Definition at line 98 of file class.ilObjCourse.php.

Referenced by getShowMembersExport().

◆ $member_obj

ilObjCourse::$member_obj = null
private

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

Referenced by getMemberObject().

◆ $members_obj

ilObjCourse::$members_obj = null
private

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

Referenced by getMembersObject().

◆ $min_members

ilObjCourse::$min_members
protected

Definition at line 92 of file class.ilObjCourse.php.

Referenced by getSubscriptionMinMembers().

◆ $reg_access_code

ilObjCourse::$reg_access_code = ''
private

Definition at line 69 of file class.ilObjCourse.php.

Referenced by getRegistrationAccessCode().

◆ $reg_access_code_enabled

ilObjCourse::$reg_access_code_enabled = false
private

Definition at line 70 of file class.ilObjCourse.php.

Referenced by isRegistrationAccessCodeEnabled().

◆ $session_limit

ilObjCourse::$session_limit = 0
private

Definition at line 65 of file class.ilObjCourse.php.

Referenced by isSessionLimitEnabled().

◆ $session_next

ilObjCourse::$session_next = -1
private

Definition at line 67 of file class.ilObjCourse.php.

Referenced by getNumberOfNextSessions().

◆ $session_prev

ilObjCourse::$session_prev = -1
private

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

Referenced by getNumberOfPreviousSessions().

◆ $status_dt

ilObjCourse::$status_dt = null
private

Definition at line 71 of file class.ilObjCourse.php.

Referenced by getStatusDetermination().

◆ $target_group

ilObjCourse::$target_group = ''
private

Definition at line 116 of file class.ilObjCourse.php.

Referenced by getTargetGroup().

◆ $timing_mode

ilObjCourse::$timing_mode = ilCourseConstants::IL_CRS_VIEW_TIMING_ABSOLUTE
private

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

Referenced by getTimingMode().

◆ CAL_ACTIVATION_END

const ilObjCourse::CAL_ACTIVATION_END = 4

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

◆ CAL_ACTIVATION_START

const ilObjCourse::CAL_ACTIVATION_START = 3

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

◆ CAL_COURSE_END

const ilObjCourse::CAL_COURSE_END = 6

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

◆ CAL_COURSE_START

const ilObjCourse::CAL_COURSE_START = 5

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

◆ CAL_COURSE_TIMING_END

◆ CAL_COURSE_TIMING_START

◆ CAL_REG_END

const ilObjCourse::CAL_REG_END = 2

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

◆ CAL_REG_START

const ilObjCourse::CAL_REG_START = 1

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

◆ STATUS_DETERMINATION_LP

◆ STATUS_DETERMINATION_MANUAL

const ilObjCourse::STATUS_DETERMINATION_MANUAL = 2

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

Referenced by ilObjCourseGUI\initEditForm(), and setStatusDetermination().


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