ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjCourse Class Reference

Class ilObjCourse. More...

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

Public Member Functions

 ilObjCourse ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 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)
 
 getContactName ()
 
 setContactName ($a_cn)
 
 getContactConsultation ()
 
 setContactConsultation ($a_value)
 
 getContactPhone ()
 
 setContactPhone ($a_value)
 
 getContactEmail ()
 
 setContactEmail ($a_value)
 
 getContactResponsibility ()
 
 setContactResponsibility ($a_value)
 
 getActivationType ()
 
 setActivationType ($a_type)
 
 getActivationUnlimitedStatus ()
 
 getActivationStart ()
 
 setActivationStart ($a_value)
 
 getActivationEnd ()
 
 setActivationEnd ($a_value)
 
 getOfflineStatus ()
 
 setOfflineStatus ($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)
 Get subitems of container. More...
 
 getSubscriptionNotify ()
 
 setSubscriptionNotify ($a_value)
 
 setViewMode ($a_mode)
 
 getViewMode ()
 Get container view mode. More...
 
 _lookupViewMode ($a_id)
 
 _lookupAboStatus ($a_id)
 
 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 ($a_check_archive=false)
 
 _isActivated ($a_obj_id)
 Is activated. More...
 
 _registrationEnabled ($a_obj_id)
 Registration enabled? Method is in Access class, since it is needed by Access/ListGUI. More...
 
 isArchived ()
 
 allowAbo ()
 
 read ($a_force_db=false)
 read object data from db into object 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...
 
 getEnableCourseMap ()
 Get Enable Course Map. More...
 
 cloneObject ($a_target_id, $a_copy_id=0)
 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 ()
 
 cloneSettings ($new_obj)
 Clone entries in settings table. More...
 
 __createDefaultSettings ()
 
 __readSettings ()
 
 initWaitingList ()
 
 getMemberObject ()
 Get course member object. More...
 
 getMembersObject ()
 
 initCourseArchiveObject ()
 
 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 ()
 
 _deleteUser ($a_usr_id)
 
 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...
 
- Public Member Functions inherited from ilContainer
 ilContainer ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 _getContainerDirectory ($a_id)
 Get the container directory. More...
 
 getBigIconPath ()
 Get path for big icon. More...
 
 getSmallIconPath ()
 Get path for small icon. More...
 
 getTinyIconPath ()
 Get path for tiny icon. More...
 
 getCustomIconPath ()
 Get path for custom icon. More...
 
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems). More...
 
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems). More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=NULL)
 Lookup a container setting. More...
 
 _writeContainerSetting ($a_id, $a_keyword, $a_value)
 
 _lookupIconPath ($a_id, $a_size="big")
 lookup icon path More...
 
 saveIcons ($a_custom_icon)
 save container icons More...
 
 removeCustomIcon ()
 remove small icon More...
 
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone container settings. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false)
 clone all objects according to this container More...
 
 getViewMode ()
 Get container view mode. More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 setOrderType ($a_value)
 
 getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0)
 Get subitems of container. More...
 
 gotItems ()
 Check whether we got any items. More...
 
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 enablePageEditing ()
 Check whether page editing is allowed for container. More...
 
 create ()
 Create. More...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
- Public Member Functions inherited from ilObject
 ilObject ($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 ($a_force_db=false)
 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...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class) 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...
 
 _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
 _lookupOwner ($a_id)
 lookup object owner More...
 
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
 _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type 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...
 
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 _lookupCreationDate ($a_id)
 Lookup creation date. 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 lookupCourseNonMemberTemplatesId ()
 Lookup course non member id. More...
 
static lookupObjectsByCode ($a_code)
 
- Static Public Member Functions inherited from ilContainer
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 _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupObjId ($a_id)
 
static setDeletedDates ($a_ref_ids)
 Set deleted date @global type $ilDB. More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id 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 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 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_ILINC = 7
 
const VIEW_DEFAULT = self::VIEW_BY_TYPE
 
const SORT_TITLE = 0
 
const SORT_MANUAL = 1
 
const SORT_ACTIVATION = 2
 
const SORT_INHERIT = 3
 
const SORT_CREATION = 4
 
const SORT_DIRECTION_ASC = 0
 
const SORT_DIRECTION_DESC = 1
 
const SORT_NEW_ITEMS_POSITION_TOP = 0
 
const SORT_NEW_ITEMS_POSITION_BOTTOM = 1
 
const SORT_NEW_ITEMS_ORDER_TITLE = 0
 
const SORT_NEW_ITEMS_ORDER_CREATION = 1
 
const SORT_NEW_ITEMS_ORDER_ACTIVATION = 2
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $ilias
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 
 $obj_data_record
 object_data record More...
 

Protected Member Functions

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

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
 
 $auto_notification = true
 

Additional Inherited Members

- Static Public Attributes inherited from ilContainer
static $data_preloaded = false
 
- Protected Attributes inherited from ilContainer
 $order_type = 0
 
 $hiddenfilesfound = 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.

Member Function Documentation

◆ __createDefaultSettings()

ilObjCourse::__createDefaultSettings ( )

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

1281 {
1282 global $ilDB;
1283
1284 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1286
1287 $query = "INSERT INTO crs_settings (obj_id,syllabus,contact_name,contact_responsibility,".
1288 "contact_phone,contact_email,contact_consultation,activation_type,activation_start,".
1289 "activation_end,sub_limitation_type,sub_start,sub_end,sub_type,sub_password,sub_mem_limit,".
1290 "sub_max_members,sub_notify,view_mode,archive_start,archive_end,archive_type,abo," .
1291 "latitude,longitude,location_zoom,enable_course_map,waiting_list,show_members, ".
1292 "session_limit,session_prev,session_next, reg_ac_enabled, reg_ac, auto_notification, status_dt,mail_members_type) ".
1293 "VALUES( ".
1294 $ilDB->quote($this->getId() ,'integer').", ".
1295 $ilDB->quote($this->getSyllabus() ,'text').", ".
1296 $ilDB->quote($this->getContactName() ,'text').", ".
1297 $ilDB->quote($this->getContactResponsibility() ,'text').", ".
1298 $ilDB->quote($this->getContactPhone() ,'text').", ".
1299 $ilDB->quote($this->getContactEmail() ,'text').", ".
1300 $ilDB->quote($this->getContactConsultation() ,'text').", ".
1301 $ilDB->quote(0 ,'integer').", ".
1302 $ilDB->quote($this->getActivationStart() ,'integer').", ".
1303 $ilDB->quote($this->getActivationEnd() ,'integer').", ".
1304 $ilDB->quote(IL_CRS_SUBSCRIPTION_DEACTIVATED ,'integer').", ".
1305 $ilDB->quote($this->getSubscriptionStart() ,'integer').", ".
1306 $ilDB->quote($this->getSubscriptionEnd() ,'integer').", ".
1307 $ilDB->quote(IL_CRS_SUBSCRIPTION_DIRECT ,'integer').", ".
1308 $ilDB->quote($this->getSubscriptionPassword() ,'text').", ".
1309 "0, ".
1310 $ilDB->quote($this->getSubscriptionMaxMembers() ,'integer').", ".
1311 "1, ".
1312 "0, ".
1313 $ilDB->quote($this->getArchiveStart() ,'integer').", ".
1314 $ilDB->quote($this->getArchiveEnd() ,'integer').", ".
1315 $ilDB->quote(IL_CRS_ARCHIVE_NONE ,'integer').", ".
1316 $ilDB->quote($this->ABO_ENABLED ,'integer').", ".
1317 $ilDB->quote($this->getLatitude() ,'text').", ".
1318 $ilDB->quote($this->getLongitude() ,'text').", ".
1319 $ilDB->quote($this->getLocationZoom() ,'integer').", ".
1320 $ilDB->quote($this->getEnableCourseMap() ,'integer').", ".
1321 #"objective_view = '0', ".
1322 "1, ".
1323 "1,".
1324 $ilDB->quote($this->isSessionLimitEnabled(),'integer').', '.
1325 $ilDB->quote($this->getNumberOfPreviousSessions(),'integer').', '.
1326 $ilDB->quote($this->getNumberOfPreviousSessions(),'integer').', '.
1327 $ilDB->quote($this->isRegistrationAccessCodeEnabled(),'integer').', '.
1328 $ilDB->quote($this->getRegistrationAccessCode(),'text').', '.
1329 $ilDB->quote((int)$this->getAutoNotification(),'integer').', '.
1330 $ilDB->quote((int)$this->getStatusDetermination(),'integer').', '.
1331 $ilDB->quote((int) $this->getMailToMembersType(),'integer').' '.
1332 ")";
1333
1334 $res = $ilDB->manipulate($query);
1335 $this->__readSettings();
1336
1337 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
1338 $sorting = new ilContainerSortingSettings($this->getId());
1339 $sorting->setSortMode(ilContainer::SORT_MANUAL);
1340 $sorting->update();
1341 }
const IL_CRS_ARCHIVE_NONE
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 $ilDB

References $ilDB, $query, $res, __readSettings(), ilMembershipRegistrationCodeUtils\generateCode(), getActivationEnd(), getActivationStart(), getArchiveEnd(), getArchiveStart(), getAutoNotification(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getEnableCourseMap(), ilObject\getId(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getNumberOfPreviousSessions(), getRegistrationAccessCode(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionMaxMembers(), getSubscriptionPassword(), getSubscriptionStart(), getSyllabus(), IL_CRS_ARCHIVE_NONE, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, 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 1682 of file class.ilObjCourse.php.

1683 {
1684 global $ilDB;
1685
1686 $query = "DELETE FROM crs_settings ".
1687 "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')." ";
1688 $res = $ilDB->manipulate($query);
1689
1690 return true;
1691 }

References $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 1557 of file class.ilObjCourse.php.

1558 {
1559 global $ilDB;
1560
1561 $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_crs_non_member'";
1562 $res = $this->ilias->db->query($q);
1563 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
1564
1565 return $row["obj_id"];
1566 }
const DB_FETCHMODE_ASSOC
Definition: class.ilDB.php:10
redirection script todo: (a better solution should control the processing via a xml file)

References $ilDB, $res, $row, and DB_FETCHMODE_ASSOC.

Referenced by setParentRolePermissions().

+ Here is the caller graph for this function:

◆ __getLocalRoles()

ilObjCourse::__getLocalRoles ( )

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

1674 {
1675 global $rbacreview;
1676
1677 // GET role_objects of predefined roles
1678
1679 return $rbacreview->getRolesOfRoleFolder($this->getRefId(),false);
1680 }
getRefId()
get reference id @access public

References 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 1344 of file class.ilObjCourse.php.

1345 {
1346 global $ilDB;
1347
1348 $query = "SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')."";
1349
1350 $res = $ilDB->query($query);
1351 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
1352 {
1353 $this->setSyllabus($row->syllabus);
1354 $this->setContactName($row->contact_name);
1355 $this->setContactResponsibility($row->contact_responsibility);
1356 $this->setContactPhone($row->contact_phone);
1357 $this->setContactEmail($row->contact_email);
1358 $this->setContactConsultation($row->contact_consultation);
1359 $this->setOfflineStatus(!(bool)$row->activation_type); // see below
1360 $this->setSubscriptionLimitationType($row->sub_limitation_type);
1361 $this->setSubscriptionStart($row->sub_start);
1362 $this->setSubscriptionEnd($row->sub_end);
1363 $this->setSubscriptionType($row->sub_type);
1364 $this->setSubscriptionPassword($row->sub_password);
1365 $this->enableSubscriptionMembershipLimitation($row->sub_mem_limit);
1366 $this->setSubscriptionMaxMembers($row->sub_max_members);
1367 $this->setSubscriptionNotify($row->sub_notify);
1368 $this->setViewMode($row->view_mode);
1369 $this->setArchiveStart($row->archive_start);
1370 $this->setArchiveEnd($row->archive_end);
1371 $this->setArchiveType($row->archive_type);
1372 $this->setAboStatus($row->abo);
1373 $this->enableWaitingList($row->waiting_list);
1374 $this->setImportantInformation($row->important);
1375 $this->setShowMembers($row->show_members);
1376 $this->setLatitude($row->latitude);
1377 $this->setLongitude($row->longitude);
1378 $this->setLocationZoom($row->location_zoom);
1379 $this->setEnableCourseMap($row->enable_course_map);
1380 $this->enableSessionLimit($row->session_limit);
1381 $this->setNumberOfPreviousSessions($row->session_prev);
1382 $this->setNumberOfNextSessions($row->session_next);
1383 $this->enableRegistrationAccessCode($row->reg_ac_enabled);
1384 $this->setRegistrationAccessCode($row->reg_ac);
1385 $this->setAutoNotification($row->auto_notification == 1 ? true : false);
1386 $this->setStatusDetermination((int) $row->status_dt);
1387 $this->setMailToMembersType($row->mail_members_type);
1388 }
1389
1390 // moved activation to ilObjectActivation
1391 if($this->ref_id)
1392 {
1393 include_once "./Services/Object/classes/class.ilObjectActivation.php";
1394 $activation = ilObjectActivation::getItem($this->ref_id);
1395 switch($activation["timing_type"])
1396 {
1399 $this->setActivationStart($activation["timing_start"]);
1400 $this->setActivationEnd($activation["timing_end"]);
1401 $this->setActivationVisibility($activation["visible"]);
1402 break;
1403
1404 default:
1406 break;
1407 }
1408 }
1409 else
1410 {
1411 // #13176 - there should always be default
1413 }
1414
1415 return true;
1416 }
const IL_CRS_ACTIVATION_UNLIMITED
const IL_CRS_ACTIVATION_LIMITED
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
setLongitude($a_longitude)
Set Longitude.
setActivationStart($a_value)
setStatusDetermination($a_value)
Set status determination mode.
setSubscriptionNotify($a_value)
enableWaitingList($a_status)
enableSubscriptionMembershipLimitation($a_status)
enable max members
enableSessionLimit($a_status)
en/disable limited number of sessions
setNumberOfNextSessions($a_num)
Set number of previous sessions.
setSubscriptionType($a_value)
setContactEmail($a_value)
setOfflineStatus($a_value)
setActivationEnd($a_value)
setContactPhone($a_value)
setArchiveType($a_value)
setSubscriptionEnd($a_value)
setLatitude($a_latitude)
Set Latitude.
enableRegistrationAccessCode($a_status)
En/disable registration access code.
setSubscriptionMaxMembers($a_value)
setArchiveEnd($a_value)
setShowMembers($a_status)
setMailToMembersType($a_type)
Set mail to members type.
setSubscriptionPassword($a_value)
setSubscriptionStart($a_value)
setImportantInformation($a_info)
setNumberOfPreviousSessions($a_num)
Set number of previous sessions.
setContactConsultation($a_value)
setSyllabus($a_syllabus)
setContactResponsibility($a_value)
setAboStatus($a_status)
setViewMode($a_mode)
setArchiveStart($a_value)
setEnableCourseMap($a_enablemap)
Set Enable Course Map.
setSubscriptionLimitationType($a_type)
setActivationType($a_type)
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.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, enableRegistrationAccessCode(), enableSessionLimit(), enableSubscriptionMembershipLimitation(), enableWaitingList(), ilObject\getId(), ilObjectActivation\getItem(), IL_CRS_ACTIVATION_LIMITED, IL_CRS_ACTIVATION_UNLIMITED, setAboStatus(), setActivationEnd(), setActivationStart(), setActivationType(), setActivationVisibility(), setArchiveEnd(), setArchiveStart(), setArchiveType(), setAutoNotification(), setContactConsultation(), setContactEmail(), setContactName(), setContactPhone(), setContactResponsibility(), setEnableCourseMap(), setImportantInformation(), setLatitude(), setLocationZoom(), setLongitude(), setMailToMembersType(), setNumberOfNextSessions(), setNumberOfPreviousSessions(), setOfflineStatus(), setRegistrationAccessCode(), setShowMembers(), setStatusDetermination(), setSubscriptionEnd(), setSubscriptionLimitationType(), setSubscriptionMaxMembers(), setSubscriptionNotify(), setSubscriptionPassword(), setSubscriptionStart(), setSubscriptionType(), setSyllabus(), setViewMode(), and ilObjectActivation\TIMINGS_ACTIVATION.

Referenced by __createDefaultSettings(), and read().

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

◆ _deleteUser()

ilObjCourse::_deleteUser (   $a_usr_id)

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

1742 {
1743 // Delete all user related data
1744 // delete lm_history
1745 include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
1747
1748 include_once './Modules/Course/classes/class.ilCourseParticipants.php';
1750
1751 // Course objectives
1752 include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1754 }
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()

ilObjCourse::_isActivated (   $a_obj_id)

Is activated.

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

Parameters
intid of user
Returns
boolean

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

708 {
709 include_once("./Modules/Course/classes/class.ilObjCourseAccess.php");
710 return ilObjCourseAccess::_isActivated($a_obj_id);
711 }
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 436 of file class.ilObjCourse.php.

437 {
438 global $ilDB;
439
440 $query = "SELECT * FROM crs_settings ".
441 "WHERE obj_id = ".$ilDB->quote($a_course_id ,'integer')." ".
442 "AND sub_notify = 1";
443 $res = $ilDB->query($query);
444 return $res->numRows() ? true : false;
445 }

References $ilDB, $query, and $res.

◆ _lookupAboStatus()

ilObjCourse::_lookupAboStatus (   $a_id)

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

587 {
588 global $ilDB;
589
590 $query = "SELECT abo FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id ,'integer')." ";
591 $res = $ilDB->query($query);
592 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
593 {
594 return $row->abo;
595 }
596 return false;
597 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

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

+ Here is the caller graph for this function:

◆ _lookupViewMode()

ilObjCourse::_lookupViewMode (   $a_id)

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

574 {
575 global $ilDB;
576
577 $query = "SELECT view_mode FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id ,'integer')." ";
578 $res = $ilDB->query($query);
579 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
580 {
581 return $row->view_mode;
582 }
583 return false;
584 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

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

+ Here is the caller graph for this function:

◆ _registrationEnabled()

ilObjCourse::_registrationEnabled (   $a_obj_id)

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

Parameters
intid of user
Returns
boolean

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

720 {
721 include_once("./Modules/Course/classes/class.ilObjCourseAccess.php");
723 }
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 1786 of file class.ilObjCourse.php.

1787 {
1788 include_once './Services/Object/classes/class.ilObjectActivation.php';
1790 }
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 738 of file class.ilObjCourse.php.

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

◆ appendMessage()

ilObjCourse::appendMessage (   $a_message)

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

668 {
669 if($this->getMessage())
670 {
671 $this->message .= "<br /> ";
672 }
673 $this->message .= $a_message;
674 }

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 2030 of file class.ilObjCourse.php.

2031 {
2032 // #11113
2033 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
2036 {
2037 include_once("Services/Tracking/classes/class.ilLPStatus.php");
2038 // #13811 - we need to suppress creation if status entry
2039 $has_completed = (ilLPStatus::_lookupStatus($this->getId(), $a_member_id, false) == ilLPStatus::LP_STATUS_COMPLETED_NUM);
2040 $this->getMembersObject()->updatePassed($a_member_id, $has_completed, false, true);
2041 }
2042 }
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.

+ Here is the call 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 952 of file class.ilObjCourse.php.

953 {
954 global $ilLog,$rbacadmin,$rbacreview;
955
956 $admin = $this->getDefaultAdminRole();
957 $new_admin = $new_obj->getDefaultAdminRole();
958
959 if(!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId())
960 {
961 $ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_admin');
962 }
963 $rbacadmin->copyRolePermissions($admin,$this->getRefId(),$new_obj->getRefId(),$new_admin,true);
964 $ilLog->write(__METHOD__.' : Finished copying of role crs_admin.');
965
966 $tutor = $this->getDefaultTutorRole();
967 $new_tutor = $new_obj->getDefaultTutorRole();
968 if(!$tutor || !$new_tutor)
969 {
970 $ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_tutor');
971 }
972 $rbacadmin->copyRolePermissions($tutor,$this->getRefId(),$new_obj->getRefId(),$new_tutor,true);
973 $ilLog->write(__METHOD__.' : Finished copying of role crs_tutor.');
974
975 $member = $this->getDefaultMemberRole();
976 $new_member = $new_obj->getDefaultMemberRole();
977 if(!$member || !$new_member)
978 {
979 $ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_member');
980 }
981 $rbacadmin->copyRolePermissions($member,$this->getRefId(),$new_obj->getRefId(),$new_member,true);
982 $ilLog->write(__METHOD__.' : Finished copying of role crs_member.');
983
984 return true;
985 }

References $ilLog, 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 921 of file class.ilObjCourse.php.

922 {
923 parent::cloneDependencies($a_target_id,$a_copy_id);
924
925 // Clone course start objects
926 include_once('Services/Container/classes/class.ilContainerStartObjects.php');
927 $start = new ilContainerStartObjects($this->getRefId(),$this->getId());
928 $start->cloneDependencies($a_target_id,$a_copy_id);
929
930 // Clone course item settings
931 include_once('Services/Object/classes/class.ilObjectActivation.php');
932 ilObjectActivation::cloneDependencies($this->getRefId(),$a_target_id,$a_copy_id);
933
934 include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
935 ilLOSettings::cloneSettings($a_copy_id, $this->getId(), ilObject::_lookupObjId($a_target_id));
936
937 // Clone course learning objectives
938 include_once('Modules/Course/classes/class.ilCourseObjective.php');
939 $crs_objective = new ilCourseObjective($this);
940 $crs_objective->ilClone($a_target_id,$a_copy_id);
941
942 return true;
943 }
class ilcourseobjective
static cloneSettings($a_copy_id, $a_container_id, $a_new_container_id)
Clone settings.
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
static _lookupObjId($a_id)

References ilObject\_lookupObjId(), ilObjectActivation\cloneDependencies(), ilLOSettings\cloneSettings(), ilObject\getId(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ cloneObject()

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

Clone course (no member data)

@access public

Parameters
inttarget ref_id
intcopy id

Reimplemented from ilContainer.

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

861 {
862 global $ilDB,$ilUser;
863
864 $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
865
866 $this->cloneAutoGeneratedRoles($new_obj);
867 $this->cloneMetaData($new_obj);
868
869 // Assign admin
870 $new_obj->getMemberObject()->add($ilUser->getId(),IL_CRS_ADMIN);
871
872 // #14596
873 $cwo = ilCopyWizardOptions::_getInstance($a_copy_id);
874 if($cwo->isRootNode($this->getRefId()))
875 {
876 $this->setOfflineStatus(true);
877 }
878
879 // Copy settings
880 $this->cloneSettings($new_obj);
881
882 // Course Defined Fields
883 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
884 ilCourseDefinedFieldDefinition::_clone($this->getId(),$new_obj->getId());
885
886 // Clone course files
887 include_once('Modules/Course/classes/class.ilCourseFile.php');
888 ilCourseFile::_cloneFiles($this->getId(),$new_obj->getId());
889
890 // Copy learning progress settings
891 include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
892 $obj_settings = new ilLPObjSettings($this->getId());
893 $obj_settings->cloneSettings($new_obj->getId());
894 unset($obj_settings);
895
896 // clone icons
897 global $ilLog;
898 $ilLog->write(__METHOD__.': '.$this->getBigIconPath().' '.$this->getSmallIconPath());
899 $new_obj->saveIcons($this->getBigIconPath(),
900 $this->getSmallIconPath(),
901 $this->getTinyIconPath());
902
903 // clone certificate (#11085)
904 include_once "./Services/Certificate/classes/class.ilCertificate.php";
905 include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
906 $cert = new ilCertificate(new ilCourseCertificateAdapter($this));
907 $newcert = new ilCertificate(new ilCourseCertificateAdapter($new_obj));
908 $cert->cloneCertificate($newcert);
909
910 return $new_obj;
911 }
const IL_CRS_ADMIN
Base class for course and group participants.
Create PDF certificates.
getBigIconPath()
Get path for big icon.
getSmallIconPath()
Get path for small icon.
getTinyIconPath()
Get path for tiny icon.
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.
cloneAutoGeneratedRoles($new_obj)
Clone automatic genrated roles (permissions and template permissions)
cloneSettings($new_obj)
Clone entries in settings table.
cloneMetaData($target_obj)
Copy meta data.
global $ilUser
Definition: imgupload.php:15

References $ilDB, $ilLog, $ilUser, ilCourseDefinedFieldDefinition\_clone(), ilCourseFile\_cloneFiles(), ilCopyWizardOptions\_getInstance(), cloneAutoGeneratedRoles(), ilObject\cloneMetaData(), cloneSettings(), ilContainer\getBigIconPath(), ilObject\getId(), ilContainer\getSmallIconPath(), ilContainer\getTinyIconPath(), IL_CRS_ADMIN, and setOfflineStatus().

+ Here is the call graph for this function:

◆ cloneSettings()

ilObjCourse::cloneSettings (   $new_obj)

Clone entries in settings table.

@access public

Parameters
ilObjCoursenew course object

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

1232 {
1233 $new_obj->setSyllabus($this->getSyllabus());
1234 $new_obj->setContactName($this->getContactName());
1235 $new_obj->setContactResponsibility($this->getContactResponsibility());
1236 $new_obj->setContactPhone($this->getContactPhone());
1237 $new_obj->setContactEmail($this->getContactEmail());
1238 $new_obj->setContactConsultation($this->getContactConsultation());
1239 $new_obj->setOfflineStatus($this->getOfflineStatus()); // #9914
1240 $new_obj->setActivationType($this->getActivationType());
1241 $new_obj->setActivationStart($this->getActivationStart());
1242 $new_obj->setActivationEnd($this->getActivationEnd());
1243 $new_obj->setActivationVisibility($this->getActivationVisibility());
1244 $new_obj->setSubscriptionLimitationType($this->getSubscriptionLimitationType());
1245 $new_obj->setSubscriptionStart($this->getSubscriptionStart());
1246 $new_obj->setSubscriptionEnd($this->getSubscriptionEnd());
1247 $new_obj->setSubscriptionType($this->getSubscriptionType());
1248 $new_obj->setSubscriptionPassword($this->getSubscriptionPassword());
1249 $new_obj->enableSubscriptionMembershipLimitation($this->isSubscriptionMembershipLimited());
1250 $new_obj->setSubscriptionMaxMembers($this->getSubscriptionMaxMembers());
1251 $new_obj->setSubscriptionNotify($this->getSubscriptionNotify());
1252 $new_obj->setViewMode($this->getViewMode());
1253 $new_obj->setOrderType($this->getOrderType());
1254 $new_obj->setArchiveStart($this->getArchiveStart());
1255 $new_obj->setArchiveEnd($this->getArchiveEnd());
1256 $new_obj->setArchiveType($this->getArchiveType());
1257 $new_obj->setAboStatus($this->getAboStatus());
1258 $new_obj->enableWaitingList($this->enabledWaitingList());
1259 $new_obj->setImportantInformation($this->getImportantInformation());
1260 $new_obj->setShowMembers($this->getShowMembers());
1261 $new_obj->enableSessionLimit($this->isSessionLimitEnabled());
1262 $new_obj->setNumberOfPreviousSessions($this->getNumberOfPreviousSessions());
1263 $new_obj->setNumberOfNextSessions($this->getNumberOfNextSessions());
1264 $new_obj->setAutoNotification( $this->getAutoNotification() );
1265 $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
1266 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1267 $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1268 $new_obj->setStatusDetermination($this->getStatusDetermination());
1269 $new_obj->setMailToMembersType($this->getMailToMembersType());
1270
1271 // #10271
1272 $new_obj->setEnableCourseMap($this->getEnableCourseMap());
1273 $new_obj->setLatitude($this->getLatitude());
1274 $new_obj->setLongitude($this->getLongitude());
1275 $new_obj->setLocationZoom($this->getLocationZoom());
1276
1277 $new_obj->update();
1278 }
getNumberOfNextSessions()
Set number of previous sessions.
isSubscriptionMembershipLimited()
is membership limited
getViewMode()
Get container view mode.
getOrderType()
Get order type default implementation.

References enabledWaitingList(), ilMembershipRegistrationCodeUtils\generateCode(), getAboStatus(), getActivationEnd(), getActivationStart(), getActivationType(), getActivationVisibility(), getArchiveEnd(), getArchiveStart(), getArchiveType(), getAutoNotification(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getEnableCourseMap(), getImportantInformation(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getNumberOfNextSessions(), getNumberOfPreviousSessions(), getOfflineStatus(), getOrderType(), getShowMembers(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionNotify(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), getSyllabus(), getViewMode(), isRegistrationAccessCodeEnabled(), isSessionLimitEnabled(), and isSubscriptionMembershipLimited().

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 752 of file class.ilObjCourse.php.

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

References __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 ilObject.

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

1076 {
1077 global $ilAppEventHandler;
1078
1079 // always call parent delete function first!!
1080 if (!parent::delete())
1081 {
1082 return false;
1083 }
1084
1085 // delete meta data
1086 $this->deleteMetaData();
1087
1088 // put here course specific stuff
1089
1090 $this->__deleteSettings();
1091
1092 include_once('Modules/Course/classes/class.ilCourseParticipants.php');
1094
1095 $this->initCourseArchiveObject();
1096 $this->archives_obj->deleteAll();
1097
1098 include_once './Modules/Course/classes/class.ilCourseObjective.php';
1100
1101 include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
1103
1104 include_once './Modules/Course/classes/class.ilCourseFile.php';
1106
1107 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1109
1110 $ilAppEventHandler->raise('Modules/Course',
1111 'delete',
1112 array('object' => $this,
1113 'obj_id' => $this->getId(),
1114 'appointments' => $this->prepareAppointments('delete')));
1115
1116
1117 return true;
1118 }
static _deleteByContainer($a_container_id)
Delete all fields of a container.
_deleteByCourse($a_course_id)
deleteMetaData()
delete meta data entry
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.

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

+ Here is the call graph for this function:

◆ enabledObjectiveView()

ilObjCourse::enabledObjectiveView ( )

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

316 {
317 return $this->view_mode == IL_CRS_VIEW_OBJECTIVE;
318 }
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 320 of file class.ilObjCourse.php.

321 {
322 return (bool) $this->waiting_list;
323 }

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

+ 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 157 of file class.ilObjCourse.php.

158 {
159 $this->reg_access_code_enabled = $a_status;
160 }

Referenced by __readSettings().

+ 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 348 of file class.ilObjCourse.php.

349 {
350 $this->session_limit = $a_status;
351 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ enableSubscriptionMembershipLimitation()

ilObjCourse::enableSubscriptionMembershipLimitation (   $a_status)

enable max members

@access public

Parameters
boolstatus
Returns

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

366 {
367 $this->subscription_membership_limitation = $a_status;
368 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ enableWaitingList()

ilObjCourse::enableWaitingList (   $a_status)

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

326 {
327 $this->waiting_list = (bool) $a_status;
328 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ getAboStatus()

ilObjCourse::getAboStatus ( )

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

628 {
629 return $this->abo;
630 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getActivationEnd()

ilObjCourse::getActivationEnd ( )

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

246 {
247 return $this->activation_end ? $this->activation_end : mktime(0,0,0,12,12,date("Y",time())+2);
248 }

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

+ Here is the caller graph for this function:

◆ getActivationStart()

ilObjCourse::getActivationStart ( )

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

238 {
239 return $this->activation_start ? $this->activation_start : time();
240 }

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

+ Here is the caller graph for this function:

◆ getActivationType()

ilObjCourse::getActivationType ( )

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

219 {
220 return (int) $this->activation_type;
221 }

Referenced by cloneSettings(), and validate().

+ Here is the caller graph for this function:

◆ getActivationUnlimitedStatus()

ilObjCourse::getActivationUnlimitedStatus ( )

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

234 {
235 return $this->activation_type == IL_CRS_ACTIVATION_UNLIMITED;
236 }

References IL_CRS_ACTIVATION_UNLIMITED.

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

+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjCourse::getActivationVisibility ( )

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

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

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getArchiveEnd()

ilObjCourse::getArchiveEnd ( )

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

608 {
609 return $this->archive_end ? $this->archive_end : mktime(0,0,0,12,12,date("Y",time())+2);
610 }

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

+ Here is the caller graph for this function:

◆ getArchiveStart()

ilObjCourse::getArchiveStart ( )

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

600 {
601 return $this->archive_start ? $this->archive_start : time();
602 }

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

+ Here is the caller graph for this function:

◆ getArchiveType()

ilObjCourse::getArchiveType ( )

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

616 {
617 return $this->archive_type ? IL_CRS_ARCHIVE_DOWNLOAD : IL_CRS_ARCHIVE_NONE;
618 }
const IL_CRS_ARCHIVE_DOWNLOAD

References IL_CRS_ARCHIVE_DOWNLOAD, and IL_CRS_ARCHIVE_NONE.

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getAutoNotification()

ilObjCourse::getAutoNotification ( )

Returns automatic notification status from $this->auto_notification.

Returns
boolean

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

1962 {
1964 }

References $auto_notification.

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

+ Here is the caller graph for this function:

◆ getContactConsultation()

ilObjCourse::getContactConsultation ( )

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

187 {
188 return $this->contact_consultation;
189 }

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

+ Here is the caller graph for this function:

◆ getContactEmail()

ilObjCourse::getContactEmail ( )

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

203 {
204 return $this->contact_email;
205 }

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

+ Here is the caller graph for this function:

◆ getContactName()

ilObjCourse::getContactName ( )

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

179 {
180 return $this->contact_name;
181 }

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

+ Here is the caller graph for this function:

◆ getContactPhone()

ilObjCourse::getContactPhone ( )

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

195 {
196 return $this->contact_phone;
197 }

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

+ Here is the caller graph for this function:

◆ getContactResponsibility()

ilObjCourse::getContactResponsibility ( )

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

211 {
212 return $this->contact_responsibility;
213 }

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

+ Here is the caller graph for this function:

◆ getDefaultAdminRole()

ilObjCourse::getDefaultAdminRole ( )

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

1725 {
1726 $local_roles = $this->__getLocalRoles();
1727
1728 foreach($local_roles as $role_id)
1729 {
1730 if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
1731 {
1732 if(!strcmp($tmp_role->getTitle(),"il_crs_admin_".$this->getRefId()))
1733 {
1734 return $role_id;
1735 }
1736 }
1737 }
1738 return false;
1739 }
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 1631 of file class.ilObjCourse.php.

1632 {
1633 global $rbacadmin, $rbacreview;
1634
1635 if (strlen($a_crs_id) > 0)
1636 {
1637 $crs_id = $a_crs_id;
1638 }
1639 else
1640 {
1641 $crs_id = $this->getRefId();
1642 }
1643
1644 $role_arr = $rbacreview->getRolesOfRoleFolder($crs_id);
1645
1646 foreach ($role_arr as $role_id)
1647 {
1648 $role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
1649
1650 $crs_Member ="il_crs_member_".$crs_id;
1651 $crs_Admin ="il_crs_admin_".$crs_id;
1652 $crs_Tutor ="il_crs_tutor_".$crs_id;
1653
1654 if (strcmp($role_Obj->getTitle(), $crs_Member) == 0 )
1655 {
1656 $arr_crsDefaultRoles["crs_member_role"] = $role_Obj->getId();
1657 }
1658
1659 if (strcmp($role_Obj->getTitle(), $crs_Admin) == 0)
1660 {
1661 $arr_crsDefaultRoles["crs_admin_role"] = $role_Obj->getId();
1662 }
1663
1664 if (strcmp($role_Obj->getTitle(), $crs_Tutor) == 0)
1665 {
1666 $arr_crsDefaultRoles["crs_tutor_role"] = $role_Obj->getId();
1667 }
1668 }
1669
1670 return $arr_crsDefaultRoles;
1671 }

References ilObject\getRefId().

+ Here is the call graph for this function:

◆ getDefaultMemberRole()

ilObjCourse::getDefaultMemberRole ( )

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

1695 {
1696 $local_roles = $this->__getLocalRoles();
1697
1698 foreach($local_roles as $role_id)
1699 {
1700 $title = ilObject::_lookupTitle($role_id);
1701 if(substr($title,0,8) == 'il_crs_m')
1702 {
1703 return $role_id;
1704 }
1705 }
1706 return 0;
1707 }
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 1708 of file class.ilObjCourse.php.

1709 {
1710 $local_roles = $this->__getLocalRoles();
1711
1712 foreach($local_roles as $role_id)
1713 {
1714 if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
1715 {
1716 if(!strcmp($tmp_role->getTitle(),"il_crs_tutor_".$this->getRefId()))
1717 {
1718 return $role_id;
1719 }
1720 }
1721 }
1722 return false;
1723 }

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 847 of file class.ilObjCourse.php.

848 {
849 return $this->enablemap;
850 }

References $enablemap.

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

+ Here is the caller graph for this function:

◆ getImportantInformation()

ilObjCourse::getImportantInformation ( )

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

163 {
164 return $this->important;
165 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getLatitude()

ilObjCourse::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

788 {
789 return $this->latitude;
790 }

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 1589 of file class.ilObjCourse.php.

1590 {
1591 global $rbacadmin,$rbacreview;
1592
1593 if (empty($this->local_roles))
1594 {
1595 $this->local_roles = array();
1596 $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1597
1598 foreach ($role_arr as $role_id)
1599 {
1600 if ($rbacreview->isAssignable($role_id,$this->getRefId()) == true)
1601 {
1602 $role_Obj = $this->ilias->obj_factory->getInstanceByObjId($role_id);
1603
1604 if ($a_translate)
1605 {
1606 $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1607 }
1608 else
1609 {
1610 $role_name = $role_Obj->getTitle();
1611 }
1612 $this->local_roles[$role_name] = $role_Obj->getId();
1613 }
1614 }
1615 }
1616
1617 return $this->local_roles;
1618 }
_getTranslation($a_role_title)

References ilObjRole\_getTranslation(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ getLocationZoom()

ilObjCourse::getLocationZoom ( )

Get LocationZoom.

Returns
int LocationZoom

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

828 {
829 return $this->locationzoom;
830 }

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 807 of file class.ilObjCourse.php.

808 {
809 return $this->longitude;
810 }

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 654 of file class.ilObjCourse.php.

655 {
656 return $this->mail_members;
657 }

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 1462 of file class.ilObjCourse.php.

1463 {
1464 if(!$this->member_obj instanceof ilCourseParticipant)
1465 {
1466 $this->initCourseMemberObject();
1467 }
1468 return $this->member_obj;
1469 }
initCourseMemberObject()
Init course member object @global ilObjUser $ilUser.

References $member_obj, and initCourseMemberObject().

+ Here is the call graph for this function:

◆ getMembersObject()

ilObjCourse::getMembersObject ( )
Deprecated:
Returns
ilCourseParticipants

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

1476 {
1477 if(!$this->members_obj instanceof ilCourseParticipants)
1478 {
1479 $this->initCourseMembersObject();
1480 }
1481 return $this->members_obj;
1482 }
initCourseMembersObject()
Init course member object @global ilObjUser $ilUser.

References $members_obj, and initCourseMembersObject().

Referenced by checkLPStatusSync(), and syncMembersStatusWithLP().

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

◆ getMessage()

ilObjCourse::getMessage ( )

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

660 {
661 return $this->message;
662 }

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 403 of file class.ilObjCourse.php.

404 {
405 return $this->session_next;
406 }

References $session_next.

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

+ Here is the caller graph for this function:

◆ getNumberOfPreviousSessions()

ilObjCourse::getNumberOfPreviousSessions ( )

Set number of previous sessions.

Returns

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

385 {
386 return $this->session_prev;
387 }

References $session_prev.

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

+ Here is the caller graph for this function:

◆ getOfflineStatus()

ilObjCourse::getOfflineStatus ( )

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

254 {
255 return (bool)$this->activation_offline;
256 }

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

+ Here is the caller graph for this function:

◆ getOrderType()

ilObjCourse::getOrderType ( )

Get order type default implementation.

Reimplemented from ilContainer.

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

2045 {
2046 if($this->enabledObjectiveView())
2047 {
2049 }
2050 return parent::getOrderType();
2051 }

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 128 of file class.ilObjCourse.php.

129 {
131 }

References $reg_access_code.

Referenced by __createDefaultSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjCourse::getShowMembers ( )

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

636 {
637 return $this->show_members;
638 }

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 2005 of file class.ilObjCourse.php.

2006 {
2007 return $this->status_dt;
2008 }

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 
)

Get subitems of container.

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

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

454 {
455 global $ilUser;
456
457 // Caching
458 if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]))
459 {
460 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
461 }
462
463 // Results are stored in $this->items
464 parent::getSubItems($a_admin_panel_enabled,$a_include_side_block);
465
466 $limit_sess = false;
467 if(!$a_admin_panel_enabled &&
468 !$a_include_side_block &&
469 $this->items['sess'] &&
470 is_array($this->items['sess']) &&
471 $this->isSessionLimitEnabled() &&
472 $this->getViewMode() == ilContainer::VIEW_SESSIONS) // #16686
473 {
474 $limit_sess = true;
475 }
476
477 if(!$limit_sess)
478 {
479 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
480 }
481
482
483 // do session limit
484
485 // @todo move to gui class
486 if(isset($_GET['crs_prev_sess']))
487 {
488 $ilUser->writePref('crs_sess_show_prev_'.$this->getId(), (string) (int) $_GET['crs_prev_sess']);
489 }
490 if(isset($_GET['crs_next_sess']))
491 {
492 $ilUser->writePref('crs_sess_show_next_'.$this->getId(), (string) (int) $_GET['crs_next_sess']);
493 }
494
495 $sessions = ilUtil::sortArray($this->items['sess'],'start','ASC',true,false);
496 $today = new ilDate(date('Ymd',time()),IL_CAL_DATE);
497 $previous = $current = $next = array();
498 foreach($sessions as $key => $item)
499 {
500 $start = new ilDateTime($item['start'],IL_CAL_UNIX);
501 $end = new ilDateTime($item['end'],IL_CAL_UNIX);
502
503 if(ilDateTime::_within($today, $start, $end, IL_CAL_DAY))
504 {
505 $current[] = $item;
506 }
507 elseif(ilDateTime::_before($start, $today, IL_CAL_DAY))
508 {
509 $previous[] = $item;
510 }
511 elseif(ilDateTime::_after($start, $today, IL_CAL_DAY))
512 {
513 $next[] = $item;
514 }
515 }
516 $num_previous_remove = max(
517 count($previous) - $this->getNumberOfPreviousSessions(),
518 0
519 );
520 while($num_previous_remove--)
521 {
522 if(!$ilUser->getPref('crs_sess_show_prev_'.$this->getId()))
523 {
524 array_shift($previous);
525 }
526 $this->items['sess_link']['prev']['value'] = 1;
527 }
528
529 $num_next_remove = max(
530 count($next) - $this->getNumberOfNextSessions(),
531 0
532 );
533 while($num_next_remove--)
534 {
535 if(!$ilUser->getPref('crs_sess_show_next_'.$this->getId()))
536 {
537 array_pop($next);
538 }
539 // @fixme
540 $this->items['sess_link']['next']['value'] = 1;
541 }
542
543 $sessions = array_merge($previous,$current,$next);
544 $this->items['sess'] = $sessions;
545
546 // #15389 - see ilContainer::getSubItems()
547 include_once('Services/Container/classes/class.ilContainerSorting.php');
548 $sort = ilContainerSorting::_getInstance($this->getId());
549 $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block] = $sort->sortItems($this->items);
550
551 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
552 }
$_GET["client_id"]
const IL_CAL_DATE
const IL_CAL_UNIX
const IL_CAL_DAY
static _getInstance($a_obj_id)
get instance by obj_id
@classDescription Date and time handling
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _within(ilDateTime $dt, ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check whether an date is within a date duration given by start and end.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
Class for single dates.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray

References $_GET, $ilUser, ilDateTime\_after(), ilDateTime\_before(), ilContainerSorting\_getInstance(), ilDateTime\_within(), ilObject\getId(), getNumberOfNextSessions(), getNumberOfPreviousSessions(), getViewMode(), IL_CAL_DATE, IL_CAL_DAY, IL_CAL_UNIX, isSessionLimitEnabled(), ilUtil\sortArray(), and ilContainer\VIEW_SESSIONS.

+ Here is the call graph for this function:

◆ getSubscriptionEnd()

ilObjCourse::getSubscriptionEnd ( )

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

291 {
292 return $this->subscription_end ? $this->subscription_end : mktime(0,0,0,12,12,date("Y",time())+2);
293 }

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

+ Here is the caller graph for this function:

◆ getSubscriptionLimitationType()

ilObjCourse::getSubscriptionLimitationType ( )

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

271 {
272 return $this->subscription_limitation_type;
273 }

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

+ Here is the caller graph for this function:

◆ getSubscriptionMaxMembers()

ilObjCourse::getSubscriptionMaxMembers ( )

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

420 {
421 return $this->subscription_max_members;
422 }

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

+ Here is the caller graph for this function:

◆ getSubscriptionNotify()

ilObjCourse::getSubscriptionNotify ( )

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

555 {
556 return true;
557 return $this->subscription_notify ? true : false;
558 }

Referenced by cloneSettings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getSubscriptionPassword()

ilObjCourse::getSubscriptionPassword ( )

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

308 {
309 return $this->subscription_password;
310 }

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

+ Here is the caller graph for this function:

◆ getSubscriptionStart()

ilObjCourse::getSubscriptionStart ( )

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

283 {
284 return $this->subscription_start ? $this->subscription_start : time();
285 }

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

+ Here is the caller graph for this function:

◆ getSubscriptionType()

ilObjCourse::getSubscriptionType ( )

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

299 {
300 return $this->subscription_type ? $this->subscription_type : IL_CRS_SUBSCRIPTION_DIRECT;
301 #return $this->subscription_type ? $this->subscription_type : $this->SUBSCRIPTION_DEACTIVATED;
302 }

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 278 of file class.ilObjCourse.php.

279 {
280 return $this->subscription_limitation_type == IL_CRS_SUBSCRIPTION_UNLIMITED;
281 }
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 170 of file class.ilObjCourse.php.

171 {
172 return $this->syllabus;
173 }

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

+ Here is the caller graph for this function:

◆ getViewMode()

ilObjCourse::getViewMode ( )

Get container view mode.

Reimplemented from ilContainer.

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

569 {
570 return $this->view_mode;
571 }

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

+ Here is the caller graph for this function:

◆ hasContactData()

ilObjCourse::hasContactData ( )

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

1060 {
1061 return strlen($this->getContactName()) or
1062 strlen($this->getContactResponsibility()) or
1063 strlen($this->getContactEmail()) or
1064 strlen($this->getContactPhone()) or
1065 strlen($this->getContactConsultation());
1066 }

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

+ Here is the call graph for this function:

◆ ilObjCourse()

ilObjCourse::ilObjCourse (   $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)

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

82 {
83
84 #define("ILIAS_MODULE","course");
85 #define("KEEP_IMAGE_PATH",1);
86
87 $this->SUBSCRIPTION_DEACTIVATED = 1;
88 $this->SUBSCRIPTION_CONFIRMATION = 2;
89 $this->SUBSCRIPTION_DIRECT = 3;
90 $this->SUBSCRIPTION_PASSWORD = 4;
91 $this->SUBSCRIPTION_AUTOSUBSCRIPTION = 5;
92 $this->ARCHIVE_DISABLED = 1;
93 $this->ARCHIVE_READ = 2;
94 $this->ARCHIVE_DOWNLOAD = 3;
95 $this->ABO_ENABLED = 1;
96 $this->ABO_DISABLED = 0;
97 $this->SHOW_MEMBERS_ENABLED = 1;
98 $this->SHOW_MEMBERS_DISABLED = 0;
99 $this->setStatusDetermination(self::STATUS_DETERMINATION_LP);
100
101 $this->type = "crs";
102
103 parent::__construct($a_id,$a_call_by_reference);
104
105 }

References setStatusDetermination().

+ Here is the call graph for this function:

◆ initCourseArchiveObject()

ilObjCourse::initCourseArchiveObject ( )

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

1485 {
1486 include_once "./Modules/Course/classes/class.ilCourseArchives.php";
1487
1488 if(!is_object($this->archives_obj))
1489 {
1490 $this->archives_obj =& new ilCourseArchives($this);
1491 }
1492 return true;
1493 }
class ilCourseArchives

Referenced by delete().

+ Here is the caller graph for this function:

◆ initCourseMemberObject()

ilObjCourse::initCourseMemberObject ( )
protected

Init course member object @global ilObjUser $ilUser.

Returns
<type>

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

1436 {
1437 global $ilUser;
1438
1439 include_once "./Modules/Course/classes/class.ilCourseParticipant.php";
1440 $this->member_obj = ilCourseParticipant::_getInstanceByObjId($this->getId(),$ilUser->getId());
1441 return true;
1442 }
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.

References $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 1449 of file class.ilObjCourse.php.

1450 {
1451 global $ilUser;
1452
1453 include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
1454 $this->members_obj = ilCourseParticipants::_getInstanceByObjId($this->getId());
1455 return true;
1456 }
static _getInstanceByObjId($a_obj_id)
Get singleton instance.

References $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 1498 of file class.ilObjCourse.php.

1499 {
1500 global $rbacadmin,$rbacreview,$ilDB;
1501
1502 include_once './Services/AccessControl/classes/class.ilObjRole.php';
1504 'il_crs_admin_'.$this->getRefId(),
1505 "Admin of crs obj_no.".$this->getId(),
1506 'il_crs_admin',
1507 $this->getRefId()
1508 );
1510 'il_crs_tutor_'.$this->getRefId(),
1511 "Tutor of crs obj_no.".$this->getId(),
1512 'il_crs_tutor',
1513 $this->getRefId()
1514 );
1516 'il_crs_member_'.$this->getRefId(),
1517 "Member of crs obj_no.".$this->getId(),
1518 'il_crs_member',
1519 $this->getRefId()
1520 );
1521
1522 return array();
1523 }
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)

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

+ Here is the call graph for this function:

◆ initWaitingList()

ilObjCourse::initWaitingList ( )

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

1419 {
1420 include_once "./Modules/Course/classes/class.ilCourseWaitingList.php";
1421
1422 if(!is_object($this->waiting_list_obj))
1423 {
1424 $this->waiting_list_obj = new ilCourseWaitingList($this->getId());
1425 }
1426 return true;
1427 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ inSubscriptionTime()

ilObjCourse::inSubscriptionTime ( )

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

331 {
333 {
334 return true;
335 }
336 if(time() > $this->getSubscriptionStart() and time() < $this->getSubscriptionEnd())
337 {
338 return true;
339 }
340 return false;
341 }

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 (   $a_check_archive = false)

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

677 {
678 if($a_check_archive)
679 {
680 if($this->isArchived())
681 {
682 return true;
683 }
684 }
685 if($this->getOfflineStatus())
686 {
687 return false;
688 }
690 {
691 return true;
692 }
693 if(time() < $this->getActivationStart() or
694 time() > $this->getActivationEnd())
695 {
696 return false;
697 }
698 return true;
699 }

References getActivationEnd(), getActivationStart(), getActivationUnlimitedStatus(), getOfflineStatus(), and isArchived().

+ Here is the call graph for this function:

◆ isArchived()

ilObjCourse::isArchived ( )

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

726 {
727 if($this->getViewMode() != IL_CRS_VIEW_ARCHIVE)
728 {
729 return false;
730 }
731 if(time() < $this->getArchiveStart() or time() > $this->getArchiveEnd())
732 {
733 return false;
734 }
735 return true;
736 }
const IL_CRS_VIEW_ARCHIVE

References getArchiveEnd(), getArchiveStart(), getViewMode(), and IL_CRS_VIEW_ARCHIVE.

Referenced by isActivated().

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

◆ isRegistrationAccessCodeEnabled()

ilObjCourse::isRegistrationAccessCodeEnabled ( )

Check if access code is enabled.

Returns

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

148 {
149 return (bool) $this->reg_access_code_enabled;
150 }

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 353 of file class.ilObjCourse.php.

354 {
355 return (bool) $this->session_limit;
356 }

References $session_limit.

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

+ Here is the caller graph for this function:

◆ isSubscriptionMembershipLimited()

ilObjCourse::isSubscriptionMembershipLimited ( )

is membership limited

@access public

Parameters

return

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

415 {
416 return (bool) $this->subscription_membership_limitation;
417 }

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 1572 of file class.ilObjCourse.php.

1573 {
1574 global $ilDB;
1575
1576 $query = 'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote('rolt','text').' AND title = '.$ilDB->quote('il_crs_non_member','text');
1577 $res = $ilDB->query($query);
1578 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
1579
1580 return isset($row['obj_id']) ? $row['obj_id'] : 0;
1581 }

References $ilDB, $query, $res, $row, and DB_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 1858 of file class.ilObjCourse.php.

1859 {
1860 global $ilDB;
1861
1862 $query = "SELECT obj_id FROM crs_settings ".
1863 "WHERE reg_ac_enabled = ".$ilDB->quote(1,'integer')." ".
1864 "AND reg_ac = ".$ilDB->quote($a_code,'text');
1865 $res = $ilDB->query($query);
1866
1867 $obj_ids = array();
1868 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
1869 {
1870 $obj_ids[] = $row->obj_id;
1871 }
1872 return $obj_ids;
1873 }

References $ilDB, $query, $res, $row, and DB_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 112 of file class.ilObjCourse.php.

113 {
114 $query = 'SELECT show_members FROM crs_settings '.
115 'WHERE obj_id = '.$GLOBALS['ilDB']->quote($a_obj_id,'integer');
116 $res = $GLOBALS['ilDB']->query($query);
117 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
118 {
119 return (bool) $row->show_members;
120 }
121 return false;
122 }
$GLOBALS['ct_recipient']

References $GLOBALS, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilParticipants\hasParticipantListAccess().

+ 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 1762 of file class.ilObjCourse.php.

1763 {
1764 global $ilLog;
1765
1766 parent::MDUpdateListener($a_element);
1767
1768 switch($a_element)
1769 {
1770 case 'General':
1771 // Update ecs content
1772 include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
1773 $ecs = new ilECSCourseSettings($this);
1774 $ecs->handleContentUpdate();
1775 break;
1776
1777 default:
1778 return true;
1779 }
1780 }
Class ilECSCourseSettings.

References $ilLog.

◆ prepareAppointments()

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

Prepare calendar appointments.

@access protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

1800 {
1801 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1802 include_once('./Services/Calendar/classes/class.ilDateTime.php');
1803
1804 switch($a_mode)
1805 {
1806 case 'create':
1807 case 'update':
1808 if(!$this->getActivationUnlimitedStatus() and !$this->getOfflineStatus())
1809 {
1810 $app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_START);
1811 $app->setTitle($this->getTitle());
1812 $app->setSubtitle('crs_cal_activation_start');
1813 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1814 $app->setDescription($this->getLongDescription());
1815 $app->setStart(new ilDateTime($this->getActivationStart(),IL_CAL_UNIX));
1816 $apps[] = $app;
1817
1818 $app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_END);
1819 $app->setTitle($this->getTitle());
1820 $app->setSubtitle('crs_cal_activation_end');
1821 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1822 $app->setDescription($this->getLongDescription());
1823 $app->setStart(new ilDateTime($this->getActivationEnd(),IL_CAL_UNIX));
1824 $apps[] = $app;
1825 }
1827 {
1828 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1829 $app->setTitle($this->getTitle());
1830 $app->setSubtitle('crs_cal_reg_start');
1831 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1832 $app->setDescription($this->getLongDescription());
1833 $app->setStart(new ilDateTime($this->getSubscriptionStart(),IL_CAL_UNIX));
1834 $apps[] = $app;
1835
1836 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1837 $app->setTitle($this->getTitle());
1838 $app->setSubtitle('crs_cal_reg_end');
1839 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1840 $app->setDescription($this->getLongDescription());
1841 $app->setStart(new ilDateTime($this->getSubscriptionEnd(),IL_CAL_UNIX));
1842 $apps[] = $app;
1843 }
1844
1845 return $apps ? $apps : array();
1846
1847 case 'delete':
1848 // Nothing to do: The category and all assigned appointments will be deleted.
1849 return array();
1850 }
1851 }
const IL_CAL_TRANSLATION_SYSTEM
const IL_CRS_SUBSCRIPTION_LIMITED
Apointment templates are used for automatic generated apointments.
getLongDescription()
get object long description (stored in object_description)
getTitle()
get object title @access public

References getActivationEnd(), getActivationStart(), getActivationUnlimitedStatus(), ilObject\getLongDescription(), getOfflineStatus(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionStart(), ilObject\getTitle(), IL_CAL_TRANSLATION_SYSTEM, IL_CAL_UNIX, and IL_CRS_SUBSCRIPTION_LIMITED.

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 (   $a_force_db = false)

read object data from db into object

Parameters
boolean@access public

Reimplemented from ilObject.

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

744 {
745 parent::read($a_force_db);
746
747 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
749
750 $this->__readSettings();
751 }
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.

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

1882 {
1883 global $ilCtrl, $tree;
1884 include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1885 include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
1887
1888 if($part->isAssigned($a_user_id))
1889 {
1890 return true;
1891 }
1892
1893 if(!$a_force_registration)
1894 {
1895 // Availability
1897 {
1898 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1899
1901 {
1902 throw new ilMembershipRegistrationException('Cant registrate to course '.$this->getId().
1903 ', course subscription is deactivated.', '456');
1904 }
1905 }
1906
1907 // Time Limitation
1909 {
1910 if( !$this->inSubscriptionTime() )
1911 {
1912 throw new ilMembershipRegistrationException('Cant registrate to course '.$this->getId().
1913 ', course is out of registration time.', '789');
1914 }
1915 }
1916
1917 // Max members
1919 {
1920 $free = max(0,$this->getSubscriptionMaxMembers() - $part->getCountMembers());
1921 include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
1922 $waiting_list = new ilCourseWaitingList($this->getId());
1923 if($this->enabledWaitingList() and (!$free or $waiting_list->getCountUsers()))
1924 {
1925 $waiting_list->addToList($a_user_id);
1926 $this->lng->loadLanguageModule("crs");
1927 $info = sprintf($this->lng->txt('crs_added_to_list'),
1928 $waiting_list->getPosition($a_user_id));
1929 include_once('./Modules/Course/classes/class.ilCourseParticipants.php');
1930 $participants = ilCourseParticipants::_getInstanceByObjId($this->getId());
1931 $participants->sendNotification($participants->NOTIFY_WAITING_LIST,$a_user_id);
1932
1933 throw new ilMembershipRegistrationException($info, '124');
1934 }
1935
1936 if(!$this->enabledWaitingList() && !$free)
1937 {
1938 throw new ilMembershipRegistrationException('Cant registrate to course '.$this->getId().
1939 ', membership is limited.', '123');
1940 }
1941 }
1942 }
1943
1944 $part->add($a_user_id,$a_role);
1945 $part->sendNotification($part->NOTIFY_ACCEPT_USER, $a_user_id);
1946 $part->sendNotification($part->NOTIFY_ADMINS,$a_user_id);
1947
1948
1949 include_once './Modules/Forum/classes/class.ilForumNotification.php';
1951
1952 return true;
1953 }
static checkForumsExistsInsert($ref_id, $user_id=0)
static _usingRegistrationCode()
Using Registration code.
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, ilCourseParticipants\_getInstanceByObjId(), ilObjCourseAccess\_usingRegistrationCode(), ilForumNotification\checkForumsExistsInsert(), enabledWaitingList(), ilObject\getId(), ilObject\getRefId(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_LIMITED, inSubscriptionTime(), and isSubscriptionMembershipLimited().

+ Here is the call graph for this function:

◆ setAboStatus()

ilObjCourse::setAboStatus (   $a_status)

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

624 {
625 $this->abo = $a_status;
626 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setActivationEnd()

ilObjCourse::setActivationEnd (   $a_value)

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

250 {
251 $this->activation_end = $a_value;
252 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setActivationStart()

ilObjCourse::setActivationStart (   $a_value)

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

242 {
243 $this->activation_start = $a_value;
244 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setActivationType()

ilObjCourse::setActivationType (   $a_type)

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

223 {
224 // offline is separate property now
225 if($a_type == IL_CRS_ACTIVATION_OFFLINE)
226 {
227 $this->setOfflineStatus(true);
229 }
230
231 $this->activation_type = $a_type;
232 }
const IL_CRS_ACTIVATION_OFFLINE

References IL_CRS_ACTIVATION_OFFLINE, IL_CRS_ACTIVATION_UNLIMITED, and setOfflineStatus().

Referenced by __readSettings().

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

◆ setActivationVisibility()

ilObjCourse::setActivationVisibility (   $a_value)

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

262 {
263 $this->activation_visibility = (bool) $a_value;
264 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setArchiveEnd()

ilObjCourse::setArchiveEnd (   $a_value)

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

612 {
613 $this->archive_end = $a_value;
614 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setArchiveStart()

ilObjCourse::setArchiveStart (   $a_value)

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

604 {
605 $this->archive_start = $a_value;
606 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setArchiveType()

ilObjCourse::setArchiveType (   $a_value)

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

620 {
621 $this->archive_type = $a_value;
622 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setAutoNotification()

ilObjCourse::setAutoNotification (   $value)

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

Parameters
mixedboolean

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

1974 {
1975 $this->auto_notification = $value;
1976 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setContactConsultation()

ilObjCourse::setContactConsultation (   $a_value)

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

191 {
192 $this->contact_consultation = $a_value;
193 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setContactEmail()

ilObjCourse::setContactEmail (   $a_value)

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

207 {
208 $this->contact_email = $a_value;
209 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setContactName()

ilObjCourse::setContactName (   $a_cn)

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

183 {
184 $this->contact_name = $a_cn;
185 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setContactPhone()

ilObjCourse::setContactPhone (   $a_value)

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

199 {
200 $this->contact_phone = $a_value;
201 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setContactResponsibility()

ilObjCourse::setContactResponsibility (   $a_value)

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

215 {
216 $this->contact_responsibility = $a_value;
217 }

Referenced by __readSettings().

+ 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 837 of file class.ilObjCourse.php.

838 {
839 $this->enablemap = $a_enablemap;
840 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setImportantInformation()

ilObjCourse::setImportantInformation (   $a_info)

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

167 {
168 $this->important = $a_info;
169 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setLatitude()

ilObjCourse::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

778 {
779 $this->latitude = $a_latitude;
780 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjCourse::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

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

818 {
819 $this->locationzoom = $a_locationzoom;
820 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setLongitude()

ilObjCourse::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

798 {
799 $this->longitude = $a_longitude;
800 }

Referenced by __readSettings().

+ 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 645 of file class.ilObjCourse.php.

646 {
647 $this->mail_members = $a_type;
648 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setMessage()

ilObjCourse::setMessage (   $a_message)

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

664 {
665 $this->message = $a_message;
666 }

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 394 of file class.ilObjCourse.php.

395 {
396 $this->session_next = $a_num;
397 }

Referenced by __readSettings().

+ 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 375 of file class.ilObjCourse.php.

376 {
377 $this->session_prev = $a_num;
378 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setOfflineStatus()

ilObjCourse::setOfflineStatus (   $a_value)

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

258 {
259 $this->activation_offline = (bool) $a_value;
260 }

Referenced by __readSettings(), cloneObject(), and setActivationType().

+ 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 1534 of file class.ilObjCourse.php.

1535 {
1536 global $rbacadmin, $rbacreview;
1537
1538 $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1539 foreach((array) $parent_roles as $parent_role)
1540 {
1541 $rbacadmin->initIntersectionPermissions(
1542 $this->getRefId(),
1543 $parent_role['obj_id'],
1544 $parent_role['parent'],
1546 ROLE_FOLDER_ID
1547 );
1548 }
1549 }
__getCrsNonMemberTemplateId()
get course non-member template @access private

References __getCrsNonMemberTemplateId(), and ilObject\getRefId().

+ 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 138 of file class.ilObjCourse.php.

139 {
140 $this->reg_access_code = $a_code;
141 }

Referenced by __createDefaultSettings(), and __readSettings().

+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjCourse::setShowMembers (   $a_status)

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

632 {
633 $this->show_members = $a_status;
634 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setStatusDetermination()

ilObjCourse::setStatusDetermination (   $a_value)

Set status determination mode.

Parameters
int$a_value

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

1984 {
1985 $a_value = (int)$a_value;
1986
1987 // #13905
1988 if($a_value == self::STATUS_DETERMINATION_LP)
1989 {
1990 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
1992 {
1994 }
1995 }
1996
1997 $this->status_dt = $a_value;
1998 }
const STATUS_DETERMINATION_MANUAL

References ilObjUserTracking\_enabledLearningProgress(), and STATUS_DETERMINATION_MANUAL.

Referenced by __readSettings(), and ilObjCourse().

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

◆ setSubscriptionEnd()

ilObjCourse::setSubscriptionEnd (   $a_value)

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

295 {
296 $this->subscription_end = $a_value;
297 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionLimitationType()

ilObjCourse::setSubscriptionLimitationType (   $a_type)

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

275 {
276 $this->subscription_limitation_type = $a_type;
277 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionMaxMembers()

ilObjCourse::setSubscriptionMaxMembers (   $a_value)

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

424 {
425 $this->subscription_max_members = $a_value;
426 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionNotify()

ilObjCourse::setSubscriptionNotify (   $a_value)

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

560 {
561 $this->subscription_notify = $a_value ? true : false;
562 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionPassword()

ilObjCourse::setSubscriptionPassword (   $a_value)

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

312 {
313 $this->subscription_password = $a_value;
314 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionStart()

ilObjCourse::setSubscriptionStart (   $a_value)

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

287 {
288 $this->subscription_start = $a_value;
289 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSubscriptionType()

ilObjCourse::setSubscriptionType (   $a_value)

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

304 {
305 $this->subscription_type = $a_value;
306 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setSyllabus()

ilObjCourse::setSyllabus (   $a_syllabus)

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

175 {
176 $this->syllabus = $a_syllabus;
177 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ setViewMode()

ilObjCourse::setViewMode (   $a_mode)

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

565 {
566 $this->view_mode = $a_mode;
567 }

Referenced by __readSettings().

+ Here is the caller graph for this function:

◆ syncMembersStatusWithLP()

ilObjCourse::syncMembersStatusWithLP ( )

Set course status for all members by lp status.

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

2014 {
2015 include_once "Services/Tracking/classes/class.ilLPStatusWrapper.php";
2016 foreach($this->getMembersObject()->getParticipants() as $user_id)
2017 {
2018 // #15529 - force raise on sync
2019 ilLPStatusWrapper::_updateStatus($this->getId(), $user_id, null, false, false, true);
2020 }
2021 }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.

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

+ Here is the call graph for this function:

◆ update()

ilObjCourse::update ( )

update complete object

Reimplemented from ilContainer.

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

1126 {
1127 global $ilAppEventHandler,$ilLog;
1128
1129 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
1130 $sorting = new ilContainerSortingSettings($this->getId());
1131 $sorting->setSortMode($this->getOrderType());
1132 $sorting->update();
1133
1134 $this->updateMetaData();
1135 $this->updateSettings();
1136 parent::update();
1137
1138 $ilAppEventHandler->raise('Modules/Course',
1139 'update',
1140 array('object' => $this,
1141 'obj_id' => $this->getId(),
1142 'appointments' => $this->prepareAppointments('update')));
1143
1144 }
updateMetaData()
update meta data entry

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

+ Here is the call graph for this function:

◆ updateSettings()

ilObjCourse::updateSettings ( )

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

1147 {
1148 global $ilDB;
1149
1150 // Due to a bug 3.5.alpha maybe no settings exist. => create default settings
1151
1152 $query = "SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')." ";
1153 $res = $ilDB->query($query);
1154
1155 if(!$res->numRows())
1156 {
1157 $this->__createDefaultSettings();
1158 }
1159
1160 $query = "UPDATE crs_settings SET ".
1161 "syllabus = ".$ilDB->quote($this->getSyllabus() ,'text').", ".
1162 "contact_name = ".$ilDB->quote($this->getContactName() ,'text').", ".
1163 "contact_responsibility = ".$ilDB->quote($this->getContactResponsibility() ,'text').", ".
1164 "contact_phone = ".$ilDB->quote($this->getContactPhone() ,'text').", ".
1165 "contact_email = ".$ilDB->quote($this->getContactEmail() ,'text').", ".
1166 "contact_consultation = ".$ilDB->quote($this->getContactConsultation() ,'text').", ".
1167 "activation_type = ".$ilDB->quote(!$this->getOfflineStatus() ,'integer').", ".
1168 "sub_limitation_type = ".$ilDB->quote($this->getSubscriptionLimitationType() ,'integer').", ".
1169 "sub_start = ".$ilDB->quote($this->getSubscriptionStart() ,'integer').", ".
1170 "sub_end = ".$ilDB->quote($this->getSubscriptionEnd() ,'integer').", ".
1171 "sub_type = ".$ilDB->quote($this->getSubscriptionType() ,'integer').", ".
1172 "sub_password = ".$ilDB->quote($this->getSubscriptionPassword() ,'text').", ".
1173 "sub_mem_limit = ".$ilDB->quote((int) $this->isSubscriptionMembershipLimited() ,'integer').", ".
1174 "sub_max_members = ".$ilDB->quote($this->getSubscriptionMaxMembers() ,'integer').", ".
1175 "sub_notify = ".$ilDB->quote($this->getSubscriptionNotify() ,'integer').", ".
1176 "view_mode = ".$ilDB->quote($this->getViewMode() ,'integer').", ".
1177 "archive_start = ".$ilDB->quote($this->getArchiveStart() ,'integer').", ".
1178 "archive_end = ".$ilDB->quote($this->getArchiveEnd() ,'integer').", ".
1179 "archive_type = ".$ilDB->quote($this->getArchiveType() ,'integer').", ".
1180 "abo = ".$ilDB->quote($this->getAboStatus() ,'integer').", ".
1181 "waiting_list = ".$ilDB->quote($this->enabledWaitingList() ,'integer').", ".
1182 "important = ".$ilDB->quote($this->getImportantInformation() ,'text').", ".
1183 "show_members = ".$ilDB->quote($this->getShowMembers() ,'integer').", ".
1184 "latitude = ".$ilDB->quote($this->getLatitude() ,'text').", ".
1185 "longitude = ".$ilDB->quote($this->getLongitude() ,'text').", ".
1186 "location_zoom = ".$ilDB->quote($this->getLocationZoom() ,'integer').", ".
1187 "enable_course_map = ".$ilDB->quote((int) $this->getEnableCourseMap() ,'integer').", ".
1188 'session_limit = '.$ilDB->quote($this->isSessionLimitEnabled(),'integer').', '.
1189 'session_prev = '.$ilDB->quote($this->getNumberOfPreviousSessions(),'integer').', '.
1190 'session_next = '.$ilDB->quote($this->getNumberOfNextSessions(),'integer').', '.
1191 'reg_ac_enabled = '.$ilDB->quote($this->isRegistrationAccessCodeEnabled(),'integer').', '.
1192 'reg_ac = '.$ilDB->quote($this->getRegistrationAccessCode(),'text').', '.
1193 'auto_notification = '.$ilDB->quote( (int)$this->getAutoNotification(), 'integer').', '.
1194 'status_dt = '.$ilDB->quote((int) $this->getStatusDetermination()).', '.
1195 'mail_members_type = '.$ilDB->quote((int) $this->getMailToMembersType(),'integer').' '.
1196 "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')."";
1197
1198
1199 $res = $ilDB->manipulate($query);
1200
1201 // moved activation to ilObjectActivation
1202 if($this->ref_id)
1203 {
1204 include_once "./Services/Object/classes/class.ilObjectActivation.php";
1205 ilObjectActivation::getItem($this->ref_id);
1206
1207 $item = new ilObjectActivation;
1208 if($this->getActivationUnlimitedStatus())
1209 {
1211 }
1212 else
1213 {
1214 $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
1215 $item->setTimingStart($this->getActivationStart());
1216 $item->setTimingEnd($this->getActivationEnd());
1217 $item->toggleVisible($this->getActivationVisibility());
1218 }
1219
1220 $item->update($this->ref_id);
1221 }
1222 }
Class ilObjectActivation.
setTimingType($a_type)
Set timing type.

References $ilDB, $query, $res, __createDefaultSettings(), enabledWaitingList(), getAboStatus(), getActivationEnd(), getActivationStart(), getActivationUnlimitedStatus(), getActivationVisibility(), getArchiveEnd(), getArchiveStart(), getArchiveType(), getAutoNotification(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getEnableCourseMap(), ilObject\getId(), getImportantInformation(), ilObjectActivation\getItem(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getNumberOfNextSessions(), getNumberOfPreviousSessions(), getOfflineStatus(), getRegistrationAccessCode(), getShowMembers(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionNotify(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), getSyllabus(), getViewMode(), isRegistrationAccessCodeEnabled(), isSessionLimitEnabled(), isSubscriptionMembershipLimited(), ilObjectActivation\setTimingType(), 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 988 of file class.ilObjCourse.php.

989 {
990 $this->setMessage('');
991
992 #if(($this->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED) and
993 # $this->getSubscriptionType() == )
994 #{
995 # $this->appendMessage($this->lng->txt('crs_select_registration_type'));
996 #}
997
999 $this->getActivationEnd() < $this->getActivationStart())
1000 {
1001 $this->appendMessage($this->lng->txt("activation_times_not_valid"));
1002 }
1004 $this->getSubscriptionStart() > $this->getSubscriptionEnd())
1005 {
1006 $this->appendMessage($this->lng->txt("subscription_times_not_valid"));
1007 }
1008 #if((!$this->getActivationUnlimitedStatus() and
1009 # !$this->getSubscriptionUnlimitedStatus()) and
1010 # ($this->getSubscriptionStart() > $this->getActivationEnd() or
1011 # $this->getSubscriptionStart() < $this->getActivationStart() or
1012 # $this->getSubscriptionEnd() > $this->getActivationEnd() or
1013 # $this->getSubscriptionEnd() < $this->getActivationStart()))
1014 #
1015 #{
1016 # $this->appendMessage($this->lng->txt("subscription_time_not_within_activation"));
1017 #}
1019 {
1020 $this->appendMessage($this->lng->txt("crs_password_required"));
1021 }
1022 if($this->isSubscriptionMembershipLimited() and ($this->getSubscriptionMaxMembers() <= 0 or !is_numeric($this->getSubscriptionMaxMembers())))
1023 {
1024 $this->appendMessage($this->lng->txt("max_members_not_numeric"));
1025 }
1026 if(($this->getViewMode() == IL_CRS_VIEW_ARCHIVE) and
1027 $this->getArchiveStart() > $this->getArchiveEnd())
1028 {
1029 $this->appendMessage($this->lng->txt("archive_times_not_valid"));
1030 }
1031 if(!$this->getTitle() || !$this->getStatusDetermination())
1032 {
1033 $this->appendMessage($this->lng->txt('err_check_input'));
1034 }
1035
1036
1037 return $this->getMessage() ? false : true;
1038 }
const IL_CRS_SUBSCRIPTION_PASSWORD
setMessage($a_message)
appendMessage($a_message)

References appendMessage(), getActivationEnd(), getActivationStart(), getActivationType(), getArchiveEnd(), getArchiveStart(), getMessage(), getStatusDetermination(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), ilObject\getTitle(), getViewMode(), IL_CRS_ACTIVATION_LIMITED, IL_CRS_SUBSCRIPTION_LIMITED, IL_CRS_SUBSCRIPTION_PASSWORD, IL_CRS_VIEW_ARCHIVE, isSubscriptionMembershipLimited(), and setMessage().

+ Here is the call graph for this function:

◆ validateInfoSettings()

ilObjCourse::validateInfoSettings ( )

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

1041 {
1042 global $ilErr;
1043 $error = false;
1044 if($this->getContactEmail()) {
1045 $emails = split(",",$this->getContactEmail());
1046
1047 foreach ($emails as $email) {
1048 $email = trim($email);
1049 if (!(ilUtil::is_email($email) or ilObjUser::getUserIdByLogin($email)))
1050 {
1051 $ilErr->appendMessage($this->lng->txt('contact_email_not_valid')." '".$email."'");
1052 $error = true;
1053 }
1054 }
1055 }
1056 return !$error;
1057 }
getUserIdByLogin($a_login)
static is_email($a_email)
This preg-based function checks whether an e-mail address is formally valid.

References $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 48 of file class.ilObjCourse.php.

◆ $auto_notification

ilObjCourse::$auto_notification = true
private

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

Referenced by getAutoNotification().

◆ $enablemap

ilObjCourse::$enablemap = 0
private

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

Referenced by getEnableCourseMap().

◆ $latitude

ilObjCourse::$latitude = ''
private

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

Referenced by getLatitude().

◆ $locationzoom

ilObjCourse::$locationzoom = 0
private

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

Referenced by getLocationZoom().

◆ $longitude

ilObjCourse::$longitude = ''
private

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

Referenced by getLongitude().

◆ $mail_members

ilObjCourse::$mail_members = ilCourseConstants::MAIL_ALLOWED_ALL
private

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

Referenced by getMailToMembersType().

◆ $member_obj

ilObjCourse::$member_obj = null
private

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

Referenced by getMemberObject().

◆ $members_obj

ilObjCourse::$members_obj = null
private

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

Referenced by getMembersObject().

◆ $reg_access_code

ilObjCourse::$reg_access_code = ''
private

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

Referenced by getRegistrationAccessCode().

◆ $reg_access_code_enabled

ilObjCourse::$reg_access_code_enabled = false
private

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

Referenced by isRegistrationAccessCodeEnabled().

◆ $session_limit

ilObjCourse::$session_limit = 0
private

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

Referenced by isSessionLimitEnabled().

◆ $session_next

ilObjCourse::$session_next = -1
private

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

Referenced by getNumberOfNextSessions().

◆ $session_prev

ilObjCourse::$session_prev = -1
private

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

Referenced by getNumberOfPreviousSessions().

◆ $status_dt

ilObjCourse::$status_dt = null
private

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

Referenced by getStatusDetermination().

◆ CAL_ACTIVATION_END

const ilObjCourse::CAL_ACTIVATION_END = 4

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

◆ CAL_ACTIVATION_START

const ilObjCourse::CAL_ACTIVATION_START = 3

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

◆ CAL_REG_END

const ilObjCourse::CAL_REG_END = 2

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

◆ CAL_REG_START

const ilObjCourse::CAL_REG_START = 1

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

◆ STATUS_DETERMINATION_LP

◆ STATUS_DETERMINATION_MANUAL

const ilObjCourse::STATUS_DETERMINATION_MANUAL = 2

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

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


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