ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjCourse Class Reference

Class ilObjCourse. More...

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

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor 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, $a_get_single=0)
 Get subitems of container. More...
 
 getSubscriptionNotify ()
 
 setSubscriptionNotify ($a_value)
 
 setViewMode ($a_mode)
 
 getViewMode ()
 
 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 ()
 
 allowAbo ()
 
 read ()
 
 create ($a_upload=false)
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set LocationZoom. More...
 
 getLocationZoom ()
 Get LocationZoom. More...
 
 setEnableCourseMap ($a_enablemap)
 Set Enable Course Map. More...
 
 getEnableMap ()
 Type independent wrapper. More...
 
 getEnableCourseMap ()
 Get Enable Course Map. More...
 
 setCourseStart (ilDate $a_value=null)
 
 getCourseStart ()
 
 setCourseEnd (ilDate $a_value=null)
 
 getCourseEnd ()
 
 setCancellationEnd (ilDate $a_value=null)
 
 getCancellationEnd ()
 
 setSubscriptionMinMembers ($a_value)
 
 getSubscriptionMinMembers ()
 
 setWaitingListAutoFill ($a_value)
 
 hasWaitingListAutoFill ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone course (no member data) More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (start objects, preconditions) More...
 
 cloneAutoGeneratedRoles ($new_obj)
 Clone automatic genrated roles (permissions and template permissions) More...
 
 validate ()
 
 validateInfoSettings ()
 
 hasContactData ()
 
 delete ()
 delete course and all related data More...
 
 update ()
 update complete object More...
 
 updateSettings ()
 
 cloneSettings ($new_obj)
 Clone entries in settings table. More...
 
 __createDefaultSettings ()
 
 __readSettings ()
 
 initWaitingList ()
 
 getMemberObject ()
 Get course member object. More...
 
 getMembersObject ()
 
 initDefaultRoles ()
 
 setParentRolePermissions ($a_parent_ref)
 This method is called before "initDefaultRoles". More...
 
 __getCrsNonMemberTemplateId ()
 get course non-member template 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 public More...
 
 __getLocalRoles ()
 
 __deleteSettings ()
 
 getDefaultMemberRole ()
 
 getDefaultTutorRole ()
 
 getDefaultAdminRole ()
 
 MDUpdateListener ($a_element)
 Overwriten Metadata update listener for ECS functionalities. More...
 
 addAdditionalSubItemInformation (&$a_item_data)
 Add additional information to sub item, e.g. More...
 
 register ($a_user_id, $a_role=ilCourseConstants::CRS_MEMBER, $a_force_registration=false)
 
 getAutoNotification ()
 Returns automatic notification status from $this->auto_notification. More...
 
 setAutoNotification ($value)
 Sets automatic notification status in $this->auto_notification, using given $status. More...
 
 setStatusDetermination ($a_value)
 Set status determination mode. More...
 
 getStatusDetermination ()
 Get status determination mode. More...
 
 syncMembersStatusWithLP ()
 Set course status for all members by lp status. More...
 
 checkLPStatusSync ($a_member_id)
 sync course status from lp More...
 
 getOrderType ()
 
 handleAutoFill ()
 Handle course auto fill. More...
 
- Public Member Functions inherited from ilContainer
 __construct ($a_id=0, $a_reference=true)
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 getBigIconPath ()
 Get path for big icon. More...
 
 getSmallIconPath ()
 Get path for small icon. More...
 
 getTinyIconPath ()
 Get path for tiny icon. More...
 
 getCustomIconPath ()
 Get path for custom icon. More...
 
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems). More...
 
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems). More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 setNewsTimeline ($a_val)
 Set news timeline. More...
 
 getNewsTimeline ()
 Get news timeline. More...
 
 setNewsTimelineAutoEntries ($a_val)
 Set news timeline auto entries. More...
 
 getNewsTimelineAutoEntries ()
 Get news timeline auto entries. More...
 
 setNewsTimelineLandingPage ($a_val)
 Set news timline is landing page. More...
 
 getNewsTimelineLandingPage ()
 Get news timline is landing page. More...
 
 isNewsTimelineEffective ()
 Is news timeline effective? More...
 
 isNewsTimelineLandingPageEffective ()
 Is news timeline landing page effective? More...
 
 setNewsBlockActivated ($a_val)
 Set news block activated. More...
 
 getNewsBlockActivated ()
 Get news block activated. More...
 
 setUseNews ($a_val)
 Set use news. More...
 
 getUseNews ()
 Get use news. More...
 
 saveIcons ($a_custom_icon)
 save container icons More...
 
 removeCustomIcon ()
 remove small icon More...
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone container settings. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false, $a_submode=1)
 clone all objects according to this container More...
 
 getViewMode ()
 Get container view mode. More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 setOrderType ($a_value)
 
 getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0)
 Get subitems of container. More...
 
 gotItems ()
 Check whether we got any items. More...
 
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 enablePageEditing ()
 Check whether page editing is allowed for container. More...
 
 create ()
 Create. More...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
 readContainerSettings ()
 Read container settings. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 
- 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 _lookupViewMode ($a_id)
 lookup view mode of container More...
 
static _lookupAboStatus ($a_id)
 
static _isActivated ($a_obj_id)
 Is activated. More...
 
static _registrationEnabled ($a_obj_id)
 Registration enabled? Method is in Access class, since it is needed by Access/ListGUI. More...
 
static lookupCourseNonMemberTemplatesId ()
 Lookup course non member id. More...
 
static _deleteUser ($a_usr_id)
 
static lookupObjectsByCode ($a_code)
 
static mayLeave ($a_course_id, $a_user_id=null, &$a_date=null)
 
static findCoursesWithNotEnoughMembers ()
 Minimum members check type $ilDB. More...
 
- Static Public Member Functions inherited from ilContainer
static _getContainerDirectory ($a_id)
 Get the container directory. More...
 
static _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=NULL)
 Lookup a container setting. More...
 
static _writeContainerSetting ($a_id, $a_keyword, $a_value)
 
static _getContainerSettings ($a_id)
 
static _deleteContainerSettings ($a_id, $a_keyword=null, $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, $a_obj_id)
 
static _lookupIconPath ($a_id, $a_size="big")
 lookup icon path More...
 
static getCompleteDescriptions (array $objects)
 overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date type $ilDB. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const CAL_REG_START = 1
 
const CAL_REG_END = 2
 
const CAL_ACTIVATION_START = 3
 
const CAL_ACTIVATION_END = 4
 
const CAL_COURSE_START = 5
 
const CAL_COURSE_END = 6
 
const STATUS_DETERMINATION_LP = 1
 
const STATUS_DETERMINATION_MANUAL = 2
 
 $archives_obj
 
- Data Fields inherited from ilContainer
const VIEW_SESSIONS = 0
 
const VIEW_OBJECTIVE = 1
 
const VIEW_TIMING = 2
 
const VIEW_ARCHIVE = 3
 
const VIEW_SIMPLE = 4
 
const VIEW_BY_TYPE = 5
 
const VIEW_INHERIT = 6
 
const VIEW_DEFAULT = self::VIEW_BY_TYPE
 
const SORT_TITLE = 0
 
const SORT_MANUAL = 1
 
const SORT_ACTIVATION = 2
 
const SORT_INHERIT = 3
 
const SORT_CREATION = 4
 
const SORT_DIRECTION_ASC = 0
 
const SORT_DIRECTION_DESC = 1
 
const SORT_NEW_ITEMS_POSITION_TOP = 0
 
const SORT_NEW_ITEMS_POSITION_BOTTOM = 1
 
const SORT_NEW_ITEMS_ORDER_TITLE = 0
 
const SORT_NEW_ITEMS_ORDER_CREATION = 1
 
const SORT_NEW_ITEMS_ORDER_ACTIVATION = 2
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $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
 

Protected Member Functions

 initCourseMemberObject ()
 Init course member object ilObjUser $ilUser. More...
 
 initCourseMembersObject ()
 Init course member object ilObjUser $ilUser. More...
 
 prepareAppointments ($a_mode='create')
 Prepare calendar appointments. More...
 

Protected Attributes

 $course_logger = null
 
 $crs_start
 
 $crs_end
 
 $leave_end
 
 $min_members
 
 $auto_fill_from_waiting
 
- Protected Attributes inherited from ilContainer
 $order_type = 0
 
 $hiddenfilesfound = false
 
 $news_timeline = false
 
 $news_timeline_auto_entries = false
 
 $setting
 

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
 
- Static Protected Member Functions inherited from ilContainer
static fixInternalLinksAfterCopy ($a_target_id, $a_copy_id, $a_source_ref_id)
 Fix internal links after copy process. More...
 

Detailed Description

Class ilObjCourse.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor public.

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

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

References $GLOBALS, and setStatusDetermination().

95  {
96 
97  #define("ILIAS_MODULE","course");
98  #define("KEEP_IMAGE_PATH",1);
99 
100  $this->SUBSCRIPTION_DEACTIVATED = 1;
101  $this->SUBSCRIPTION_CONFIRMATION = 2;
102  $this->SUBSCRIPTION_DIRECT = 3;
103  $this->SUBSCRIPTION_PASSWORD = 4;
104  $this->SUBSCRIPTION_AUTOSUBSCRIPTION = 5;
105  $this->ARCHIVE_DISABLED = 1;
106  $this->ARCHIVE_READ = 2;
107  $this->ARCHIVE_DOWNLOAD = 3;
108  $this->ABO_ENABLED = 1;
109  $this->ABO_DISABLED = 0;
110  $this->SHOW_MEMBERS_ENABLED = 1;
111  $this->SHOW_MEMBERS_DISABLED = 0;
112  $this->setStatusDetermination(self::STATUS_DETERMINATION_LP);
113 
114  $this->type = "crs";
115 
116  $this->course_logger = $GLOBALS['DIC']->logger()->crs();
117 
118  parent::__construct($a_id,$a_call_by_reference);
119 
120  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setStatusDetermination($a_value)
Set status determination mode.
+ Here is the call graph for this function:

Member Function Documentation

◆ __createDefaultSettings()

ilObjCourse::__createDefaultSettings ( )

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

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

Referenced by create(), and updateSettings().

1366  {
1367  global $ilDB;
1368 
1369  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1371 
1372  $query = "INSERT INTO crs_settings (obj_id,syllabus,contact_name,contact_responsibility,".
1373  "contact_phone,contact_email,contact_consultation,activation_type,activation_start,".
1374  "activation_end,sub_limitation_type,sub_start,sub_end,sub_type,sub_password,sub_mem_limit,".
1375  "sub_max_members,sub_notify,view_mode,abo," .
1376  "latitude,longitude,location_zoom,enable_course_map,waiting_list,show_members, ".
1377  "session_limit,session_prev,session_next, reg_ac_enabled, reg_ac, auto_notification, status_dt,mail_members_type) ".
1378  "VALUES( ".
1379  $ilDB->quote($this->getId() ,'integer').", ".
1380  $ilDB->quote($this->getSyllabus() ,'text').", ".
1381  $ilDB->quote($this->getContactName() ,'text').", ".
1382  $ilDB->quote($this->getContactResponsibility() ,'text').", ".
1383  $ilDB->quote($this->getContactPhone() ,'text').", ".
1384  $ilDB->quote($this->getContactEmail() ,'text').", ".
1385  $ilDB->quote($this->getContactConsultation() ,'text').", ".
1386  $ilDB->quote(0 ,'integer').", ".
1387  $ilDB->quote($this->getActivationStart() ,'integer').", ".
1388  $ilDB->quote($this->getActivationEnd() ,'integer').", ".
1389  $ilDB->quote(IL_CRS_SUBSCRIPTION_DEACTIVATED ,'integer').", ".
1390  $ilDB->quote($this->getSubscriptionStart() ,'integer').", ".
1391  $ilDB->quote($this->getSubscriptionEnd() ,'integer').", ".
1392  $ilDB->quote(IL_CRS_SUBSCRIPTION_DIRECT ,'integer').", ".
1393  $ilDB->quote($this->getSubscriptionPassword() ,'text').", ".
1394  "0, ".
1395  $ilDB->quote($this->getSubscriptionMaxMembers() ,'integer').", ".
1396  "1, ".
1397  "0, ".
1398  $ilDB->quote($this->ABO_ENABLED ,'integer').", ".
1399  $ilDB->quote($this->getLatitude() ,'text').", ".
1400  $ilDB->quote($this->getLongitude() ,'text').", ".
1401  $ilDB->quote($this->getLocationZoom() ,'integer').", ".
1402  $ilDB->quote($this->getEnableCourseMap() ,'integer').", ".
1403  #"objective_view = '0', ".
1404  "1, ".
1405  "1,".
1406  $ilDB->quote($this->isSessionLimitEnabled(),'integer').', '.
1407  $ilDB->quote($this->getNumberOfPreviousSessions(),'integer').', '.
1408  $ilDB->quote($this->getNumberOfPreviousSessions(),'integer').', '.
1409  $ilDB->quote($this->isRegistrationAccessCodeEnabled(),'integer').', '.
1410  $ilDB->quote($this->getRegistrationAccessCode(),'text').', '.
1411  $ilDB->quote((int)$this->getAutoNotification(),'integer').', '.
1412  $ilDB->quote((int)$this->getStatusDetermination(),'integer').', '.
1413  $ilDB->quote((int) $this->getMailToMembersType(),'integer').' '.
1414  ")";
1415 
1416  $res = $ilDB->manipulate($query);
1417  $this->__readSettings();
1418 
1419  include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
1420  $sorting = new ilContainerSortingSettings($this->getId());
1421  $sorting->setSortMode(ilContainer::SORT_MANUAL);
1422  $sorting->update();
1423  }
getMailToMembersType()
Get mail to members type.
getLongitude()
Get Longitude.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getStatusDetermination()
Get status determination mode.
setRegistrationAccessCode($a_code)
Set refistration access code.
getLocationZoom()
Get LocationZoom.
getId()
get object id public
getRegistrationAccessCode()
get access code
getAutoNotification()
Returns automatic notification status from $this->auto_notification.
getLatitude()
Get Latitude.
static generateCode()
Generate new registration key.
global $ilDB
getNumberOfPreviousSessions()
Set number of previous sessions.
const IL_CRS_SUBSCRIPTION_DIRECT
getEnableCourseMap()
Get Enable Course Map.
const IL_CRS_SUBSCRIPTION_DEACTIVATED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __deleteSettings()

ilObjCourse::__deleteSettings ( )

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

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

Referenced by delete().

1755  {
1756  global $ilDB;
1757 
1758  $query = "DELETE FROM crs_settings ".
1759  "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')." ";
1760  $res = $ilDB->manipulate($query);
1761 
1762  return true;
1763  }
getId()
get object id public
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getCrsNonMemberTemplateId()

ilObjCourse::__getCrsNonMemberTemplateId ( )

get course non-member template private

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

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

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

Referenced by setParentRolePermissions().

1630  {
1631  global $ilDB;
1632 
1633  $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_crs_non_member'";
1634  $res = $this->ilias->db->query($q);
1636 
1637  return $row["obj_id"];
1638  }
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilDB
+ Here is the caller graph for this function:

◆ __getLocalRoles()

ilObjCourse::__getLocalRoles ( )

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

References ilObject\getRefId().

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

1746  {
1747  global $rbacreview;
1748 
1749  // GET role_objects of predefined roles
1750 
1751  return $rbacreview->getRolesOfRoleFolder($this->getRefId(),false);
1752  }
getRefId()
get reference id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __readSettings()

ilObjCourse::__readSettings ( )

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

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

Referenced by __createDefaultSettings(), and read().

1427  {
1428  global $ilDB;
1429 
1430  $query = "SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')."";
1431 
1432  $res = $ilDB->query($query);
1433  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
1434  {
1435  $this->setSyllabus($row->syllabus);
1436  $this->setContactName($row->contact_name);
1437  $this->setContactResponsibility($row->contact_responsibility);
1438  $this->setContactPhone($row->contact_phone);
1439  $this->setContactEmail($row->contact_email);
1440  $this->setContactConsultation($row->contact_consultation);
1441  $this->setOfflineStatus(!(bool)$row->activation_type); // see below
1442  $this->setSubscriptionLimitationType($row->sub_limitation_type);
1443  $this->setSubscriptionStart($row->sub_start);
1444  $this->setSubscriptionEnd($row->sub_end);
1445  $this->setSubscriptionType($row->sub_type);
1446  $this->setSubscriptionPassword($row->sub_password);
1447  $this->enableSubscriptionMembershipLimitation($row->sub_mem_limit);
1448  $this->setSubscriptionMaxMembers($row->sub_max_members);
1449  $this->setSubscriptionNotify($row->sub_notify);
1450  $this->setViewMode($row->view_mode);
1451  $this->setAboStatus($row->abo);
1452  $this->enableWaitingList($row->waiting_list);
1453  $this->setImportantInformation($row->important);
1454  $this->setShowMembers($row->show_members);
1455  $this->setLatitude($row->latitude);
1456  $this->setLongitude($row->longitude);
1457  $this->setLocationZoom($row->location_zoom);
1458  $this->setEnableCourseMap($row->enable_course_map);
1459  $this->enableSessionLimit($row->session_limit);
1460  $this->setNumberOfPreviousSessions($row->session_prev);
1461  $this->setNumberOfNextSessions($row->session_next);
1462  $this->enableRegistrationAccessCode($row->reg_ac_enabled);
1463  $this->setRegistrationAccessCode($row->reg_ac);
1464  $this->setAutoNotification($row->auto_notification == 1 ? true : false);
1465  $this->setStatusDetermination((int) $row->status_dt);
1466  $this->setMailToMembersType($row->mail_members_type);
1467  $this->setCourseStart($row->crs_start ? new ilDate($row->crs_start, IL_CAL_UNIX) : null);
1468  $this->setCourseEnd($row->crs_end ? new ilDate($row->crs_end, IL_CAL_UNIX) : null);
1469  $this->setCancellationEnd($row->leave_end ? new ilDate($row->leave_end, IL_CAL_UNIX) : null);
1470  $this->setWaitingListAutoFill($row->auto_wait);
1471  $this->setSubscriptionMinMembers($row->min_members ? $row->min_members : null);
1472  }
1473 
1474  // moved activation to ilObjectActivation
1475  if($this->ref_id)
1476  {
1477  include_once "./Services/Object/classes/class.ilObjectActivation.php";
1478  $activation = ilObjectActivation::getItem($this->ref_id);
1479  switch($activation["timing_type"])
1480  {
1483  $this->setActivationStart($activation["timing_start"]);
1484  $this->setActivationEnd($activation["timing_end"]);
1485  $this->setActivationVisibility($activation["visible"]);
1486  break;
1487 
1488  default:
1490  break;
1491  }
1492  }
1493  else
1494  {
1495  // #13176 - there should always be default
1497  }
1498 
1499  return true;
1500  }
setActivationEnd($a_value)
setSubscriptionNotify($a_value)
const IL_CRS_ACTIVATION_LIMITED
setContactResponsibility($a_value)
setSubscriptionStart($a_value)
setSubscriptionEnd($a_value)
setNumberOfPreviousSessions($a_num)
Set number of previous sessions.
setAutoNotification($value)
Sets automatic notification status in $this->auto_notification, using given $status.
setImportantInformation($a_info)
setMailToMembersType($a_type)
Set mail to members type.
static getItem($a_ref_id)
Get item data.
setContactEmail($a_value)
enableSubscriptionMembershipLimitation($a_status)
enable max members
setOfflineStatus($a_value)
enableSessionLimit($a_status)
en/disable limited number of sessions
const IL_CAL_UNIX
setSubscriptionPassword($a_value)
setCourseEnd(ilDate $a_value=null)
setRegistrationAccessCode($a_code)
Set refistration access code.
setSyllabus($a_syllabus)
setLatitude($a_latitude)
Set Latitude.
setViewMode($a_mode)
setEnableCourseMap($a_enablemap)
Set Enable Course Map.
setActivationVisibility($a_value)
setAboStatus($a_status)
setLocationZoom($a_locationzoom)
Set LocationZoom.
setActivationStart($a_value)
Class for single dates.
setLongitude($a_longitude)
Set Longitude.
getId()
get object id public
setSubscriptionType($a_value)
setSubscriptionMinMembers($a_value)
setNumberOfNextSessions($a_num)
Set number of previous sessions.
setContactConsultation($a_value)
enableRegistrationAccessCode($a_status)
En/disable registration access code.
setActivationType($a_type)
setContactPhone($a_value)
setCancellationEnd(ilDate $a_value=null)
global $ilDB
setSubscriptionMaxMembers($a_value)
enableWaitingList($a_status)
setWaitingListAutoFill($a_value)
setShowMembers($a_status)
setCourseStart(ilDate $a_value=null)
const IL_CRS_ACTIVATION_UNLIMITED
setStatusDetermination($a_value)
Set status determination mode.
setSubscriptionLimitationType($a_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _deleteUser()

static ilObjCourse::_deleteUser (   $a_usr_id)
static

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

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

Referenced by ilObjUser\delete().

1814  {
1815  // Delete all user related data
1816  // delete lm_history
1817  include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
1818  ilCourseLMHistory::_deleteUser($a_usr_id);
1819 
1820  include_once './Modules/Course/classes/class.ilCourseParticipants.php';
1822 
1823  // Course objectives
1824  include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1826  }
static _deleteUser($a_usr_id)
Delete user type $ilDB.
static deleteResultsForUser($a_user_id)
Delete all result entries for user.
static _deleteUser($a_usr_id)
Delete user data.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _isActivated()

static ilObjCourse::_isActivated (   $a_obj_id)
static

Is activated.

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

Parameters
intid of user
Returns
boolean

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

References ilObjCourseAccess\_isActivated().

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

721  {
722  include_once("./Modules/Course/classes/class.ilObjCourseAccess.php");
723  return ilObjCourseAccess::_isActivated($a_obj_id);
724  }
static _isActivated($a_obj_id, &$a_visible_flag=null, $a_mind_member_view=true)
Is activated?
+ 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.

public

Parameters
intcourse_id

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

References $ilDB, $query, and $res.

452  {
453  global $ilDB;
454 
455  $query = "SELECT * FROM crs_settings ".
456  "WHERE obj_id = ".$ilDB->quote($a_course_id ,'integer')." ".
457  "AND sub_notify = 1";
458  $res = $ilDB->query($query);
459  return $res->numRows() ? true : false;
460  }
global $ilDB

◆ _lookupAboStatus()

static ilObjCourse::_lookupAboStatus (   $a_id)
static

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

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

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

607  {
608  global $ilDB;
609 
610  $query = "SELECT abo FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id ,'integer')." ";
611  $res = $ilDB->query($query);
612  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
613  {
614  return $row->abo;
615  }
616  return false;
617  }
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupViewMode()

static ilObjCourse::_lookupViewMode (   $a_id)
static

lookup view mode of container

Parameters
int$a_id
Returns
mixed int | bool

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

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

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

594  {
595  global $ilDB;
596 
597  $query = "SELECT view_mode FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id ,'integer')." ";
598  $res = $ilDB->query($query);
599  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
600  {
601  return $row->view_mode;
602  }
603  return false;
604  }
global $ilDB
+ Here is the caller graph for this function:

◆ _registrationEnabled()

static ilObjCourse::_registrationEnabled (   $a_obj_id)
static

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

Parameters
intid of user
Returns
boolean

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

References ilObjCourseAccess\_registrationEnabled().

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

733  {
734  include_once("./Modules/Course/classes/class.ilObjCourseAccess.php");
735  return ilObjCourseAccess::_registrationEnabled($a_obj_id);
736  }
static _registrationEnabled($a_obj_id)
+ 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.

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

References ilObjectActivation\addAdditionalSubItemInformation().

1859  {
1860  include_once './Services/Object/classes/class.ilObjectActivation.php';
1862  }
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
+ Here is the call graph for this function:

◆ allowAbo()

ilObjCourse::allowAbo ( )

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

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

◆ appendMessage()

ilObjCourse::appendMessage (   $a_message)

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

References getMessage().

Referenced by validate().

688  {
689  if($this->getMessage())
690  {
691  $this->message .= "<br /> ";
692  }
693  $this->message .= $a_message;
694  }
+ 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 2123 of file class.ilObjCourse.php.

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

Referenced by handleAutoFill().

2124  {
2125  // #11113
2126  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
2129  {
2130  include_once("Services/Tracking/classes/class.ilLPStatus.php");
2131  // #13811 - we need to suppress creation if status entry
2132  $has_completed = (ilLPStatus::_lookupStatus($this->getId(), $a_member_id, false) == ilLPStatus::LP_STATUS_COMPLETED_NUM);
2133  $this->getMembersObject()->updatePassed($a_member_id, $has_completed, false, true);
2134  }
2135  }
const LP_STATUS_COMPLETED_NUM
getStatusDetermination()
Get status determination mode.
const STATUS_DETERMINATION_LP
static _enabledLearningProgress()
check wether learing progress is enabled or not
getId()
get object id public
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAutoGeneratedRoles()

ilObjCourse::cloneAutoGeneratedRoles (   $new_obj)

Clone automatic genrated roles (permissions and template permissions)

public

Parameters
objectnew course object

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

References $ilLog, getDefaultAdminRole(), getDefaultMemberRole(), getDefaultTutorRole(), and ilObject\getRefId().

Referenced by cloneObject().

1025  {
1026  global $ilLog,$rbacadmin,$rbacreview;
1027 
1028  $admin = $this->getDefaultAdminRole();
1029  $new_admin = $new_obj->getDefaultAdminRole();
1030 
1031  if(!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId())
1032  {
1033  $ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_admin');
1034  }
1035  $rbacadmin->copyRolePermissions($admin,$this->getRefId(),$new_obj->getRefId(),$new_admin,true);
1036  $ilLog->write(__METHOD__.' : Finished copying of role crs_admin.');
1037 
1038  $tutor = $this->getDefaultTutorRole();
1039  $new_tutor = $new_obj->getDefaultTutorRole();
1040  if(!$tutor || !$new_tutor)
1041  {
1042  $ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_tutor');
1043  }
1044  $rbacadmin->copyRolePermissions($tutor,$this->getRefId(),$new_obj->getRefId(),$new_tutor,true);
1045  $ilLog->write(__METHOD__.' : Finished copying of role crs_tutor.');
1046 
1047  $member = $this->getDefaultMemberRole();
1048  $new_member = $new_obj->getDefaultMemberRole();
1049  if(!$member || !$new_member)
1050  {
1051  $ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_member');
1052  }
1053  $rbacadmin->copyRolePermissions($member,$this->getRefId(),$new_obj->getRefId(),$new_member,true);
1054  $ilLog->write(__METHOD__.' : Finished copying of role crs_member.');
1055 
1056  return true;
1057  }
getRefId()
get reference id public
+ 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)

public

Parameters
inttarget ref id of new course
intcopy id

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

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

993  {
994  parent::cloneDependencies($a_target_id,$a_copy_id);
995 
996  // Clone course start objects
997  include_once('Services/Container/classes/class.ilContainerStartObjects.php');
998  $start = new ilContainerStartObjects($this->getRefId(),$this->getId());
999  $start->cloneDependencies($a_target_id,$a_copy_id);
1000 
1001  // Clone course item settings
1002  include_once('Services/Object/classes/class.ilObjectActivation.php');
1003  ilObjectActivation::cloneDependencies($this->getRefId(),$a_target_id,$a_copy_id);
1004 
1005  // clone objective settings
1006  include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
1007  ilLOSettings::cloneSettings($a_copy_id, $this->getId(), ilObject::_lookupObjId($a_target_id));
1008 
1009  // Clone course learning objectives
1010  include_once('Modules/Course/classes/class.ilCourseObjective.php');
1011  $crs_objective = new ilCourseObjective($this);
1012  $crs_objective->ilClone($a_target_id,$a_copy_id);
1013 
1014  return true;
1015  }
static cloneSettings($a_copy_id, $a_container_id, $a_new_container_id)
Clone settings.
getId()
get object id public
class ilcourseobjective
static _lookupObjId($a_id)
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ cloneObject()

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

Clone course (no member data)

public

Parameters
inttarget ref_id
intcopy id

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

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

928  {
929  global $ilDB,$ilUser;
930 
931  $new_obj = parent::cloneObject($a_target_id,$a_copy_id, $a_omit_tree);
932 
933  $this->cloneAutoGeneratedRoles($new_obj);
934  $this->cloneMetaData($new_obj);
935 
936  // Assign admin
937  $new_obj->getMemberObject()->add($ilUser->getId(),IL_CRS_ADMIN);
938  // cognos-blu-patch: begin
939  $new_obj->getMemberObject()->updateContact($ilUser->getId(), 1);
940  // cognos-blu-patch: end
941 
942 
943  // #14596
944  $cwo = ilCopyWizardOptions::_getInstance($a_copy_id);
945  if($cwo->isRootNode($this->getRefId()))
946  {
947  $this->setOfflineStatus(true);
948  }
949 
950  // Copy settings
951  $this->cloneSettings($new_obj);
952 
953  // Course Defined Fields
954  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
955  ilCourseDefinedFieldDefinition::_clone($this->getId(),$new_obj->getId());
956 
957  // Clone course files
958  include_once('Modules/Course/classes/class.ilCourseFile.php');
959  ilCourseFile::_cloneFiles($this->getId(),$new_obj->getId());
960 
961  // Copy learning progress settings
962  include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
963  $obj_settings = new ilLPObjSettings($this->getId());
964  $obj_settings->cloneSettings($new_obj->getId());
965  unset($obj_settings);
966 
967  // clone icons
968  global $ilLog;
969  $ilLog->write(__METHOD__.': '.$this->getBigIconPath().' '.$this->getSmallIconPath());
970  $new_obj->saveIcons($this->getBigIconPath(),
971  $this->getSmallIconPath(),
972  $this->getTinyIconPath());
973 
974  // clone certificate (#11085)
975  include_once "./Services/Certificate/classes/class.ilCertificate.php";
976  include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
977  $cert = new ilCertificate(new ilCourseCertificateAdapter($this));
978  $newcert = new ilCertificate(new ilCourseCertificateAdapter($new_obj));
979  $cert->cloneCertificate($newcert);
980 
981  return $new_obj;
982  }
getBigIconPath()
Get path for big icon.
setOfflineStatus($a_value)
getTinyIconPath()
Get path for tiny icon.
static _clone($a_source_id, $a_target_id)
Clone fields.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
getId()
get object id public
$ilUser
Definition: imgupload.php:18
cloneMetaData($target_obj)
Copy meta data.
const IL_CRS_ADMIN
Base class for course and group participants.
cloneSettings($new_obj)
Clone entries in settings table.
getSmallIconPath()
Get path for small icon.
cloneAutoGeneratedRoles($new_obj)
Clone automatic genrated roles (permissions and template permissions)
global $ilDB
Create PDF certificates.
static _cloneFiles($a_source_id, $a_target_id)
Clone course files.
+ Here is the call graph for this function:

◆ cloneSettings()

ilObjCourse::cloneSettings (   $new_obj)

Clone entries in settings table.

public

Parameters
ilObjCoursenew course object

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

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

Referenced by cloneObject().

1315  {
1316  $new_obj->setSyllabus($this->getSyllabus());
1317  $new_obj->setContactName($this->getContactName());
1318  $new_obj->setContactResponsibility($this->getContactResponsibility());
1319  $new_obj->setContactPhone($this->getContactPhone());
1320  $new_obj->setContactEmail($this->getContactEmail());
1321  $new_obj->setContactConsultation($this->getContactConsultation());
1322  $new_obj->setOfflineStatus($this->getOfflineStatus()); // #9914
1323  $new_obj->setActivationType($this->getActivationType());
1324  $new_obj->setActivationStart($this->getActivationStart());
1325  $new_obj->setActivationEnd($this->getActivationEnd());
1326  $new_obj->setActivationVisibility($this->getActivationVisibility());
1327  $new_obj->setSubscriptionLimitationType($this->getSubscriptionLimitationType());
1328  $new_obj->setSubscriptionStart($this->getSubscriptionStart());
1329  $new_obj->setSubscriptionEnd($this->getSubscriptionEnd());
1330  $new_obj->setSubscriptionType($this->getSubscriptionType());
1331  $new_obj->setSubscriptionPassword($this->getSubscriptionPassword());
1332  $new_obj->enableSubscriptionMembershipLimitation($this->isSubscriptionMembershipLimited());
1333  $new_obj->setSubscriptionMaxMembers($this->getSubscriptionMaxMembers());
1334  $new_obj->setSubscriptionNotify($this->getSubscriptionNotify());
1335  $new_obj->setViewMode($this->getViewMode());
1336  $new_obj->setOrderType($this->getOrderType());
1337  $new_obj->setAboStatus($this->getAboStatus());
1338  $new_obj->enableWaitingList($this->enabledWaitingList());
1339  $new_obj->setImportantInformation($this->getImportantInformation());
1340  $new_obj->setShowMembers($this->getShowMembers());
1341  $new_obj->enableSessionLimit($this->isSessionLimitEnabled());
1342  $new_obj->setNumberOfPreviousSessions($this->getNumberOfPreviousSessions());
1343  $new_obj->setNumberOfNextSessions($this->getNumberOfNextSessions());
1344  $new_obj->setAutoNotification( $this->getAutoNotification() );
1345  $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
1346  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1347  $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1348  $new_obj->setStatusDetermination($this->getStatusDetermination());
1349  $new_obj->setMailToMembersType($this->getMailToMembersType());
1350  $new_obj->setCourseStart($this->getCourseStart());
1351  $new_obj->setCourseEnd($this->getCourseEnd());
1352  $new_obj->setCancellationEnd($this->getCancellationEnd());
1353  $new_obj->setWaitingListAutoFill($this->hasWaitingListAutoFill());
1354  $new_obj->setSubscriptionMinMembers($this->getSubscriptionMinMembers());
1355 
1356  // #10271
1357  $new_obj->setEnableCourseMap($this->getEnableCourseMap());
1358  $new_obj->setLatitude($this->getLatitude());
1359  $new_obj->setLongitude($this->getLongitude());
1360  $new_obj->setLocationZoom($this->getLocationZoom());
1361 
1362  $new_obj->update();
1363  }
getMailToMembersType()
Get mail to members type.
getLongitude()
Get Longitude.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getStatusDetermination()
Get status determination mode.
getLocationZoom()
Get LocationZoom.
getNumberOfNextSessions()
Set number of previous sessions.
getAutoNotification()
Returns automatic notification status from $this->auto_notification.
getLatitude()
Get Latitude.
isSubscriptionMembershipLimited()
is membership limited
static generateCode()
Generate new registration key.
getNumberOfPreviousSessions()
Set number of previous sessions.
getEnableCourseMap()
Get Enable Course Map.
+ 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 756 of file class.ilObjCourse.php.

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

757  {
758  global $ilAppEventHandler;
759 
760  parent::create($a_upload);
761 
762  if(!$a_upload)
763  {
764  $this->createMetaData();
765  }
766  $this->__createDefaultSettings();
767 
768  $ilAppEventHandler->raise('Modules/Course',
769  'create',
770  array('object' => $this,
771  'obj_id' => $this->getId(),
772  'appointments' => $this->prepareAppointments('create')));
773 
774  }
createMetaData()
create meta data entry
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ delete()

ilObjCourse::delete ( )

delete course and all related data

public

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

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

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

1161  {
1162  global $ilAppEventHandler;
1163 
1164  // always call parent delete function first!!
1165  if (!parent::delete())
1166  {
1167  return false;
1168  }
1169 
1170  // delete meta data
1171  $this->deleteMetaData();
1172 
1173  // put here course specific stuff
1174 
1175  $this->__deleteSettings();
1176 
1177  include_once('Modules/Course/classes/class.ilCourseParticipants.php');
1179 
1180  include_once './Modules/Course/classes/class.ilCourseObjective.php';
1182 
1183  include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
1185 
1186  include_once './Modules/Course/classes/class.ilCourseFile.php';
1188 
1189  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1191 
1192  $ilAppEventHandler->raise('Modules/Course',
1193  'delete',
1194  array('object' => $this,
1195  'obj_id' => $this->getId(),
1196  'appointments' => $this->prepareAppointments('delete')));
1197 
1198 
1199  return true;
1200  }
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
static _deleteByContainer($a_container_id)
Delete all fields of a container.
static _deleteAll($a_course_id)
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
Create styles array
The data for the language used.
static _deleteByCourse($a_course_id)
static _deleteAll($course_id)
deleteMetaData()
delete meta data entry
+ Here is the call graph for this function:

◆ enabledObjectiveView()

ilObjCourse::enabledObjectiveView ( )

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

References IL_CRS_VIEW_OBJECTIVE.

Referenced by getOrderType().

331  {
332  return $this->view_mode == IL_CRS_VIEW_OBJECTIVE;
333  }
const IL_CRS_VIEW_OBJECTIVE
+ Here is the caller graph for this function:

◆ enabledWaitingList()

ilObjCourse::enabledWaitingList ( )

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

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

336  {
337  return (bool) $this->waiting_list;
338  }
+ 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 172 of file class.ilObjCourse.php.

Referenced by __readSettings().

173  {
174  $this->reg_access_code_enabled = $a_status;
175  }
+ 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 363 of file class.ilObjCourse.php.

Referenced by __readSettings().

364  {
365  $this->session_limit = $a_status;
366  }
+ Here is the caller graph for this function:

◆ enableSubscriptionMembershipLimitation()

ilObjCourse::enableSubscriptionMembershipLimitation (   $a_status)

enable max members

public

Parameters
boolstatus
Returns

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

Referenced by __readSettings().

381  {
382  $this->subscription_membership_limitation = $a_status;
383  }
+ Here is the caller graph for this function:

◆ enableWaitingList()

ilObjCourse::enableWaitingList (   $a_status)

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

Referenced by __readSettings().

341  {
342  $this->waiting_list = (bool) $a_status;
343  }
+ Here is the caller graph for this function:

◆ findCoursesWithNotEnoughMembers()

static ilObjCourse::findCoursesWithNotEnoughMembers ( )
static

Minimum members check type $ilDB.

Returns
array

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

References $GLOBALS, $ilDB, $res, $row, ilObject\_getAllReferences(), array, and time.

Referenced by ilMembershipCronMinMembers\getCourses().

2233  {
2234  $ilDB = $GLOBALS['DIC']->database();
2235  $tree = $GLOBALS['DIC']->repositoryTree();
2236 
2237  $res = array();
2238 
2239  $now = time();
2240 
2241  include_once "Modules/Course/classes/class.ilCourseParticipants.php";
2242 
2243  $set = $ilDB->query("SELECT obj_id, min_members".
2244  " FROM crs_settings".
2245  " WHERE min_members > ".$ilDB->quote(0, "integer").
2246  " AND sub_mem_limit = ".$ilDB->quote(1, "integer"). // #17206
2247  " AND ((leave_end IS NOT NULL".
2248  " AND leave_end < ".$ilDB->quote($now, "text").")".
2249  " OR (leave_end IS NULL".
2250  " AND sub_end IS NOT NULL".
2251  " AND sub_end < ".$ilDB->quote($now, "text")."))".
2252  " AND (crs_start IS NULL OR crs_start > ".$ilDB->quote($now, "integer").")");
2253  while($row = $ilDB->fetchAssoc($set))
2254  {
2255  $refs = ilObject::_getAllReferences($row['obj_id']);
2256  $ref = end($refs);
2257 
2258  if($tree->isDeleted($ref))
2259  {
2260  continue;
2261  }
2262 
2263  $part = new ilCourseParticipants($row["obj_id"]);
2264  $reci = $part->getNotificationRecipients();
2265  if(sizeof($reci))
2266  {
2267  $missing = (int)$row["min_members"]-$part->getCountMembers();
2268  if($missing > 0)
2269  {
2270  $res[$row["obj_id"]] = array($missing, $reci);
2271  }
2272  }
2273  }
2274 
2275  return $res;
2276  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getAllReferences($a_id)
get all reference ids of object
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAboStatus()

ilObjCourse::getAboStatus ( )

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

Referenced by cloneSettings(), and updateSettings().

648  {
649  return $this->abo;
650  }
+ Here is the caller graph for this function:

◆ getActivationEnd()

ilObjCourse::getActivationEnd ( )

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

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

261  {
262  return $this->activation_end;
263  }
+ Here is the caller graph for this function:

◆ getActivationStart()

ilObjCourse::getActivationStart ( )

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

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

253  {
254  return $this->activation_start;
255  }
+ Here is the caller graph for this function:

◆ getActivationType()

ilObjCourse::getActivationType ( )

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

Referenced by cloneSettings(), and validate().

234  {
235  return (int) $this->activation_type;
236  }
+ Here is the caller graph for this function:

◆ getActivationUnlimitedStatus()

ilObjCourse::getActivationUnlimitedStatus ( )

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

References IL_CRS_ACTIVATION_UNLIMITED.

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

249  {
250  return $this->activation_type == IL_CRS_ACTIVATION_UNLIMITED;
251  }
const IL_CRS_ACTIVATION_UNLIMITED
+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjCourse::getActivationVisibility ( )

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

Referenced by cloneSettings(), and updateSettings().

281  {
282  return $this->activation_visibility;
283  }
+ Here is the caller graph for this function:

◆ getArchiveEnd()

ilObjCourse::getArchiveEnd ( )

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

References date, and time.

628  {
629  return $this->archive_end ? $this->archive_end : mktime(0,0,0,12,12,date("Y",time())+2);
630  }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

◆ getArchiveStart()

ilObjCourse::getArchiveStart ( )

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

References time.

620  {
621  return $this->archive_start ? $this->archive_start : time();
622  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

◆ getArchiveType()

ilObjCourse::getArchiveType ( )

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

References IL_CRS_ARCHIVE_DOWNLOAD, and IL_CRS_ARCHIVE_NONE.

636  {
637  return $this->archive_type ? IL_CRS_ARCHIVE_DOWNLOAD : IL_CRS_ARCHIVE_NONE;
638  }
const IL_CRS_ARCHIVE_NONE
const IL_CRS_ARCHIVE_DOWNLOAD

◆ getAutoNotification()

ilObjCourse::getAutoNotification ( )

Returns automatic notification status from $this->auto_notification.

Returns
boolean

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

References $auto_notification.

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

2055  {
2056  return $this->auto_notification;
2057  }
+ Here is the caller graph for this function:

◆ getCancellationEnd()

ilObjCourse::getCancellationEnd ( )

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

References $leave_end.

Referenced by cloneSettings(), and updateSettings().

891  {
892  return $this->leave_end;
893  }
+ Here is the caller graph for this function:

◆ getContactConsultation()

ilObjCourse::getContactConsultation ( )

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

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

202  {
203  return $this->contact_consultation;
204  }
+ Here is the caller graph for this function:

◆ getContactEmail()

ilObjCourse::getContactEmail ( )

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

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

218  {
219  return $this->contact_email;
220  }
+ Here is the caller graph for this function:

◆ getContactName()

ilObjCourse::getContactName ( )

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

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

194  {
195  return $this->contact_name;
196  }
+ Here is the caller graph for this function:

◆ getContactPhone()

ilObjCourse::getContactPhone ( )

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

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

210  {
211  return $this->contact_phone;
212  }
+ Here is the caller graph for this function:

◆ getContactResponsibility()

ilObjCourse::getContactResponsibility ( )

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

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

226  {
227  return $this->contact_responsibility;
228  }
+ Here is the caller graph for this function:

◆ getCourseEnd()

ilObjCourse::getCourseEnd ( )

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

References $crs_end.

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

881  {
882  return $this->crs_end;
883  }
+ Here is the caller graph for this function:

◆ getCourseStart()

ilObjCourse::getCourseStart ( )

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

References $crs_start.

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

871  {
872  return $this->crs_start;
873  }
+ Here is the caller graph for this function:

◆ getDefaultAdminRole()

ilObjCourse::getDefaultAdminRole ( )

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

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

Referenced by cloneAutoGeneratedRoles().

1797  {
1798  $local_roles = $this->__getLocalRoles();
1799 
1800  foreach($local_roles as $role_id)
1801  {
1802  if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
1803  {
1804  if(!strcmp($tmp_role->getTitle(),"il_crs_admin_".$this->getRefId()))
1805  {
1806  return $role_id;
1807  }
1808  }
1809  }
1810  return false;
1811  }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ 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 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 1703 of file class.ilObjCourse.php.

References ilObject\getRefId().

1704  {
1705  global $rbacadmin, $rbacreview;
1706 
1707  if (strlen($a_crs_id) > 0)
1708  {
1709  $crs_id = $a_crs_id;
1710  }
1711  else
1712  {
1713  $crs_id = $this->getRefId();
1714  }
1715 
1716  $role_arr = $rbacreview->getRolesOfRoleFolder($crs_id);
1717 
1718  foreach ($role_arr as $role_id)
1719  {
1720  $role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
1721 
1722  $crs_Member ="il_crs_member_".$crs_id;
1723  $crs_Admin ="il_crs_admin_".$crs_id;
1724  $crs_Tutor ="il_crs_tutor_".$crs_id;
1725 
1726  if (strcmp($role_Obj->getTitle(), $crs_Member) == 0 )
1727  {
1728  $arr_crsDefaultRoles["crs_member_role"] = $role_Obj->getId();
1729  }
1730 
1731  if (strcmp($role_Obj->getTitle(), $crs_Admin) == 0)
1732  {
1733  $arr_crsDefaultRoles["crs_admin_role"] = $role_Obj->getId();
1734  }
1735 
1736  if (strcmp($role_Obj->getTitle(), $crs_Tutor) == 0)
1737  {
1738  $arr_crsDefaultRoles["crs_tutor_role"] = $role_Obj->getId();
1739  }
1740  }
1741 
1742  return $arr_crsDefaultRoles;
1743  }
redirection script todo: (a better solution should control the processing via a xml file) ...
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ getDefaultMemberRole()

ilObjCourse::getDefaultMemberRole ( )

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

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

Referenced by cloneAutoGeneratedRoles().

1767  {
1768  $local_roles = $this->__getLocalRoles();
1769 
1770  foreach($local_roles as $role_id)
1771  {
1772  $title = ilObject::_lookupTitle($role_id);
1773  if(substr($title,0,8) == 'il_crs_m')
1774  {
1775  return $role_id;
1776  }
1777  }
1778  return 0;
1779  }
static _lookupTitle($a_id)
lookup object title
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultTutorRole()

ilObjCourse::getDefaultTutorRole ( )

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

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

Referenced by cloneAutoGeneratedRoles().

1781  {
1782  $local_roles = $this->__getLocalRoles();
1783 
1784  foreach($local_roles as $role_id)
1785  {
1786  if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
1787  {
1788  if(!strcmp($tmp_role->getTitle(),"il_crs_tutor_".$this->getRefId()))
1789  {
1790  return $role_id;
1791  }
1792  }
1793  }
1794  return false;
1795  }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEnableCourseMap()

ilObjCourse::getEnableCourseMap ( )

Get Enable Course Map.

Returns
boolean Enable Course Map

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

References $enablemap.

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

861  {
862  return $this->enablemap;
863  }
+ Here is the caller graph for this function:

◆ getEnableMap()

ilObjCourse::getEnableMap ( )

Type independent wrapper.

Returns
type

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

References getEnableCourseMap().

851  {
852  return $this->getEnableCourseMap();
853  }
getEnableCourseMap()
Get Enable Course Map.
+ Here is the call graph for this function:

◆ getImportantInformation()

ilObjCourse::getImportantInformation ( )

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

Referenced by cloneSettings(), and updateSettings().

178  {
179  return $this->important;
180  }
+ Here is the caller graph for this function:

◆ getLatitude()

ilObjCourse::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

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

792  {
793  return $this->latitude;
794  }
+ 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 public

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

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

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

1662  {
1663  global $rbacadmin,$rbacreview;
1664 
1665  if (empty($this->local_roles))
1666  {
1667  $this->local_roles = array();
1668  $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1669 
1670  foreach ($role_arr as $role_id)
1671  {
1672  if ($rbacreview->isAssignable($role_id,$this->getRefId()) == true)
1673  {
1674  $role_Obj = $this->ilias->obj_factory->getInstanceByObjId($role_id);
1675 
1676  if ($a_translate)
1677  {
1678  $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1679  }
1680  else
1681  {
1682  $role_name = $role_Obj->getTitle();
1683  }
1684  $this->local_roles[$role_name] = $role_Obj->getId();
1685  }
1686  }
1687  }
1688 
1689  return $this->local_roles;
1690  }
redirection script todo: (a better solution should control the processing via a xml file) ...
static _getTranslation($a_role_title)
Create styles array
The data for the language used.
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ getLocationZoom()

ilObjCourse::getLocationZoom ( )

Get LocationZoom.

Returns
int LocationZoom

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

References $locationzoom.

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

832  {
833  return $this->locationzoom;
834  }
+ Here is the caller graph for this function:

◆ getLongitude()

ilObjCourse::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

References $longitude.

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

812  {
813  return $this->longitude;
814  }
+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjCourse::getMailToMembersType ( )

Get mail to members type.

Returns
int

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

References $mail_members.

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

675  {
676  return $this->mail_members;
677  }
+ Here is the caller graph for this function:

◆ getMemberObject()

ilObjCourse::getMemberObject ( )

Get course member object.

Returns
ilCourseParticipant

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

References $member_obj, and initCourseMemberObject().

1547  {
1548  if(!$this->member_obj instanceof ilCourseParticipant)
1549  {
1550  $this->initCourseMemberObject();
1551  }
1552  return $this->member_obj;
1553  }
initCourseMemberObject()
Init course member object ilObjUser $ilUser.
+ Here is the call graph for this function:

◆ getMembersObject()

ilObjCourse::getMembersObject ( )
Returns
ilCourseParticipants

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

References $members_obj, and initCourseMembersObject().

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

1559  {
1560  if(!$this->members_obj instanceof ilCourseParticipants)
1561  {
1562  $this->initCourseMembersObject();
1563  }
1564  return $this->members_obj;
1565  }
initCourseMembersObject()
Init course member object ilObjUser $ilUser.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessage()

ilObjCourse::getMessage ( )

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

Referenced by appendMessage(), and validate().

680  {
681  return $this->message;
682  }
+ Here is the caller graph for this function:

◆ getNumberOfNextSessions()

ilObjCourse::getNumberOfNextSessions ( )

Set number of previous sessions.

Returns

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

References $session_next.

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

419  {
420  return $this->session_next;
421  }
+ Here is the caller graph for this function:

◆ getNumberOfPreviousSessions()

ilObjCourse::getNumberOfPreviousSessions ( )

Set number of previous sessions.

Returns

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

References $session_prev.

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

400  {
401  return $this->session_prev;
402  }
+ Here is the caller graph for this function:

◆ getOfflineStatus()

ilObjCourse::getOfflineStatus ( )

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

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

269  {
270  return (bool)$this->activation_offline;
271  }
+ Here is the caller graph for this function:

◆ getOrderType()

ilObjCourse::getOrderType ( )

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

References enabledObjectiveView(), and ilContainer\SORT_MANUAL.

Referenced by cloneSettings(), and update().

2138  {
2139  if($this->enabledObjectiveView())
2140  {
2141  return ilContainer::SORT_MANUAL;
2142  }
2143  return parent::getOrderType();
2144  }
+ 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 143 of file class.ilObjCourse.php.

References $reg_access_code.

Referenced by __createDefaultSettings(), and updateSettings().

144  {
145  return $this->reg_access_code;
146  }
+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjCourse::getShowMembers ( )

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

Referenced by cloneSettings(), and updateSettings().

656  {
657  return $this->show_members;
658  }
+ Here is the caller graph for this function:

◆ getStatusDetermination()

ilObjCourse::getStatusDetermination ( )

Get status determination mode.

Returns
int

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

References $status_dt.

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

2099  {
2100  return $this->status_dt;
2101  }
+ Here is the caller graph for this function:

◆ getSubItems()

ilObjCourse::getSubItems (   $a_admin_panel_enabled = false,
  $a_include_side_block = false,
  $a_get_single = 0 
)

Get subitems of container.

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

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

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

469  {
470  global $ilUser;
471 
472  // Caching
473  if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]))
474  {
475  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
476  }
477 
478  // Results are stored in $this->items
479  parent::getSubItems($a_admin_panel_enabled,$a_include_side_block, $a_get_single);
480 
481  $limit_sess = false;
482  if(!$a_admin_panel_enabled &&
483  !$a_include_side_block &&
484  $this->items['sess'] &&
485  is_array($this->items['sess']) &&
486  $this->isSessionLimitEnabled() &&
487  $this->getViewMode() == ilContainer::VIEW_SESSIONS) // #16686
488  {
489  $limit_sess = true;
490  }
491 
492  if(!$limit_sess)
493  {
494  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
495  }
496 
497 
498  // do session limit
499 
500  // @todo move to gui class
501  if(isset($_GET['crs_prev_sess']))
502  {
503  $ilUser->writePref('crs_sess_show_prev_'.$this->getId(), (string) (int) $_GET['crs_prev_sess']);
504  }
505  if(isset($_GET['crs_next_sess']))
506  {
507  $ilUser->writePref('crs_sess_show_next_'.$this->getId(), (string) (int) $_GET['crs_next_sess']);
508  }
509 
510  $sessions = ilUtil::sortArray($this->items['sess'],'start','ASC',true,false);
511  $today = new ilDate(date('Ymd',time()),IL_CAL_DATE);
512  $previous = $current = $next = array();
513  foreach($sessions as $key => $item)
514  {
515  $start = new ilDateTime($item['start'],IL_CAL_UNIX);
516  $end = new ilDateTime($item['end'],IL_CAL_UNIX);
517 
518  if(ilDateTime::_within($today, $start, $end, IL_CAL_DAY))
519  {
520  $current[] = $item;
521  }
522  elseif(ilDateTime::_before($start, $today, IL_CAL_DAY))
523  {
524  $previous[] = $item;
525  }
526  elseif(ilDateTime::_after($start, $today, IL_CAL_DAY))
527  {
528  $next[] = $item;
529  }
530  }
531  $num_previous_remove = max(
532  count($previous) - $this->getNumberOfPreviousSessions(),
533  0
534  );
535  while($num_previous_remove--)
536  {
537  if(!$ilUser->getPref('crs_sess_show_prev_'.$this->getId()))
538  {
539  array_shift($previous);
540  }
541  $this->items['sess_link']['prev']['value'] = 1;
542  }
543 
544  $num_next_remove = max(
545  count($next) - $this->getNumberOfNextSessions(),
546  0
547  );
548  while($num_next_remove--)
549  {
550  if(!$ilUser->getPref('crs_sess_show_next_'.$this->getId()))
551  {
552  array_pop($next);
553  }
554  // @fixme
555  $this->items['sess_link']['next']['value'] = 1;
556  }
557 
558  $sessions = array_merge($previous,$current,$next);
559  $this->items['sess'] = $sessions;
560 
561  // #15389 - see ilContainer::getSubItems()
562  include_once('Services/Container/classes/class.ilContainerSorting.php');
563  $sort = ilContainerSorting::_getInstance($this->getId());
564  $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block] = $sort->sortItems($this->items);
565 
566  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
567  }
$_GET["client_id"]
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 _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.
const IL_CAL_UNIX
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
const IL_CAL_DAY
Class for single dates.
getId()
get object id public
getNumberOfNextSessions()
Set number of previous sessions.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Date and time handling
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
const IL_CAL_DATE
getNumberOfPreviousSessions()
Set number of previous sessions.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static _getInstance($a_obj_id)
get instance by obj_id
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.
+ Here is the call graph for this function:

◆ getSubscriptionEnd()

ilObjCourse::getSubscriptionEnd ( )

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

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

306  {
307  return $this->subscription_end;
308  }
+ Here is the caller graph for this function:

◆ getSubscriptionLimitationType()

ilObjCourse::getSubscriptionLimitationType ( )

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

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

286  {
287  return $this->subscription_limitation_type;
288  }
+ Here is the caller graph for this function:

◆ getSubscriptionMaxMembers()

ilObjCourse::getSubscriptionMaxMembers ( )

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

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

435  {
436  return $this->subscription_max_members;
437  }
+ Here is the caller graph for this function:

◆ getSubscriptionMinMembers()

ilObjCourse::getSubscriptionMinMembers ( )

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

References $min_members.

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

905  {
906  return $this->min_members;
907  }
+ Here is the caller graph for this function:

◆ getSubscriptionNotify()

ilObjCourse::getSubscriptionNotify ( )

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

Referenced by cloneSettings(), and updateSettings().

570  {
571  return true;
572  return $this->subscription_notify ? true : false;
573  }
+ Here is the caller graph for this function:

◆ getSubscriptionPassword()

ilObjCourse::getSubscriptionPassword ( )

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

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

323  {
324  return $this->subscription_password;
325  }
+ Here is the caller graph for this function:

◆ getSubscriptionStart()

ilObjCourse::getSubscriptionStart ( )

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

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

298  {
299  return $this->subscription_start;
300  }
+ Here is the caller graph for this function:

◆ getSubscriptionType()

ilObjCourse::getSubscriptionType ( )

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

References IL_CRS_SUBSCRIPTION_DIRECT.

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

314  {
315  return $this->subscription_type ? $this->subscription_type : IL_CRS_SUBSCRIPTION_DIRECT;
316  #return $this->subscription_type ? $this->subscription_type : $this->SUBSCRIPTION_DEACTIVATED;
317  }
const IL_CRS_SUBSCRIPTION_DIRECT
+ Here is the caller graph for this function:

◆ getSubscriptionUnlimitedStatus()

ilObjCourse::getSubscriptionUnlimitedStatus ( )

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

References IL_CRS_SUBSCRIPTION_UNLIMITED.

Referenced by inSubscriptionTime().

294  {
295  return $this->subscription_limitation_type == IL_CRS_SUBSCRIPTION_UNLIMITED;
296  }
const IL_CRS_SUBSCRIPTION_UNLIMITED
+ Here is the caller graph for this function:

◆ getSyllabus()

ilObjCourse::getSyllabus ( )

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

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

186  {
187  return $this->syllabus;
188  }
+ Here is the caller graph for this function:

◆ getViewMode()

ilObjCourse::getViewMode ( )

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

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

584  {
585  return $this->view_mode;
586  }
+ Here is the caller graph for this function:

◆ handleAutoFill()

ilObjCourse::handleAutoFill ( )

Handle course auto fill.

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

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

2150  {
2151  if(
2152  !$this->enabledWaitingList() or
2153  !$this->hasWaitingListAutoFill()
2154  )
2155  {
2156  $this->course_logger->debug('Waiting list or auto fill disabled.');
2157  return;
2158  }
2159 
2160  $max = $this->getSubscriptionMaxMembers();
2162 
2163  $this->course_logger->debug('Max members: ' . $max);
2164  $this->course_logger->debug('Current members: ' . $now);
2165 
2166  if($max <= $now)
2167  {
2168  return;
2169  }
2170 
2171  // see assignFromWaitingListObject()
2172  include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
2173  $waiting_list = new ilCourseWaitingList($this->getId());
2174 
2175  foreach($waiting_list->getUserIds() as $user_id)
2176  {
2177  if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
2178  {
2179  $this->course_logger->warning('Cannot create user instance for id: ' . $user_id);
2180  continue;
2181  }
2182  if($this->getMembersObject()->isAssigned($user_id))
2183  {
2184  $this->course_logger->warning('User is already assigned to course. uid: ' . $user_id. ' course_id: ' . $this->getRefId());
2185  continue;
2186  }
2187  $this->getMembersObject()->add($user_id,IL_CRS_MEMBER);
2188  $this->getMembersObject()->sendNotification($this->getMembersObject()->NOTIFY_ACCEPT_USER,$user_id,true);
2189  $waiting_list->removeFromList($user_id);
2190  $this->checkLPStatusSync($user_id);
2191 
2192  $this->course_logger->info('Assigned user from waiting list to course: ' . $this->getTitle());
2193  $now++;
2194  if($now >= $max)
2195  {
2196  break;
2197  }
2198  }
2199  }
static lookupNumberOfMembers($a_ref_id)
Lookup number of members ilRbacReview $rbacreview <type> $ilObjDataCache.
const IL_CRS_MEMBER
getId()
get object id public
getTitle()
get object title public
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkLPStatusSync($a_member_id)
sync course status from lp
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ hasContactData()

ilObjCourse::hasContactData ( )

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

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

1145  {
1146  return strlen($this->getContactName()) or
1147  strlen($this->getContactResponsibility()) or
1148  strlen($this->getContactEmail()) or
1149  strlen($this->getContactPhone()) or
1150  strlen($this->getContactConsultation());
1151  }
+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjCourse::hasWaitingListAutoFill ( )

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

References $auto_fill_from_waiting.

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

915  {
916  return (bool)$this->auto_fill_from_waiting;
917  }
+ Here is the caller graph for this function:

◆ initCourseMemberObject()

ilObjCourse::initCourseMemberObject ( )
protected

Init course member object ilObjUser $ilUser.

Returns
<type>

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

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

Referenced by getMemberObject().

1520  {
1521  global $ilUser;
1522 
1523  include_once "./Modules/Course/classes/class.ilCourseParticipant.php";
1524  $this->member_obj = ilCourseParticipant::_getInstanceByObjId($this->getId(),$ilUser->getId());
1525  return true;
1526  }
getId()
get object id public
$ilUser
Definition: imgupload.php:18
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCourseMembersObject()

ilObjCourse::initCourseMembersObject ( )
protected

Init course member object ilObjUser $ilUser.

Returns
<type>

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

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

Referenced by getMembersObject().

1534  {
1535  global $ilUser;
1536 
1537  include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
1538  $this->members_obj = ilCourseParticipants::_getInstanceByObjId($this->getId());
1539  return true;
1540  }
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
getId()
get object id public
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initDefaultRoles()

ilObjCourse::initDefaultRoles ( )

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

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

1571  {
1572  global $rbacadmin,$rbacreview,$ilDB;
1573 
1574  include_once './Services/AccessControl/classes/class.ilObjRole.php';
1576  'il_crs_admin_'.$this->getRefId(),
1577  "Admin of crs obj_no.".$this->getId(),
1578  'il_crs_admin',
1579  $this->getRefId()
1580  );
1582  'il_crs_tutor_'.$this->getRefId(),
1583  "Tutor of crs obj_no.".$this->getId(),
1584  'il_crs_tutor',
1585  $this->getRefId()
1586  );
1588  'il_crs_member_'.$this->getRefId(),
1589  "Member of crs obj_no.".$this->getId(),
1590  'il_crs_member',
1591  $this->getRefId()
1592  );
1593 
1594  return array();
1595  }
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
getId()
get object id public
Create styles array
The data for the language used.
global $ilDB
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ initWaitingList()

ilObjCourse::initWaitingList ( )

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

References ilObject\getId().

1503  {
1504  include_once "./Modules/Course/classes/class.ilCourseWaitingList.php";
1505 
1506  if(!is_object($this->waiting_list_obj))
1507  {
1508  $this->waiting_list_obj = new ilCourseWaitingList($this->getId());
1509  }
1510  return true;
1511  }
getId()
get object id public
+ Here is the call graph for this function:

◆ inSubscriptionTime()

ilObjCourse::inSubscriptionTime ( )

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

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

Referenced by register().

346  {
347  if($this->getSubscriptionUnlimitedStatus())
348  {
349  return true;
350  }
351  if(time() > $this->getSubscriptionStart() and time() < $this->getSubscriptionEnd())
352  {
353  return true;
354  }
355  return false;
356  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActivated()

ilObjCourse::isActivated ( )

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

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

697  {
698  if($this->getOfflineStatus())
699  {
700  return false;
701  }
702  if($this->getActivationUnlimitedStatus())
703  {
704  return true;
705  }
706  if(time() < $this->getActivationStart() or
707  time() > $this->getActivationEnd())
708  {
709  return false;
710  }
711  return true;
712  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ isRegistrationAccessCodeEnabled()

ilObjCourse::isRegistrationAccessCodeEnabled ( )

Check if access code is enabled.

Returns

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

References $reg_access_code_enabled.

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

163  {
164  return (bool) $this->reg_access_code_enabled;
165  }
+ Here is the caller graph for this function:

◆ isSessionLimitEnabled()

ilObjCourse::isSessionLimitEnabled ( )

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

References $session_limit.

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

369  {
370  return (bool) $this->session_limit;
371  }
+ Here is the caller graph for this function:

◆ isSubscriptionMembershipLimited()

ilObjCourse::isSubscriptionMembershipLimited ( )

is membership limited

public

Parameters

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

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

430  {
431  return (bool) $this->subscription_membership_limitation;
432  }
+ Here is the caller graph for this function:

◆ lookupCourseNonMemberTemplatesId()

static ilObjCourse::lookupCourseNonMemberTemplatesId ( )
static

Lookup course non member id.

Returns
int

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

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

Referenced by ilRbacAdmin\adjustMovedObjectPermissions().

1645  {
1646  global $ilDB;
1647 
1648  $query = 'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote('rolt','text').' AND title = '.$ilDB->quote('il_crs_non_member','text');
1649  $res = $ilDB->query($query);
1651 
1652  return isset($row['obj_id']) ? $row['obj_id'] : 0;
1653  }
global $ilDB
+ 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 1951 of file class.ilObjCourse.php.

References $ilDB, $query, $res, $row, array, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMembershipRegistrationCodeUtils\lookupObjectsByCode().

1952  {
1953  global $ilDB;
1954 
1955  $query = "SELECT obj_id FROM crs_settings ".
1956  "WHERE reg_ac_enabled = ".$ilDB->quote(1,'integer')." ".
1957  "AND reg_ac = ".$ilDB->quote($a_code,'text');
1958  $res = $ilDB->query($query);
1959 
1960  $obj_ids = array();
1961  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
1962  {
1963  $obj_ids[] = $row->obj_id;
1964  }
1965  return $obj_ids;
1966  }
Create styles array
The data for the language used.
global $ilDB
+ 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 127 of file class.ilObjCourse.php.

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

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

128  {
129  $query = 'SELECT show_members FROM crs_settings '.
130  'WHERE obj_id = '.$GLOBALS['ilDB']->quote($a_obj_id,'integer');
131  $res = $GLOBALS['ilDB']->query($query);
132  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
133  {
134  return (bool) $row->show_members;
135  }
136  return false;
137  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ Here is the caller graph for this function:

◆ mayLeave()

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

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

References $ilDB, $ilUser, $row, date, and IL_CAL_DATE.

Referenced by ilObjCourseAccess\_checkAccess().

2202  {
2203  global $ilUser, $ilDB;
2204 
2205  if(!$a_user_id)
2206  {
2207  $a_user_id = $ilUser->getId();
2208  }
2209 
2210  $set = $ilDB->query("SELECT leave_end".
2211  " FROM crs_settings".
2212  " WHERE obj_id = ".$ilDB->quote($a_course_id, "integer"));
2213  $row = $ilDB->fetchAssoc($set);
2214  if($row && $row["leave_end"])
2215  {
2216  // timestamp to date
2217  $limit = date("Ymd", $row["leave_end"]);
2218  if($limit < date("Ymd"))
2219  {
2220  $a_date = new ilDate(date("Y-m-d", $row["leave_end"]), IL_CAL_DATE);
2221  return false;
2222  }
2223  }
2224  return true;
2225  }
Class for single dates.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$ilUser
Definition: imgupload.php:18
const IL_CAL_DATE
global $ilDB
+ Here is the caller graph for this function:

◆ MDUpdateListener()

ilObjCourse::MDUpdateListener (   $a_element)

Overwriten Metadata update listener for ECS functionalities.

public

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

References $ilLog.

1835  {
1836  global $ilLog;
1837 
1838  parent::MDUpdateListener($a_element);
1839 
1840  switch($a_element)
1841  {
1842  case 'General':
1843  // Update ecs content
1844  include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
1845  $ecs = new ilECSCourseSettings($this);
1846  $ecs->handleContentUpdate();
1847  break;
1848 
1849  default:
1850  return true;
1851  }
1852  }
Class ilECSCourseSettings.

◆ prepareAppointments()

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

Prepare calendar appointments.

protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

References array, getActivationEnd(), getActivationStart(), getActivationUnlimitedStatus(), getCourseEnd(), getCourseStart(), 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().

1872  {
1873  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1874  include_once('./Services/Calendar/classes/class.ilDateTime.php');
1875 
1876  switch($a_mode)
1877  {
1878  case 'create':
1879  case 'update':
1880  if(!$this->getActivationUnlimitedStatus() and !$this->getOfflineStatus())
1881  {
1882  $app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_START);
1883  $app->setTitle($this->getTitle());
1884  $app->setSubtitle('crs_cal_activation_start');
1885  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1886  $app->setDescription($this->getLongDescription());
1887  $app->setStart(new ilDateTime($this->getActivationStart(),IL_CAL_UNIX));
1888  $apps[] = $app;
1889 
1890  $app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_END);
1891  $app->setTitle($this->getTitle());
1892  $app->setSubtitle('crs_cal_activation_end');
1893  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1894  $app->setDescription($this->getLongDescription());
1895  $app->setStart(new ilDateTime($this->getActivationEnd(),IL_CAL_UNIX));
1896  $apps[] = $app;
1897  }
1899  {
1900  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1901  $app->setTitle($this->getTitle());
1902  $app->setSubtitle('crs_cal_reg_start');
1903  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1904  $app->setDescription($this->getLongDescription());
1905  $app->setStart(new ilDateTime($this->getSubscriptionStart(),IL_CAL_UNIX));
1906  $apps[] = $app;
1907 
1908  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1909  $app->setTitle($this->getTitle());
1910  $app->setSubtitle('crs_cal_reg_end');
1911  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1912  $app->setDescription($this->getLongDescription());
1913  $app->setStart(new ilDateTime($this->getSubscriptionEnd(),IL_CAL_UNIX));
1914  $apps[] = $app;
1915  }
1916  if($this->getCourseStart() && $this->getCourseEnd())
1917  {
1918  $app = new ilCalendarAppointmentTemplate(self::CAL_COURSE_START);
1919  $app->setTitle($this->getTitle());
1920  $app->setSubtitle('crs_start');
1921  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1922  $app->setDescription($this->getLongDescription());
1923  $app->setStart($this->getCourseStart());
1924  $app->setFullday(true);
1925  $apps[] = $app;
1926 
1927  $app = new ilCalendarAppointmentTemplate(self::CAL_COURSE_END);
1928  $app->setTitle($this->getTitle());
1929  $app->setSubtitle('crs_end');
1930  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1931  $app->setDescription($this->getLongDescription());
1932  $app->setStart($this->getCourseEnd());
1933  $app->setFullday(true);
1934  $apps[] = $app;
1935  }
1936 
1937 
1938  return $apps ? $apps : array();
1939 
1940  case 'delete':
1941  // Nothing to do: The category and all assigned appointments will be deleted.
1942  return array();
1943  }
1944  }
const IL_CRS_SUBSCRIPTION_LIMITED
const IL_CAL_TRANSLATION_SYSTEM
Apointment templates are used for automatic generated apointments.
const IL_CAL_UNIX
getTitle()
get object title public
Date and time handling
Create styles array
The data for the language used.
getLongDescription()
get object long description (stored in object_description)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjCourse::read ( )

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

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

748  {
749  parent::read();
750 
751  include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
753 
754  $this->__readSettings();
755  }
getId()
get object id public
setOrderType($a_value)
static _lookupSortMode($a_obj_id)
lookup sort mode
+ 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 1974 of file class.ilObjCourse.php.

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

1975  {
1976  global $ilCtrl, $tree;
1977  include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1978  include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
1980 
1981  if($part->isAssigned($a_user_id))
1982  {
1983  return true;
1984  }
1985 
1986  if(!$a_force_registration)
1987  {
1988  // Availability
1990  {
1991  include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1992 
1994  {
1995  throw new ilMembershipRegistrationException('Cant registrate to course '.$this->getId().
1996  ', course subscription is deactivated.', ilMembershipRegistrationException::REGISTRATION_CODE_DISABLED);
1997  }
1998  }
1999 
2000  // Time Limitation
2002  {
2003  if( !$this->inSubscriptionTime() )
2004  {
2005  throw new ilMembershipRegistrationException('Cant registrate to course '.$this->getId().
2006  ', course is out of registration time.', ilMembershipRegistrationException::OUT_OF_REGISTRATION_PERIOD);
2007  }
2008  }
2009 
2010  // Max members
2011  if($this->isSubscriptionMembershipLimited())
2012  {
2013  $free = max(0,$this->getSubscriptionMaxMembers() - $part->getCountMembers());
2014  include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
2015  $waiting_list = new ilCourseWaitingList($this->getId());
2016  if($this->enabledWaitingList() and (!$free or $waiting_list->getCountUsers()))
2017  {
2018  $waiting_list->addToList($a_user_id);
2019  $this->lng->loadLanguageModule("crs");
2020  $info = sprintf($this->lng->txt('crs_added_to_list'),
2021  $waiting_list->getPosition($a_user_id));
2022  include_once('./Modules/Course/classes/class.ilCourseParticipants.php');
2023  $participants = ilCourseParticipants::_getInstanceByObjId($this->getId());
2024  $participants->sendNotification($participants->NOTIFY_WAITING_LIST,$a_user_id);
2025 
2027  }
2028 
2029  if(!$this->enabledWaitingList() && !$free)
2030  {
2031  throw new ilMembershipRegistrationException('Cant registrate to course '.$this->getId().
2032  ', membership is limited.',ilMembershipRegistrationException::OBJECT_IS_FULL);
2033  }
2034  }
2035  }
2036 
2037  $part->add($a_user_id,$a_role);
2038  $part->sendNotification($part->NOTIFY_ACCEPT_USER, $a_user_id);
2039  $part->sendNotification($part->NOTIFY_ADMINS,$a_user_id);
2040 
2041 
2042  include_once './Modules/Forum/classes/class.ilForumNotification.php';
2044 
2045  return true;
2046  }
const IL_CRS_SUBSCRIPTION_LIMITED
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static _usingRegistrationCode()
Using Registration code.
global $ilCtrl
Definition: ilias.php:18
$info
Definition: example_052.php:80
getId()
get object id public
isSubscriptionMembershipLimited()
is membership limited
getRefId()
get reference id public
static checkForumsExistsInsert($ref_id, $user_id=0)
const IL_CRS_SUBSCRIPTION_DEACTIVATED
+ Here is the call graph for this function:

◆ setAboStatus()

ilObjCourse::setAboStatus (   $a_status)

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

Referenced by __readSettings().

644  {
645  $this->abo = $a_status;
646  }
+ Here is the caller graph for this function:

◆ setActivationEnd()

ilObjCourse::setActivationEnd (   $a_value)

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

Referenced by __readSettings().

265  {
266  $this->activation_end = $a_value;
267  }
+ Here is the caller graph for this function:

◆ setActivationStart()

ilObjCourse::setActivationStart (   $a_value)

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

Referenced by __readSettings().

257  {
258  $this->activation_start = $a_value;
259  }
+ Here is the caller graph for this function:

◆ setActivationType()

ilObjCourse::setActivationType (   $a_type)

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

References $a_type, IL_CRS_ACTIVATION_OFFLINE, IL_CRS_ACTIVATION_UNLIMITED, and setOfflineStatus().

Referenced by __readSettings().

238  {
239  // offline is separate property now
241  {
242  $this->setOfflineStatus(true);
244  }
245 
246  $this->activation_type = $a_type;
247  }
setOfflineStatus($a_value)
$a_type
Definition: workflow.php:93
const IL_CRS_ACTIVATION_OFFLINE
const IL_CRS_ACTIVATION_UNLIMITED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjCourse::setActivationVisibility (   $a_value)

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

Referenced by __readSettings().

277  {
278  $this->activation_visibility = (bool) $a_value;
279  }
+ Here is the caller graph for this function:

◆ setArchiveEnd()

ilObjCourse::setArchiveEnd (   $a_value)

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

632  {
633  $this->archive_end = $a_value;
634  }

◆ setArchiveStart()

ilObjCourse::setArchiveStart (   $a_value)

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

624  {
625  $this->archive_start = $a_value;
626  }

◆ setArchiveType()

ilObjCourse::setArchiveType (   $a_value)

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

640  {
641  $this->archive_type = $a_value;
642  }

◆ setAutoNotification()

ilObjCourse::setAutoNotification (   $value)

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

Parameters
mixedboolean

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

Referenced by __readSettings().

2067  {
2068  $this->auto_notification = $value;
2069  }
+ Here is the caller graph for this function:

◆ setCancellationEnd()

ilObjCourse::setCancellationEnd ( ilDate  $a_value = null)

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

Referenced by __readSettings().

886  {
887  $this->leave_end = $a_value;
888  }
+ Here is the caller graph for this function:

◆ setContactConsultation()

ilObjCourse::setContactConsultation (   $a_value)

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

Referenced by __readSettings().

206  {
207  $this->contact_consultation = $a_value;
208  }
+ Here is the caller graph for this function:

◆ setContactEmail()

ilObjCourse::setContactEmail (   $a_value)

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

Referenced by __readSettings().

222  {
223  $this->contact_email = $a_value;
224  }
+ Here is the caller graph for this function:

◆ setContactName()

ilObjCourse::setContactName (   $a_cn)

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

Referenced by __readSettings().

198  {
199  $this->contact_name = $a_cn;
200  }
+ Here is the caller graph for this function:

◆ setContactPhone()

ilObjCourse::setContactPhone (   $a_value)

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

Referenced by __readSettings().

214  {
215  $this->contact_phone = $a_value;
216  }
+ Here is the caller graph for this function:

◆ setContactResponsibility()

ilObjCourse::setContactResponsibility (   $a_value)

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

Referenced by __readSettings().

230  {
231  $this->contact_responsibility = $a_value;
232  }
+ Here is the caller graph for this function:

◆ setCourseEnd()

ilObjCourse::setCourseEnd ( ilDate  $a_value = null)

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

Referenced by __readSettings().

876  {
877  $this->crs_end = $a_value;
878  }
+ Here is the caller graph for this function:

◆ setCourseStart()

ilObjCourse::setCourseStart ( ilDate  $a_value = null)

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

Referenced by __readSettings().

866  {
867  $this->crs_start = $a_value;
868  }
+ Here is the caller graph for this function:

◆ setEnableCourseMap()

ilObjCourse::setEnableCourseMap (   $a_enablemap)

Set Enable Course Map.

Parameters
boolean$a_enablemapEnable Course Map

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

Referenced by __readSettings().

842  {
843  $this->enablemap = $a_enablemap;
844  }
+ Here is the caller graph for this function:

◆ setImportantInformation()

ilObjCourse::setImportantInformation (   $a_info)

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

Referenced by __readSettings().

182  {
183  $this->important = $a_info;
184  }
+ Here is the caller graph for this function:

◆ setLatitude()

ilObjCourse::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by __readSettings().

782  {
783  $this->latitude = $a_latitude;
784  }
+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjCourse::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

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

Referenced by __readSettings().

822  {
823  $this->locationzoom = $a_locationzoom;
824  }
+ Here is the caller graph for this function:

◆ setLongitude()

ilObjCourse::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by __readSettings().

802  {
803  $this->longitude = $a_longitude;
804  }
+ 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 665 of file class.ilObjCourse.php.

References $a_type.

Referenced by __readSettings().

666  {
667  $this->mail_members = $a_type;
668  }
$a_type
Definition: workflow.php:93
+ Here is the caller graph for this function:

◆ setMessage()

ilObjCourse::setMessage (   $a_message)

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

Referenced by validate().

684  {
685  $this->message = $a_message;
686  }
+ 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 409 of file class.ilObjCourse.php.

Referenced by __readSettings().

410  {
411  $this->session_next = $a_num;
412  }
+ 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 390 of file class.ilObjCourse.php.

Referenced by __readSettings().

391  {
392  $this->session_prev = $a_num;
393  }
+ Here is the caller graph for this function:

◆ setOfflineStatus()

ilObjCourse::setOfflineStatus (   $a_value)

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

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

273  {
274  $this->activation_offline = (bool) $a_value;
275  }
+ 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

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

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

1607  {
1608  global $rbacadmin, $rbacreview;
1609 
1610  $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1611  foreach((array) $parent_roles as $parent_role)
1612  {
1613  $rbacadmin->initIntersectionPermissions(
1614  $this->getRefId(),
1615  $parent_role['obj_id'],
1616  $parent_role['parent'],
1617  $this->__getCrsNonMemberTemplateId(),
1618  ROLE_FOLDER_ID
1619  );
1620  }
1621  }
__getCrsNonMemberTemplateId()
get course non-member template private
Create styles array
The data for the language used.
getRefId()
get reference id public
+ 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 153 of file class.ilObjCourse.php.

Referenced by __createDefaultSettings(), and __readSettings().

154  {
155  $this->reg_access_code = $a_code;
156  }
+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjCourse::setShowMembers (   $a_status)

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

Referenced by __readSettings().

652  {
653  $this->show_members = $a_status;
654  }
+ Here is the caller graph for this function:

◆ setStatusDetermination()

ilObjCourse::setStatusDetermination (   $a_value)

Set status determination mode.

Parameters
int$a_value

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

References ilObjUserTracking\_enabledLearningProgress().

Referenced by __construct(), and __readSettings().

2077  {
2078  $a_value = (int)$a_value;
2079 
2080  // #13905
2081  if($a_value == self::STATUS_DETERMINATION_LP)
2082  {
2083  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
2085  {
2086  $a_value = self::STATUS_DETERMINATION_MANUAL;
2087  }
2088  }
2089 
2090  $this->status_dt = $a_value;
2091  }
static _enabledLearningProgress()
check wether learing progress is enabled or not
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubscriptionEnd()

ilObjCourse::setSubscriptionEnd (   $a_value)

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

Referenced by __readSettings().

310  {
311  $this->subscription_end = $a_value;
312  }
+ Here is the caller graph for this function:

◆ setSubscriptionLimitationType()

ilObjCourse::setSubscriptionLimitationType (   $a_type)

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

References $a_type.

Referenced by __readSettings().

290  {
291  $this->subscription_limitation_type = $a_type;
292  }
$a_type
Definition: workflow.php:93
+ Here is the caller graph for this function:

◆ setSubscriptionMaxMembers()

ilObjCourse::setSubscriptionMaxMembers (   $a_value)

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

Referenced by __readSettings().

439  {
440  $this->subscription_max_members = $a_value;
441  }
+ Here is the caller graph for this function:

◆ setSubscriptionMinMembers()

ilObjCourse::setSubscriptionMinMembers (   $a_value)

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

Referenced by __readSettings().

896  {
897  if($a_value !== null)
898  {
899  $a_value = (int)$a_value;
900  }
901  $this->min_members = $a_value;
902  }
+ Here is the caller graph for this function:

◆ setSubscriptionNotify()

ilObjCourse::setSubscriptionNotify (   $a_value)

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

Referenced by __readSettings().

575  {
576  $this->subscription_notify = $a_value ? true : false;
577  }
+ Here is the caller graph for this function:

◆ setSubscriptionPassword()

ilObjCourse::setSubscriptionPassword (   $a_value)

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

Referenced by __readSettings().

327  {
328  $this->subscription_password = $a_value;
329  }
+ Here is the caller graph for this function:

◆ setSubscriptionStart()

ilObjCourse::setSubscriptionStart (   $a_value)

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

Referenced by __readSettings().

302  {
303  $this->subscription_start = $a_value;
304  }
+ Here is the caller graph for this function:

◆ setSubscriptionType()

ilObjCourse::setSubscriptionType (   $a_value)

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

Referenced by __readSettings().

319  {
320  $this->subscription_type = $a_value;
321  }
+ Here is the caller graph for this function:

◆ setSyllabus()

ilObjCourse::setSyllabus (   $a_syllabus)

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

Referenced by __readSettings().

190  {
191  $this->syllabus = $a_syllabus;
192  }
+ Here is the caller graph for this function:

◆ setViewMode()

ilObjCourse::setViewMode (   $a_mode)

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

Referenced by __readSettings().

580  {
581  $this->view_mode = $a_mode;
582  }
+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjCourse::setWaitingListAutoFill (   $a_value)

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

Referenced by __readSettings().

910  {
911  $this->auto_fill_from_waiting = (bool)$a_value;
912  }
+ Here is the caller graph for this function:

◆ syncMembersStatusWithLP()

ilObjCourse::syncMembersStatusWithLP ( )

Set course status for all members by lp status.

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

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

2107  {
2108  include_once "Services/Tracking/classes/class.ilLPStatusWrapper.php";
2109  foreach($this->getMembersObject()->getParticipants() as $user_id)
2110  {
2111  // #15529 - force raise on sync
2112  ilLPStatusWrapper::_updateStatus($this->getId(), $user_id, null, false, true);
2113  }
2114  }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
getId()
get object id public
+ Here is the call graph for this function:

◆ update()

ilObjCourse::update ( )

update complete object

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

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

1208  {
1209  global $ilAppEventHandler,$ilLog;
1210 
1211  include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
1212  $sorting = new ilContainerSortingSettings($this->getId());
1213  $sorting->setSortMode($this->getOrderType());
1214  $sorting->update();
1215 
1216  $this->updateMetaData();
1217  $this->updateSettings();
1218  parent::update();
1219 
1220  $ilAppEventHandler->raise('Modules/Course',
1221  'update',
1222  array('object' => $this,
1223  'obj_id' => $this->getId(),
1224  'appointments' => $this->prepareAppointments('update')));
1225 
1226  }
updateMetaData()
update meta data entry
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ updateSettings()

ilObjCourse::updateSettings ( )

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

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

Referenced by update().

1229  {
1230  global $ilDB;
1231 
1232  // Due to a bug 3.5.alpha maybe no settings exist. => create default settings
1233 
1234  $query = "SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')." ";
1235  $res = $ilDB->query($query);
1236 
1237  if(!$res->numRows())
1238  {
1239  $this->__createDefaultSettings();
1240  }
1241 
1242  $query = "UPDATE crs_settings SET ".
1243  "syllabus = ".$ilDB->quote($this->getSyllabus() ,'text').", ".
1244  "contact_name = ".$ilDB->quote($this->getContactName() ,'text').", ".
1245  "contact_responsibility = ".$ilDB->quote($this->getContactResponsibility() ,'text').", ".
1246  "contact_phone = ".$ilDB->quote($this->getContactPhone() ,'text').", ".
1247  "contact_email = ".$ilDB->quote($this->getContactEmail() ,'text').", ".
1248  "contact_consultation = ".$ilDB->quote($this->getContactConsultation() ,'text').", ".
1249  "activation_type = ".$ilDB->quote(!$this->getOfflineStatus() ,'integer').", ".
1250  "sub_limitation_type = ".$ilDB->quote($this->getSubscriptionLimitationType() ,'integer').", ".
1251  "sub_start = ".$ilDB->quote($this->getSubscriptionStart() ,'integer').", ".
1252  "sub_end = ".$ilDB->quote($this->getSubscriptionEnd() ,'integer').", ".
1253  "sub_type = ".$ilDB->quote($this->getSubscriptionType() ,'integer').", ".
1254  "sub_password = ".$ilDB->quote($this->getSubscriptionPassword() ,'text').", ".
1255  "sub_mem_limit = ".$ilDB->quote((int) $this->isSubscriptionMembershipLimited() ,'integer').", ".
1256  "sub_max_members = ".$ilDB->quote($this->getSubscriptionMaxMembers() ,'integer').", ".
1257  "sub_notify = ".$ilDB->quote($this->getSubscriptionNotify() ,'integer').", ".
1258  "view_mode = ".$ilDB->quote($this->getViewMode() ,'integer').", ".
1259  "abo = ".$ilDB->quote($this->getAboStatus() ,'integer').", ".
1260  "waiting_list = ".$ilDB->quote($this->enabledWaitingList() ,'integer').", ".
1261  "important = ".$ilDB->quote($this->getImportantInformation() ,'text').", ".
1262  "show_members = ".$ilDB->quote($this->getShowMembers() ,'integer').", ".
1263  "latitude = ".$ilDB->quote($this->getLatitude() ,'text').", ".
1264  "longitude = ".$ilDB->quote($this->getLongitude() ,'text').", ".
1265  "location_zoom = ".$ilDB->quote($this->getLocationZoom() ,'integer').", ".
1266  "enable_course_map = ".$ilDB->quote((int) $this->getEnableCourseMap() ,'integer').", ".
1267  'session_limit = '.$ilDB->quote($this->isSessionLimitEnabled(),'integer').', '.
1268  'session_prev = '.$ilDB->quote($this->getNumberOfPreviousSessions(),'integer').', '.
1269  'session_next = '.$ilDB->quote($this->getNumberOfNextSessions(),'integer').', '.
1270  'reg_ac_enabled = '.$ilDB->quote($this->isRegistrationAccessCodeEnabled(),'integer').', '.
1271  'reg_ac = '.$ilDB->quote($this->getRegistrationAccessCode(),'text').', '.
1272  'auto_notification = '.$ilDB->quote( (int)$this->getAutoNotification(), 'integer').', '.
1273  'status_dt = '.$ilDB->quote((int) $this->getStatusDetermination()).', '.
1274  'mail_members_type = '.$ilDB->quote((int) $this->getMailToMembersType(),'integer').', '.
1275  'crs_start = '.$ilDB->quote(($this->getCourseStart() && !$this->getCourseStart()->isNull()) ? $this->getCourseStart()->get(IL_CAL_UNIX) : null, 'integer').', '.
1276  'crs_end = '.$ilDB->quote(($this->getCourseEnd() && !$this->getCourseEnd()->isNull()) ? $this->getCourseEnd()->get(IL_CAL_UNIX) : null, 'integer').', '.
1277  'auto_wait = '.$ilDB->quote((int) $this->hasWaitingListAutoFill(),'integer').', '.
1278  'leave_end = '.$ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer').', '.
1279  'min_members = '.$ilDB->quote((int) $this->getSubscriptionMinMembers(),'integer').' '.
1280  "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer')."";
1281 
1282  $res = $ilDB->manipulate($query);
1283 
1284  // moved activation to ilObjectActivation
1285  if($this->ref_id)
1286  {
1287  include_once "./Services/Object/classes/class.ilObjectActivation.php";
1288  ilObjectActivation::getItem($this->ref_id);
1289 
1290  $item = new ilObjectActivation;
1291  if($this->getActivationUnlimitedStatus())
1292  {
1294  }
1295  else
1296  {
1297  $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
1298  $item->setTimingStart($this->getActivationStart());
1299  $item->setTimingEnd($this->getActivationEnd());
1300  $item->toggleVisible($this->getActivationVisibility());
1301  }
1302 
1303  $item->update($this->ref_id);
1304  }
1305  }
getMailToMembersType()
Get mail to members type.
getLongitude()
Get Longitude.
static getItem($a_ref_id)
Get item data.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getStatusDetermination()
Get status determination mode.
const IL_CAL_UNIX
getLocationZoom()
Get LocationZoom.
getId()
get object id public
getNumberOfNextSessions()
Set number of previous sessions.
getRegistrationAccessCode()
get access code
setTimingType($a_type)
Set timing type.
getAutoNotification()
Returns automatic notification status from $this->auto_notification.
getLatitude()
Get Latitude.
isSubscriptionMembershipLimited()
is membership limited
global $ilDB
getNumberOfPreviousSessions()
Set number of previous sessions.
getEnableCourseMap()
Get Enable Course Map.
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

ilObjCourse::validate ( )

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

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

1061  {
1062  $this->setMessage('');
1063 
1064  #if(($this->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED) and
1065  # $this->getSubscriptionType() == )
1066  #{
1067  # $this->appendMessage($this->lng->txt('crs_select_registration_type'));
1068  #}
1069 
1071  $this->getActivationEnd() < $this->getActivationStart())
1072  {
1073  $this->appendMessage($this->lng->txt("activation_times_not_valid"));
1074  }
1076  $this->getSubscriptionStart() > $this->getSubscriptionEnd())
1077  {
1078  $this->appendMessage($this->lng->txt("subscription_times_not_valid"));
1079  }
1080  #if((!$this->getActivationUnlimitedStatus() and
1081  # !$this->getSubscriptionUnlimitedStatus()) and
1082  # ($this->getSubscriptionStart() > $this->getActivationEnd() or
1083  # $this->getSubscriptionStart() < $this->getActivationStart() or
1084  # $this->getSubscriptionEnd() > $this->getActivationEnd() or
1085  # $this->getSubscriptionEnd() < $this->getActivationStart()))
1086  #
1087  #{
1088  # $this->appendMessage($this->lng->txt("subscription_time_not_within_activation"));
1089  #}
1091  {
1092  $this->appendMessage($this->lng->txt("crs_password_required"));
1093  }
1094  if($this->isSubscriptionMembershipLimited())
1095  {
1096  if($this->getSubscriptionMinMembers() <= 0 && $this->getSubscriptionMaxMembers() <= 0)
1097  {
1098  $this->appendMessage($this->lng->txt("crs_max_and_min_members_needed"));
1099  }
1100  if($this->getSubscriptionMaxMembers() <= 0 && $this->enabledWaitingList())
1101  {
1102  $this->appendMessage($this->lng->txt("crs_max_members_needed"));
1103  }
1104  if($this->getSubscriptionMaxMembers() > 0 && $this->getSubscriptionMinMembers() > $this->getSubscriptionMaxMembers())
1105  {
1106  $this->appendMessage($this->lng->txt("crs_max_and_min_members_invalid"));
1107  }
1108  }
1109  if(!$this->getTitle() || !$this->getStatusDetermination())
1110  {
1111  $this->appendMessage($this->lng->txt('err_check_input'));
1112  }
1113 
1114  // :TODO: checkInput() is not used properly
1115  if(($this->getCourseStart() && !$this->getCourseEnd()) ||
1116  (!$this->getCourseStart() && $this->getCourseEnd()) ||
1117  ($this->getCourseStart() && $this->getCourseEnd() && $this->getCourseStart()->get(IL_CAL_UNIX) > $this->getCourseEnd()->get(IL_CAL_UNIX)))
1118  {
1119  $this->appendMessage($this->lng->txt("crs_course_period_not_valid"));
1120  }
1121 
1122  return $this->getMessage() ? false : true;
1123  }
const IL_CRS_ACTIVATION_LIMITED
const IL_CRS_SUBSCRIPTION_LIMITED
getStatusDetermination()
Get status determination mode.
const IL_CAL_UNIX
const IL_CRS_SUBSCRIPTION_PASSWORD
getTitle()
get object title public
setMessage($a_message)
isSubscriptionMembershipLimited()
is membership limited
appendMessage($a_message)
+ Here is the call graph for this function:

◆ validateInfoSettings()

ilObjCourse::validateInfoSettings ( )

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

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

1126  {
1127  global $ilErr;
1128  $error = false;
1129  if($this->getContactEmail()) {
1130  $emails = explode(",",$this->getContactEmail());
1131 
1132  foreach ($emails as $email) {
1133  $email = trim($email);
1134  if (!(ilUtil::is_email($email) or ilObjUser::getUserIdByLogin($email)))
1135  {
1136  $ilErr->appendMessage($this->lng->txt('contact_email_not_valid')." '".$email."'");
1137  $error = true;
1138  }
1139  }
1140  }
1141  return !$error;
1142  }
static getUserIdByLogin($a_login)
global $ilErr
Definition: raiseError.php:16
$error
Definition: Error.php:17
static is_email($a_email)
This preg-based function checks whether an e-mail address is formally valid.
+ Here is the call graph for this function:

Field Documentation

◆ $archives_obj

ilObjCourse::$archives_obj

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

◆ $auto_fill_from_waiting

ilObjCourse::$auto_fill_from_waiting
protected

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

Referenced by hasWaitingListAutoFill().

◆ $auto_notification

ilObjCourse::$auto_notification = true
private

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

Referenced by getAutoNotification().

◆ $course_logger

ilObjCourse::$course_logger = null
protected

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

◆ $crs_end

ilObjCourse::$crs_end
protected

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

Referenced by getCourseEnd().

◆ $crs_start

ilObjCourse::$crs_start
protected

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

Referenced by getCourseStart().

◆ $enablemap

ilObjCourse::$enablemap = 0
private

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

Referenced by getEnableCourseMap().

◆ $latitude

ilObjCourse::$latitude = ''
private

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

Referenced by getLatitude().

◆ $leave_end

ilObjCourse::$leave_end
protected

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

Referenced by getCancellationEnd().

◆ $locationzoom

ilObjCourse::$locationzoom = 0
private

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

Referenced by getLocationZoom().

◆ $longitude

ilObjCourse::$longitude = ''
private

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

Referenced by getLongitude().

◆ $mail_members

ilObjCourse::$mail_members = ilCourseConstants::MAIL_ALLOWED_ALL
private

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

Referenced by getMailToMembersType().

◆ $member_obj

ilObjCourse::$member_obj = null
private

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

Referenced by getMemberObject().

◆ $members_obj

ilObjCourse::$members_obj = null
private

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

Referenced by getMembersObject().

◆ $min_members

ilObjCourse::$min_members
protected

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

Referenced by getSubscriptionMinMembers().

◆ $reg_access_code

ilObjCourse::$reg_access_code = ''
private

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

Referenced by getRegistrationAccessCode().

◆ $reg_access_code_enabled

ilObjCourse::$reg_access_code_enabled = false
private

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

Referenced by isRegistrationAccessCodeEnabled().

◆ $session_limit

ilObjCourse::$session_limit = 0
private

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

Referenced by isSessionLimitEnabled().

◆ $session_next

ilObjCourse::$session_next = -1
private

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

Referenced by getNumberOfNextSessions().

◆ $session_prev

ilObjCourse::$session_prev = -1
private

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

Referenced by getNumberOfPreviousSessions().

◆ $status_dt

ilObjCourse::$status_dt = null
private

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

Referenced by getStatusDetermination().

◆ CAL_ACTIVATION_END

const ilObjCourse::CAL_ACTIVATION_END = 4

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

◆ CAL_ACTIVATION_START

const ilObjCourse::CAL_ACTIVATION_START = 3

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

◆ CAL_COURSE_END

const ilObjCourse::CAL_COURSE_END = 6

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

◆ CAL_COURSE_START

const ilObjCourse::CAL_COURSE_START = 5

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

◆ CAL_REG_END

const ilObjCourse::CAL_REG_END = 2

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

◆ CAL_REG_START

const ilObjCourse::CAL_REG_START = 1

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

◆ STATUS_DETERMINATION_LP

◆ STATUS_DETERMINATION_MANUAL

const ilObjCourse::STATUS_DETERMINATION_MANUAL = 2

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

Referenced by ilObjCourseGUI\initEditForm().


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