ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjCourse Class Reference
+ Inheritance diagram for ilObjCourse:
+ Collaboration diagram for ilObjCourse:

Public Member Functions

 ilObjCourse ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 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 ()
 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 ()
 enableSubscriptionMembershipLimitation ($a_status)
 enable max members
 isSubscriptionMembershipLimited ()
 is membership limited
 getSubscriptionMaxMembers ()
 setSubscriptionMaxMembers ($a_value)
 getSubscriptionNotify ()
 setSubscriptionNotify ($a_value)
 setViewMode ($a_mode)
 getViewMode ()
 Get container view mode.
 _lookupViewMode ($a_id)
 _lookupAboStatus ($a_id)
 getArchiveStart ()
 setArchiveStart ($a_value)
 getArchiveEnd ()
 setArchiveEnd ($a_value)
 getArchiveType ()
 setArchiveType ($a_value)
 setAboStatus ($a_status)
 getAboStatus ()
 setShowMembers ($a_status)
 getShowMembers ()
 getMessage ()
 setMessage ($a_message)
 appendMessage ($a_message)
 getMembers ()
 isActivated ($a_check_archive=false)
 _isActivated ($a_obj_id)
 Static version of isActive() to avoid instantiation of course object.
 _registrationEnabled ($a_obj_id)
 isArchived ()
 allowAbo ()
 read ($a_force_db=false)
 read object data from db into object
 create ($a_upload=false)
 setLatitude ($a_latitude)
 Set Latitude.
 getLatitude ()
 Get Latitude.
 setLongitude ($a_longitude)
 Set Longitude.
 getLongitude ()
 Get Longitude.
 setLocationZoom ($a_locationzoom)
 Set LocationZoom.
 getLocationZoom ()
 Get LocationZoom.
 setEnableCourseMap ($a_enablemap)
 Set Enable Course Map.
 getEnableCourseMap ()
 Get Enable Course Map.
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone course (no member data)
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (start objects, preconditions)
 cloneAutoGeneratedRoles ($new_obj)
 Clone automatic genrated roles (permissions and template permissions)
 validate ()
 validateInfoSettings ()
 hasContactData ()
 delete ()
 delete course and all related data
 update ()
 update complete object
 updateSettings ()
 cloneSettings ($new_obj)
 Clone entries in settings table.
 __createDefaultSettings ()
 __readSettings ()
 initWaitingList ()
 initCourseMemberObject ()
 initCourseItemObject ($a_child_id=0)
 getCourseItemObject ()
 get course item object
 initCourseArchiveObject ()
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public
 __setCourseStatus ()
 set course status
 __getCrsNonMemberTemplateId ()
 get course non-member template private
 getLocalCourseRoles ($a_translate=false)
 get ALL local roles of course, also those created and defined afterwards only fetch data once from database.
 getDefaultCourseRoles ($a_crs_id="")
 get default course roles, returns the defaultlike create roles il_crs_tutor, il_crs_admin and il_crs_member public
 __getLocalRoles ()
 __deleteSettings ()
 getDefaultMemberRole ()
 getDefaultTutorRole ()
 getDefaultAdminRole ()
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id=0)
 _deleteUser ($a_usr_id)
 handleECSSettings ($a_export, $a_owner, $a_mids)
 Save ECS settings (add- update- deleteResource)
 MDUpdateListener ($a_element)
 Overwriten Metadata update listener for ECS functionalities.
 updateECSContent ()
 Update ECS Content.
 addAdditionalSubItemInformation (&$a_item_data)
 Add additional information to sub item, e.g.
- Public Member Functions inherited from ilContainer
 ilContainer ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 createContainerDirectory ()
 Create directory for the container.
 getContainerDirectory ()
 Get the container directory.
 _getContainerDirectory ($a_id)
 Get the container directory.
 getBigIconPath ()
 Get path for big icon.
 getSmallIconPath ()
 Get path for small icon.
 getTinyIconPath ()
 Get path for tiny icon.
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems).
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems).
 _lookupContainerSetting ($a_id, $a_keyword)
 Lookup a container setting.
 _writeContainerSetting ($a_id, $a_keyword, $a_value)
 _lookupIconPath ($a_id, $a_size="big")
 lookup icon path
 saveIcons ($a_big_icon, $a_small_icon, $a_tiny_icon)
 save container icons
 removeBigIcon ()
 remove big icon
 removeSmallIcon ()
 remove small icon
 removeTinyIcon ()
 remove tiny icon
 getFirstColumn ()
 Get right column.
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false)
 clone all objects according to this container
 getOrderType ()
 Get order type default implementation.
 setOrderType ($a_value)
 getSubItems ($a_include_hidden_files=false, $a_include_side_block=false)
 Get subitems of container.
 gotItems ()
 Check whether we got any items.
 getGroupedObjTypes ()
 Get grouped repository object types.
 enablePageEditing ()
 Check whether page editing is allowed for container.
 read ()
 read
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 getId ()
 get object id public
 setId ($a_id)
 set object id public
 setRefId ($a_id)
 set reference id public
 getRefId ()
 get reference id public
 getType ()
 get object type public
 setType ($a_type)
 set object type public
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions
 getTitle ()
 get object title public
 getUntranslatedTitle ()
 get untranslated object title public
 setTitle ($a_title)
 set object title
 getDescription ()
 get object description
 setDescription ($a_desc)
 set object description
 getLongDescription ()
 get object long description (stored in object_description)
 getImportId ()
 get import id
 setImportId ($a_import_id)
 set import id
 _lookupObjIdByImportId ($a_import_id)
 getOwner ()
 get object owner
 getOwnerName ()
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id
 setOwner ($a_owner)
 set object owner
 getCreateDate ()
 get create date public
 getLastUpdateDate ()
 get last update date public
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class)
 create ()
 create
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 updateOwner ()
 update owner of object in db
 _getIdForImportId ($a_import_id)
 get current object id for import id (static)
 _getAllReferences ($a_id)
 get all reference ids of object
 _lookupTitle ($a_id)
 lookup object title
 _lookupDescription ($a_id)
 lookup object description
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _lookupObjId ($a_id)
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static)
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static)
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static)
 _lookupType ($a_id, $a_reference=false)
 lookup object type
 _isInTrash ($a_ref_id)
 checks wether object is in trash
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash
 _lookupObjectId ($a_ref_id)
 lookup object id
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
 setPermissions ($a_parent_ref)
 set permissions of object
 createReference ()
 creates reference for object
 countReferences ()
 count references of object
 createRoleFolder ()
 creates a local role folder
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts.
 setRegisterMode ($a_bool)
 isUserRegistered ($a_user_id=0)
 requireRegistration ()
 getXMLZip ()
 getHTMLDirectory ()
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container.
 cloneMetaData ($target_obj)
 Copy meta data.

Static Public Member Functions

static _isSubscriptionNotificationEnabled ($a_course_id)
 Check if subscription notification is enabled.

Data Fields

const CAL_REG_START = 1
const CAL_REG_END = 2
const CAL_ACTIVATION_START = 3
const CAL_ACTIVATION_END = 4
 $members_obj
 $archives_obj
 $items_obj
- Data Fields inherited from ilContainer
const VIEW_SESSIONS = 0
const VIEW_OBJECTIVE = 1
const VIEW_TIMING = 2
const VIEW_ARCHIVE = 3
const VIEW_SIMPLE = 4
const VIEW_BY_TYPE = 5
const VIEW_INHERIT = 6
const VIEW_ILINC = 7
const SORT_TITLE = 0
const SORT_MANUAL = 1
const SORT_ACTIVATION = 2
- Data Fields inherited from ilObject
 $ilias
 $lng
 $id
 $ref_id
 $type
 $title
 $untranslatedTitle
 $desc
 $long_desc
 $owner
 $create_date
 $last_update
 $import_id
 $register = false
 $referenced
 $objectList
 $max_title
 $max_desc
 $add_dots
 $obj_data_record
 object_data record

Protected Member Functions

 prepareAppointments ($a_mode= 'create')
 Prepare calendar appointments.

Additional Inherited Members

- Protected Attributes inherited from ilContainer
 $order_type = 0
 $hiddenfilesfound = false

Detailed Description

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

Member Function Documentation

ilObjCourse::__createDefaultSettings ( )

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

References $res, __readSettings(), getActivationEnd(), getActivationStart(), getArchiveEnd(), getArchiveStart(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getEnableCourseMap(), ilObject\getId(), getLatitude(), getLocationZoom(), getLongitude(), getSubscriptionEnd(), getSubscriptionMaxMembers(), getSubscriptionPassword(), getSubscriptionStart(), getSyllabus(), IL_CRS_ACTIVATION_OFFLINE, IL_CRS_ARCHIVE_NONE, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, and ilContainer\SORT_MANUAL.

Referenced by create(), and updateSettings().

{
global $ilDB;
$query = "INSERT INTO crs_settings SET ".
"obj_id = ".$ilDB->quote($this->getId()).", ".
"syllabus = ".$ilDB->quote($this->getSyllabus()).", ".
"contact_name = ".$ilDB->quote($this->getContactName()).", ".
"contact_responsibility = ".$ilDB->quote($this->getContactResponsibility()).", ".
"contact_phone = ".$ilDB->quote($this->getContactPhone()).", ".
"contact_email = ".$ilDB->quote($this->getContactEmail()).", ".
"contact_consultation = ".$ilDB->quote($this->getContactConsultation()).", ".
"activation_type = ".$ilDB->quote(IL_CRS_ACTIVATION_OFFLINE).", ".
#"activation_unlimited = '1', ".
"activation_start = ".$ilDB->quote($this->getActivationStart()).", ".
"activation_end = ".$ilDB->quote($this->getActivationEnd()).", ".
#"activation_offline = '1', ".
"subscription_limitation_type = ".$ilDB->quote(IL_CRS_SUBSCRIPTION_DEACTIVATED).", ".
#"subscription_unlimited = '1', ".
"subscription_start = ".$ilDB->quote($this->getSubscriptionStart()).", ".
"subscription_end = ".$ilDB->quote($this->getSubscriptionEnd()).", ".
"subscription_type = ".$ilDB->quote(IL_CRS_SUBSCRIPTION_DIRECT).", ".
"subscription_password = ".$ilDB->quote($this->getSubscriptionPassword()).", ".
"subscription_membership_limitation = ".$ilDB->quote(0).", ".
"subscription_max_members = ".$ilDB->quote($this->getSubscriptionMaxMembers()).", ".
"subscription_notify = '1', ".
"view_mode = '0', ".
"archive_start = ".$ilDB->quote($this->getArchiveStart()).", ".
"archive_end = ".$ilDB->quote($this->getArchiveEnd()).", ".
"archive_type = ".$ilDB->quote(IL_CRS_ARCHIVE_NONE).", ".
"abo = ".$ilDB->quote($this->ABO_ENABLED).", ".
"latitude = ".$ilDB->quote($this->getLatitude()).", ".
"longitude = ".$ilDB->quote($this->getLongitude()).", ".
"location_zoom = ".$ilDB->quote($this->getLocationZoom()).", ".
"enable_course_map = ".$ilDB->quote($this->getEnableCourseMap()).", ".
#"objective_view = '0', ".
"waiting_list = '1', ".
"show_members = '1'";
$res = $ilDB->query($query);
$this->__readSettings();
include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
$sorting = new ilContainerSortingSettings($this->getId());
$sorting->setSortMode(ilContainer::SORT_MANUAL);
$sorting->update();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::__deleteSettings ( )

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

References ilObject\getId().

Referenced by delete().

{
global $ilDB;
$query = "DELETE FROM crs_settings ".
"WHERE obj_id = ".$ilDB->quote($this->getId())." ";
$this->ilias->db->query($query);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References $res, and DB_FETCHMODE_ASSOC.

Referenced by __setCourseStatus().

{
global $ilDB;
$q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_crs_non_member'";
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $row["obj_id"];
}

+ Here is the caller graph for this function:

ilObjCourse::__getLocalRoles ( )

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

References ilObject\getRefId().

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

{
global $rbacreview;
// GET role_objects of predefined roles
$rolf = $rbacreview->getRoleFolderOfObject($this->getRefId());
return $rbacreview->getRolesOfRoleFolder($rolf["ref_id"],false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::__readSettings ( )

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

References $res, DB_FETCHMODE_OBJECT, enableSubscriptionMembershipLimitation(), enableWaitingList(), ilObject\getId(), setAboStatus(), setActivationEnd(), setActivationStart(), setActivationType(), setArchiveEnd(), setArchiveStart(), setArchiveType(), setContactConsultation(), setContactEmail(), setContactName(), setContactPhone(), setContactResponsibility(), setEnableCourseMap(), setImportantInformation(), setLatitude(), setLocationZoom(), setLongitude(), setShowMembers(), setSubscriptionEnd(), setSubscriptionLimitationType(), setSubscriptionMaxMembers(), setSubscriptionNotify(), setSubscriptionPassword(), setSubscriptionStart(), setSubscriptionType(), setSyllabus(), and setViewMode().

Referenced by __createDefaultSettings(), and read().

{
global $ilDB;
$query = "SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->getId())."";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setSyllabus($row->syllabus);
$this->setContactName($row->contact_name);
$this->setContactResponsibility($row->contact_responsibility);
$this->setContactPhone($row->contact_phone);
$this->setContactEmail($row->contact_email);
$this->setContactConsultation($row->contact_consultation);
$this->setActivationType($row->activation_type);
#$this->setActivationUnlimitedStatus($row->activation_unlimited);
$this->setActivationStart($row->activation_start);
$this->setActivationEnd($row->activation_end);
#$this->setOfflineStatus($row->activation_offline);
$this->setSubscriptionLimitationType($row->subscription_limitation_type);
#$this->setSubscriptionUnlimitedStatus($row->subscription_unlimited);
$this->setSubscriptionStart($row->subscription_start);
$this->setSubscriptionEnd($row->subscription_end);
$this->setSubscriptionType($row->subscription_type);
$this->setSubscriptionPassword($row->subscription_password);
$this->enableSubscriptionMembershipLimitation($row->subscription_membership_limitation);
$this->setSubscriptionMaxMembers($row->subscription_max_members);
$this->setSubscriptionNotify($row->subscription_notify);
$this->setViewMode($row->view_mode);
$this->setArchiveStart($row->archive_start);
$this->setArchiveEnd($row->archive_end);
$this->setArchiveType($row->archive_type);
$this->setAboStatus($row->abo);
$this->enableWaitingList($row->waiting_list);
$this->setImportantInformation($row->important);
$this->setShowMembers($row->show_members);
$this->setLatitude($row->latitude);
$this->setLongitude($row->longitude);
$this->setLocationZoom($row->location_zoom);
$this->setEnableCourseMap($row->enable_course_map);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::__setCourseStatus ( )

set course status

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

Creates linked roles in the local role folder object for all parent roles and initializes their permission templates. Each permission template is initialized by computing the intersection of the role template il_crs_non_member and the permission template of the parent role.

private

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

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

Referenced by initDefaultRoles().

{
global $rbacadmin, $rbacreview, $rbacsystem;
//get Rolefolder of course
$rolf_data = $rbacreview->getRoleFolderOfObject($this->getRefId());
//define all relevant roles for which rights are needed to be changed
$arr_parentRoles = $rbacreview->getParentRoleIds($this->getRefId());
$arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles),$this->getDefaultCourseRoles());
$template_id = $this->__getCrsNonMemberTemplateId();
//get defined operations from template
if (is_null($template_id))
{
$template_ops = array();
} else {
$template_ops = $rbacreview->getOperationsOfRole($template_id, 'crs', ROLE_FOLDER_ID);
}
foreach ($arr_relevantParentRoleIds as $parentRole)
{
if ($rbacreview->isProtected($arr_parentRoles[$parentRole]['parent'],$parentRole))
{
continue;
}
$granted_permissions = array();
// Delete the linked role for the parent role
// (just in case if it already exists).
$rbacadmin->deleteLocalRole($parentRole,$rolf_data["child"]);
// Grant permissions on the course object for
// the parent role. In the foreach loop we
// compute the intersection of the role
// template il_crs_non_member and the
// permission template of the parent role.
$current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->getRefId());
$rbacadmin->revokePermission($this->getRefId(), $parentRole);
foreach ($template_ops as $template_op)
{
if (in_array($template_op,$current_ops))
{
array_push($granted_permissions,$template_op);
}
}
if (!empty($granted_permissions))
{
$rbacadmin->grantPermission($parentRole, $granted_permissions, $this->getRefId());
}
// Create a linked role for the parent role and
// initialize it with the intersection of
// il_crs_non_member and the permission
// template of the parent role
if (! is_null($template_id))
{
$rbacadmin->copyRolePermissionIntersection(
$template_id, ROLE_FOLDER_ID,
$parentRole, $arr_parentRoles[$parentRole]['parent'],
$rolf_data["child"], $parentRole
);
}
$rbacadmin->assignRoleToFolder($parentRole,$rolf_data["child"],"false");
}//END foreach
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::_checkCondition (   $a_obj_id,
  $a_operator,
  $a_value,
  $a_usr_id = 0 
)

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

References ilParticipants\_hasPassed().

{
global $ilUser;
$a_usr_id = $a_usr_id ? $a_usr_id : $ilUser->getId();
include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
switch($a_operator)
{
case 'passed':
return ilCourseParticipants::_hasPassed($a_obj_id,$a_usr_id);
default:
return true;
}
}

+ Here is the call graph for this function:

ilObjCourse::_deleteUser (   $a_usr_id)

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

Referenced by ilObjUser\delete().

{
// Delete all user related data
// delete lm_history
include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
// Course objectives
include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
}

+ Here is the caller graph for this function:

ilObjCourse::_isActivated (   $a_obj_id)

Static version of isActive() to avoid instantiation of course object.

Parameters
intid of user
Returns
boolean

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

References $res, ilObject\$type, DB_FETCHMODE_OBJECT, IL_CRS_ACTIVATION_LIMITED, IL_CRS_ACTIVATION_OFFLINE, and IL_CRS_ACTIVATION_UNLIMITED.

Referenced by ilObjCourseAccess\_checkAccess(), ilObjCourseReferenceAccess\_checkAccess(), ilObjCourseListGUI\getProperties(), and ilRepositoryExplorer\isClickable().

{
global $ilDB;
$query = "SELECT * FROM crs_settings ".
"WHERE obj_id = ".$ilDB->quote($a_obj_id)." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$type = $row->activation_type;
$start = $row->activation_start;
$end = $row->activation_end;
}
switch($type)
{
return false;
return true;
if(time() < $start or
time() > $end)
{
return false;
}
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

static ilObjCourse::_isSubscriptionNotificationEnabled (   $a_course_id)
static

Check if subscription notification is enabled.

public

Parameters
intcourse_id

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

References $res.

{
global $ilDB;
$query = "SELECT * FROM crs_settings ".
"WHERE obj_id = ".$ilDB->quote($a_course_id)." ".
"AND subscription_notify = 1";
$res = $ilDB->query($query);
return $res->numRows() ? true : false;
}
ilObjCourse::_lookupAboStatus (   $a_id)

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

References $res, and DB_FETCHMODE_OBJECT.

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

{
global $ilDB;
$query = "SELECT abo FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id)." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->abo;
}
return false;
}

+ Here is the caller graph for this function:

ilObjCourse::_lookupViewMode (   $a_id)

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

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilLPObjSettings\_checkObjectives(), ilObjCourseGUI\_modifyItemGUI(), ilObjFolderGUI\forwardToTimingsView(), ilObjFolder\getViewMode(), and ilObjGroup\getViewMode().

{
global $ilDB;
$query = "SELECT view_mode FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id)." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->view_mode;
}
return false;
}

+ Here is the caller graph for this function:

ilObjCourse::_registrationEnabled (   $a_obj_id)

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

References $res, ilObject\$type, DB_FETCHMODE_OBJECT, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_LIMITED, and IL_CRS_SUBSCRIPTION_UNLIMITED.

Referenced by ilObjCourseAccess\_checkAccess().

{
global $ilDB;
$query = "SELECT * FROM crs_settings ".
"WHERE obj_id = ".$ilDB->quote($a_obj_id)." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$type = $row->subscription_limitation_type;
$reg_start = $row->subscription_start;
$reg_end = $row->subscription_end;
}
switch($type)
{
return true;
return false;
if(time() > $reg_start and
time() < $reg_end)
{
return true;
}
default:
return false;
}
return false;
}

+ Here is the caller graph for this function:

ilObjCourse::addAdditionalSubItemInformation ( $a_item_data)

Add additional information to sub item, e.g.

used in courses for timings information etc.

Reimplemented from ilContainer.

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

References $ilBench, and initCourseItemObject().

{
global $ilBench;
$ilBench->start("Course", "initCourseItemObject");
$ilBench->stop("Course", "initCourseItemObject");
$ilBench->start("Course", "addAdditionalSubItemInformation");
$this->items_obj->addAdditionalSubItemInformation($a_item_data);
$ilBench->stop("Course", "addAdditionalSubItemInformation");
}

+ Here is the call graph for this function:

ilObjCourse::allowAbo ( )

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

{
return $this->ABO == $this->ABO_ENABLED;
}
ilObjCourse::appendMessage (   $a_message)

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

References getMessage().

Referenced by validate().

{
if($this->getMessage())
{
$this->message .= "<br /> ";
}
$this->message .= $a_message;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::cloneAutoGeneratedRoles (   $new_obj)

Clone automatic genrated roles (permissions and template permissions)

public

Parameters
objectnew course object

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

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

Referenced by cloneObject().

{
global $ilLog,$rbacadmin,$rbacreview;
$admin = $this->getDefaultAdminRole();
$new_admin = $new_obj->getDefaultAdminRole();
$source_rolf = $rbacreview->getRoleFolderIdOfObject($this->getRefId());
$target_rolf = $rbacreview->getRoleFolderIdOfObject($new_obj->getRefId());
if(!$admin || !$new_admin || !$source_rolf || !$target_rolf)
{
$ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_admin');
}
$rbacadmin->copyRolePermissions($admin,$source_rolf,$target_rolf,$new_admin,true);
$ilLog->write(__METHOD__.' : Finished copying of role crs_admin.');
$tutor = $this->getDefaultTutorRole();
$new_tutor = $new_obj->getDefaultTutorRole();
if(!$tutor || !$new_tutor)
{
$ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_tutor');
}
$rbacadmin->copyRolePermissions($tutor,$source_rolf,$target_rolf,$new_tutor,true);
$ilLog->write(__METHOD__.' : Finished copying of role crs_tutor.');
$member = $this->getDefaultMemberRole();
$new_member = $new_obj->getDefaultMemberRole();
if(!$member || !$new_member)
{
$ilLog->write(__METHOD__.' : Error cloning auto generated role: il_crs_member');
}
$rbacadmin->copyRolePermissions($member,$source_rolf,$target_rolf,$new_member,true);
$ilLog->write(__METHOD__.' : Finished copying of role crs_member.');
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies (start objects, preconditions)

public

Parameters
inttarget ref id of new course
intcopy id

Reimplemented from ilContainer.

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

References ilObject\getId(), ilObject\getRefId(), and initCourseItemObject().

{
global $ilObjDataCache;
parent::cloneDependencies($a_target_id,$a_copy_id);
// Clone course start objects
include_once('Modules/Course/classes/class.ilCourseStart.php');
$start = new ilCourseStart($this->getRefId(),$this->getId());
$start->cloneDependencies($a_target_id,$a_copy_id);
// Clone course item settings
$this->items_obj->cloneDependencies($a_target_id,$a_copy_id);
// Clone course learning objectives
include_once('Modules/Course/classes/class.ilCourseObjective.php');
$crs_objective = new ilCourseObjective($this);
$crs_objective->ilClone($a_target_id,$a_copy_id);
include_once('Services/Tracking/classes/class.ilLPCollections.php');
$lp_collection = new ilLPCollections($this->getId());
$lp_collection->cloneCollections($a_target_id,$a_copy_id);
return true;
}

+ Here is the call graph for this function:

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

Clone course (no member data)

public

Parameters
inttarget ref_id
intcopy id

Reimplemented from ilContainer.

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

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

{
global $ilDB,$ilUser;
$new_obj = parent::cloneObject($a_target_id,$a_copy_id);
$this->cloneAutoGeneratedRoles($new_obj);
$this->cloneMetaData($new_obj);
// Assign admin
$new_obj->initCourseMemberObject();
$new_obj->members_obj->add($ilUser->getId(),IL_CRS_ADMIN);
// Copy settings
$this->cloneSettings($new_obj);
// Course Defined Fields
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
ilCourseDefinedFieldDefinition::_clone($this->getId(),$new_obj->getId());
// Clone course files
include_once('Modules/Course/classes/class.ilCourseFile.php');
ilCourseFile::_cloneFiles($this->getId(),$new_obj->getId());
// Copy learning progress settings
include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
$obj_settings = new ilLPObjSettings($this->getId());
$obj_settings->cloneSettings($new_obj->getId());
unset($obj_settings);
// clone icons
global $ilLog;
$ilLog->write(__METHOD__.': '.$this->getBigIconPath().' '.$this->getSmallIconPath());
$new_obj->saveIcons($this->getBigIconPath(),
$this->getSmallIconPath(),
$this->getTinyIconPath());
return $new_obj;
}

+ Here is the call graph for this function:

ilObjCourse::cloneSettings (   $new_obj)

Clone entries in settings table.

public

Parameters
objectnew course object

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

References enabledWaitingList(), getAboStatus(), getActivationEnd(), getActivationStart(), getActivationType(), getArchiveEnd(), getArchiveStart(), getArchiveType(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getImportantInformation(), ilContainer\getOrderType(), getShowMembers(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionNotify(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), getSyllabus(), getViewMode(), and isSubscriptionMembershipLimited().

Referenced by cloneObject().

{
$new_obj->setSyllabus($this->getSyllabus());
$new_obj->setContactName($this->getContactName());
$new_obj->setContactResponsibility($this->getContactResponsibility());
$new_obj->setContactPhone($this->getContactPhone());
$new_obj->setContactEmail($this->getContactEmail());
$new_obj->setContactConsultation($this->getContactConsultation());
$new_obj->setActivationType($this->getActivationType());
$new_obj->setActivationStart($this->getActivationStart());
$new_obj->setActivationEnd($this->getActivationEnd());
$new_obj->setSubscriptionLimitationType($this->getSubscriptionLimitationType());
$new_obj->setSubscriptionStart($this->getSubscriptionStart());
$new_obj->setSubscriptionEnd($this->getSubscriptionEnd());
$new_obj->setSubscriptionType($this->getSubscriptionType());
$new_obj->setSubscriptionPassword($this->getSubscriptionPassword());
$new_obj->enableSubscriptionMembershipLimitation($this->isSubscriptionMembershipLimited());
$new_obj->setSubscriptionMaxMembers($this->getSubscriptionMaxMembers());
$new_obj->setSubscriptionNotify($this->getSubscriptionNotify());
$new_obj->setViewMode($this->getViewMode());
$new_obj->setOrderType($this->getOrderType());
$new_obj->setArchiveStart($this->getArchiveStart());
$new_obj->setArchiveEnd($this->getArchiveEnd());
$new_obj->setArchiveType($this->getArchiveType());
$new_obj->setAboStatus($this->getAboStatus());
$new_obj->enableWaitingList($this->enabledWaitingList());
$new_obj->setImportantInformation($this->getImportantInformation());
$new_obj->setShowMembers($this->getShowMembers());
$new_obj->update();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::create (   $a_upload = false)

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

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

{
global $ilAppEventHandler;
parent::create($a_upload);
if(!$a_upload)
{
$this->createMetaData();
}
$ilAppEventHandler->raise('Modules/Course',
'create',
array('object' => $this,
'obj_id' => $this->getId(),
'appointments' => $this->prepareAppointments('create')));
}

+ Here is the call graph for this function:

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

Reimplemented from ilObject.

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

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

{
global $ilAppEventHandler;
// always call parent delete function first!!
if (!parent::delete())
{
return false;
}
// delete meta data
$this->deleteMetaData();
// put here course specific stuff
$this->__deleteSettings();
$this->items_obj->deleteAllEntries();
include_once('Modules/Course/classes/class.ilCourseParticipants.php');
$this->archives_obj->deleteAll();
include_once './Modules/Course/classes/class.ilCourseObjective.php';
include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
include_once './Modules/Course/classes/class.ilCourseFile.php';
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
$ilAppEventHandler->raise('Modules/Course',
'delete',
array('object' => $this,
'obj_id' => $this->getId(),
'appointments' => $this->prepareAppointments('delete')));
return true;
}

+ Here is the call graph for this function:

ilObjCourse::enabledObjectiveView ( )

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

References IL_CRS_VIEW_OBJECTIVE.

{
return $this->view_mode == IL_CRS_VIEW_OBJECTIVE;
}
ilObjCourse::enabledWaitingList ( )

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

Referenced by cloneSettings(), and updateSettings().

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

+ Here is the caller graph for this function:

ilObjCourse::enableSubscriptionMembershipLimitation (   $a_status)

enable max members

public

Parameters
boolstatus
Returns

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

Referenced by __readSettings().

{
$this->subscription_membership_limitation = $a_status;
}

+ Here is the caller graph for this function:

ilObjCourse::enableWaitingList (   $a_status)

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

Referenced by __readSettings().

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

+ Here is the caller graph for this function:

ilObjCourse::getAboStatus ( )

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

Referenced by cloneSettings(), and updateSettings().

{
return $this->abo;
}

+ Here is the caller graph for this function:

ilObjCourse::getActivationEnd ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getActivationStart ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getActivationType ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getActivationUnlimitedStatus ( )

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

References IL_CRS_ACTIVATION_UNLIMITED.

Referenced by isActivated(), and prepareAppointments().

{
return $this->activation_type == IL_CRS_ACTIVATION_UNLIMITED;
}

+ Here is the caller graph for this function:

ilObjCourse::getArchiveEnd ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getArchiveStart ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getArchiveType ( )

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

References IL_CRS_ARCHIVE_DOWNLOAD, and IL_CRS_ARCHIVE_NONE.

Referenced by cloneSettings(), and updateSettings().

{
return $this->archive_type ? IL_CRS_ARCHIVE_DOWNLOAD : IL_CRS_ARCHIVE_NONE;
}

+ Here is the caller graph for this function:

ilObjCourse::getContactConsultation ( )

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

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

{
return $this->contact_consultation;
}

+ Here is the caller graph for this function:

ilObjCourse::getContactEmail ( )

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

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

{
return $this->contact_email;
}

+ Here is the caller graph for this function:

ilObjCourse::getContactName ( )

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

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

{
return $this->contact_name;
}

+ Here is the caller graph for this function:

ilObjCourse::getContactPhone ( )

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

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

{
return $this->contact_phone;
}

+ Here is the caller graph for this function:

ilObjCourse::getContactResponsibility ( )

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

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

{
return $this->contact_responsibility;
}

+ Here is the caller graph for this function:

ilObjCourse::getCourseItemObject ( )

get course item object

public

Parameters
@returnobject

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

References $items_obj, and initCourseItemObject().

{
if(is_object($this->items_obj))
{
}
}

+ Here is the call graph for this function:

ilObjCourse::getDefaultAdminRole ( )

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

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

Referenced by cloneAutoGeneratedRoles().

{
$local_roles = $this->__getLocalRoles();
foreach($local_roles as $role_id)
{
if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
{
if(!strcmp($tmp_role->getTitle(),"il_crs_admin_".$this->getRefId()))
{
return $role_id;
}
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References ilObject\getRefId().

Referenced by __setCourseStatus().

{
global $rbacadmin, $rbacreview;
if (strlen($a_crs_id) > 0)
{
$crs_id = $a_crs_id;
}
else
{
$crs_id = $this->getRefId();
}
$rolf = $rbacreview->getRoleFolderOfObject($crs_id);
$role_arr = $rbacreview->getRolesOfRoleFolder($rolf["ref_id"]);
foreach ($role_arr as $role_id)
{
$role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
$crs_Member ="il_crs_member_".$crs_id;
$crs_Admin ="il_crs_admin_".$crs_id;
$crs_Tutor ="il_crs_tutor_".$crs_id;
if (strcmp($role_Obj->getTitle(), $crs_Member) == 0 )
{
$arr_crsDefaultRoles["crs_member_role"] = $role_Obj->getId();
}
if (strcmp($role_Obj->getTitle(), $crs_Admin) == 0)
{
$arr_crsDefaultRoles["crs_admin_role"] = $role_Obj->getId();
}
if (strcmp($role_Obj->getTitle(), $crs_Tutor) == 0)
{
$arr_crsDefaultRoles["crs_tutor_role"] = $role_Obj->getId();
}
}
return $arr_crsDefaultRoles;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::getDefaultMemberRole ( )

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

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

Referenced by cloneAutoGeneratedRoles().

{
$local_roles = $this->__getLocalRoles();
foreach($local_roles as $role_id)
{
if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
{
if(!strcmp($tmp_role->getTitle(),"il_crs_member_".$this->getRefId()))
{
return $role_id;
}
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::getDefaultTutorRole ( )

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

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

Referenced by cloneAutoGeneratedRoles().

{
$local_roles = $this->__getLocalRoles();
foreach($local_roles as $role_id)
{
if($tmp_role =& ilObjectFactory::getInstanceByObjId($role_id,false))
{
if(!strcmp($tmp_role->getTitle(),"il_crs_tutor_".$this->getRefId()))
{
return $role_id;
}
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::getEnableCourseMap ( )

Get Enable Course Map.

Returns
boolean Enable Course Map

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

Referenced by __createDefaultSettings(), and updateSettings().

{
return $this->enablemap;
}

+ Here is the caller graph for this function:

ilObjCourse::getImportantInformation ( )

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

Referenced by cloneSettings(), and updateSettings().

{
return $this->important;
}

+ Here is the caller graph for this function:

ilObjCourse::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

Referenced by __createDefaultSettings(), and updateSettings().

{
return $this->latitude;
}

+ Here is the caller graph for this function:

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

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

{
global $rbacadmin,$rbacreview;
if (empty($this->local_roles))
{
$this->local_roles = array();
$rolf = $rbacreview->getRoleFolderOfObject($this->getRefId());
$role_arr = $rbacreview->getRolesOfRoleFolder($rolf["ref_id"]);
foreach ($role_arr as $role_id)
{
if ($rbacreview->isAssignable($role_id,$rolf["ref_id"]) == true)
{
$role_Obj = $this->ilias->obj_factory->getInstanceByObjId($role_id);
if ($a_translate)
{
$role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
}
else
{
$role_name = $role_Obj->getTitle();
}
$this->local_roles[$role_name] = $role_Obj->getId();
}
}
}
return $this->local_roles;
}

+ Here is the call graph for this function:

ilObjCourse::getLocationZoom ( )

Get LocationZoom.

Returns
int LocationZoom

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

Referenced by __createDefaultSettings(), and updateSettings().

{
return $this->locationzoom;
}

+ Here is the caller graph for this function:

ilObjCourse::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

Referenced by __createDefaultSettings(), and updateSettings().

{
return $this->longitude;
}

+ Here is the caller graph for this function:

ilObjCourse::getMembers ( )

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

{
return $this->members_obj->getMembers();
}
ilObjCourse::getMessage ( )

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

Referenced by appendMessage(), and validate().

{
return $this->message;
}

+ Here is the caller graph for this function:

ilObjCourse::getOfflineStatus ( )

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

References IL_CRS_ACTIVATION_OFFLINE.

Referenced by isActivated(), and prepareAppointments().

{
return $this->activation_type == IL_CRS_ACTIVATION_OFFLINE;
}

+ Here is the caller graph for this function:

ilObjCourse::getShowMembers ( )

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

Referenced by cloneSettings(), and updateSettings().

{
return $this->show_members;
}

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionEnd ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionLimitationType ( )

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

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

{
return $this->subscription_limitation_type;
}

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionMaxMembers ( )

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

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

{
return $this->subscription_max_members;
}

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionNotify ( )

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

Referenced by cloneSettings(), and updateSettings().

{
return true;
return $this->subscription_notify ? true : false;
}

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionPassword ( )

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

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

{
return $this->subscription_password;
}

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionStart ( )

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionType ( )

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

References IL_CRS_SUBSCRIPTION_DIRECT.

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

{
return $this->subscription_type ? $this->subscription_type : IL_CRS_SUBSCRIPTION_DIRECT;
#return $this->subscription_type ? $this->subscription_type : $this->SUBSCRIPTION_DEACTIVATED;
}

+ Here is the caller graph for this function:

ilObjCourse::getSubscriptionUnlimitedStatus ( )

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

References IL_CRS_SUBSCRIPTION_UNLIMITED.

Referenced by inSubscriptionTime().

{
return $this->subscription_limitation_type == IL_CRS_SUBSCRIPTION_UNLIMITED;
}

+ Here is the caller graph for this function:

ilObjCourse::getSyllabus ( )

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

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

{
return $this->syllabus;
}

+ Here is the caller graph for this function:

ilObjCourse::getViewMode ( )

Get container view mode.

Reimplemented from ilContainer.

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

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

{
return $this->view_mode;
}

+ Here is the caller graph for this function:

ilObjCourse::handleECSSettings (   $a_export,
  $a_owner,
  $a_mids 
)

Save ECS settings (add- update- deleteResource)

public

Parameters
boolExport flag
intowner mid
arrayarray of participant mids
Exceptions
ilECSConnectorException,ilECSContentWriterException

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

{
try
{
include_once('./Services/WebServices/ECS/classes/class.ilECSContentWriter.php');
$writer = new ilECSContentWriter($this);
$writer->setExportable($a_export);
$writer->setOwnerId($a_owner);
$writer->setParticipantIds((array) $a_mids);
$writer->refresh();
}
{
throw $exc;
}
{
throw $exc;
}
}
ilObjCourse::hasContactData ( )

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

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

{
return strlen($this->getContactName()) or
strlen($this->getContactResponsibility()) or
strlen($this->getContactEmail()) or
strlen($this->getContactPhone()) or
strlen($this->getContactConsultation());
}

+ Here is the call graph for this function:

ilObjCourse::ilObjCourse (   $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 74 of file class.ilObjCourse.php.

References initCourseMemberObject().

{
#define("ILIAS_MODULE","course");
#define("KEEP_IMAGE_PATH",1);
$this->SUBSCRIPTION_DEACTIVATED = 1;
$this->SUBSCRIPTION_CONFIRMATION = 2;
$this->SUBSCRIPTION_DIRECT = 3;
$this->SUBSCRIPTION_PASSWORD = 4;
$this->SUBSCRIPTION_AUTOSUBSCRIPTION = 5;
$this->ARCHIVE_DISABLED = 1;
$this->ARCHIVE_READ = 2;
$this->ARCHIVE_DOWNLOAD = 3;
$this->ABO_ENABLED = 1;
$this->ABO_DISABLED = 0;
$this->SHOW_MEMBERS_ENABLED = 1;
$this->SHOW_MEMBERS_DISABLED = 0;
$this->type = "crs";
parent::__construct($a_id,$a_call_by_reference);
if($a_id)
{
#$this->__initMetaObject();
}
else
{
}
}

+ Here is the call graph for this function:

ilObjCourse::initCourseArchiveObject ( )

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

Referenced by delete().

{
include_once "./Modules/Course/classes/class.ilCourseArchives.php";
if(!is_object($this->archives_obj))
{
$this->archives_obj =& new ilCourseArchives($this);
}
return true;
}

+ Here is the caller graph for this function:

ilObjCourse::initCourseItemObject (   $a_child_id = 0)

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

Referenced by addAdditionalSubItemInformation(), cloneDependencies(), delete(), and getCourseItemObject().

{
include_once "./Modules/Course/classes/class.ilCourseItems.php";
if(!is_object($this->items_obj))
{
$this->items_obj = new ilCourseItems($this,$a_child_id);
}
return true;
}

+ Here is the caller graph for this function:

ilObjCourse::initCourseMemberObject ( )

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

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

Referenced by ilObjCourse(), and validate().

{
include_once "./Modules/Course/classes/class.ilCourseParticipants.php";
$this->members_obj = ilCourseParticipants::_getInstanceByObjId($this->getId());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::initDefaultRoles ( )

init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public

Returns
array empty array

Reimplemented from ilObject.

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

References $res, __setCourseStatus(), ilObject\createRoleFolder(), DB_FETCHMODE_OBJECT, ilObject\getId(), and ilObject\getRefId().

{
global $rbacadmin,$rbacreview,$ilDB;
$rolf_obj = $this->createRoleFolder();
// CREATE ADMIN ROLE
$role_obj = $rolf_obj->createRole("il_crs_admin_".$this->getRefId(),"Admin of course obj_no.".$this->getId());
$admin_id = $role_obj->getId();
// SET PERMISSION TEMPLATE OF NEW LOCAL ADMIN ROLE
$query = "SELECT obj_id FROM object_data ".
" WHERE type='rolt' AND title='il_crs_admin'";
$res = $this->ilias->db->getRow($query, DB_FETCHMODE_OBJECT);
$rbacadmin->copyRoleTemplatePermissions($res->obj_id,ROLE_FOLDER_ID,$rolf_obj->getRefId(),$role_obj->getId());
// SET OBJECT PERMISSIONS OF COURSE OBJECT
$ops = $rbacreview->getOperationsOfRole($role_obj->getId(),"crs",$rolf_obj->getRefId());
$rbacadmin->grantPermission($role_obj->getId(),$ops,$this->getRefId());
// SET OBJECT PERMISSIONS OF ROLE FOLDER OBJECT
//$ops = $rbacreview->getOperationsOfRole($role_obj->getId(),"rolf",$rolf_obj->getRefId());
//$rbacadmin->grantPermission($role_obj->getId(),$ops,$rolf_obj->getRefId());
// CREATE TUTOR ROLE
// CREATE ROLE AND ASSIGN ROLE TO ROLEFOLDER...
$role_obj = $rolf_obj->createRole("il_crs_tutor_".$this->getRefId(),"Tutors of course obj_no.".$this->getId());
$member_id = $role_obj->getId();
// SET PERMISSION TEMPLATE OF NEW LOCAL ROLE
$query = "SELECT obj_id FROM object_data ".
" WHERE type='rolt' AND title='il_crs_tutor'";
$res = $this->ilias->db->getRow($query, DB_FETCHMODE_OBJECT);
$rbacadmin->copyRoleTemplatePermissions($res->obj_id,ROLE_FOLDER_ID,$rolf_obj->getRefId(),$role_obj->getId());
// SET OBJECT PERMISSIONS OF COURSE OBJECT
$ops = $rbacreview->getOperationsOfRole($role_obj->getId(),"crs",$rolf_obj->getRefId());
$rbacadmin->grantPermission($role_obj->getId(),$ops,$this->getRefId());
// SET OBJECT PERMISSIONS OF ROLE FOLDER OBJECT
//$ops = $rbacreview->getOperationsOfRole($role_obj->getId(),"rolf",$rolf_obj->getRefId());
//$rbacadmin->grantPermission($role_obj->getId(),$ops,$rolf_obj->getRefId());
// CREATE MEMBER ROLE
// CREATE ROLE AND ASSIGN ROLE TO ROLEFOLDER...
$role_obj = $rolf_obj->createRole("il_crs_member_".$this->getRefId(),"Member of course obj_no.".$this->getId());
$member_id = $role_obj->getId();
// SET PERMISSION TEMPLATE OF NEW LOCAL ROLE
$query = "SELECT obj_id FROM object_data ".
" WHERE type='rolt' AND title='il_crs_member'";
$res = $this->ilias->db->getRow($query, DB_FETCHMODE_OBJECT);
$rbacadmin->copyRoleTemplatePermissions($res->obj_id,ROLE_FOLDER_ID,$rolf_obj->getRefId(),$role_obj->getId());
// SET OBJECT PERMISSIONS OF COURSE OBJECT
$ops = $rbacreview->getOperationsOfRole($role_obj->getId(),"crs",$rolf_obj->getRefId());
$rbacadmin->grantPermission($role_obj->getId(),$ops,$this->getRefId());
// SET OBJECT PERMISSIONS OF ROLE FOLDER OBJECT
//$ops = $rbacreview->getOperationsOfRole($role_obj->getId(),"rolf",$rolf_obj->getRefId());
//$rbacadmin->grantPermission($role_obj->getId(),$ops,$rolf_obj->getRefId());
unset($role_obj);
unset($rolf_obj);
// Break inheritance, create local roles and initialize permission
// settings depending on course status.
return true;
}

+ Here is the call graph for this function:

ilObjCourse::initWaitingList ( )

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

References ilObject\getId().

{
include_once "./Modules/Course/classes/class.ilCourseWaitingList.php";
if(!is_object($this->waiting_list_obj))
{
$this->waiting_list_obj = new ilCourseWaitingList($this->getId());
}
return true;
}

+ Here is the call graph for this function:

ilObjCourse::inSubscriptionTime ( )

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

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

{
{
return true;
}
if(time() > $this->getSubscriptionStart() and time() < $this->getSubscriptionEnd())
{
return true;
}
return false;
}

+ Here is the call graph for this function:

ilObjCourse::isActivated (   $a_check_archive = false)

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

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

{
if($a_check_archive)
{
if($this->isArchived())
{
return true;
}
}
if($this->getOfflineStatus())
{
return false;
}
{
return true;
}
if(time() < $this->getActivationStart() or
time() > $this->getActivationEnd())
{
return false;
}
return true;
}

+ Here is the call graph for this function:

ilObjCourse::isArchived ( )

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

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

Referenced by isActivated().

{
{
return false;
}
if(time() < $this->getArchiveStart() or time() > $this->getArchiveEnd())
{
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::isSubscriptionMembershipLimited ( )

is membership limited

public

Parameters
@return

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

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

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

+ Here is the caller graph for this function:

ilObjCourse::MDUpdateListener (   $a_element)

Overwriten Metadata update listener for ECS functionalities.

public

Reimplemented from ilObject.

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

References $ilLog, and updateECSContent().

{
global $ilLog;
switch($a_element)
{
case 'General':
$this->updateECSContent();
break;
default:
return true;
}
}

+ Here is the call graph for this function:

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

Prepare calendar appointments.

protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

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

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

{
include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
include_once('./Services/Calendar/classes/class.ilDateTime.php');
switch($a_mode)
{
case 'create':
case 'update':
if(!$this->getActivationUnlimitedStatus() and !$this->getOfflineStatus())
{
$app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_START);
$app->setTitle($this->getTitle());
$app->setSubtitle('crs_cal_activation_start');
$app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
$app->setDescription($this->getLongDescription());
$app->setStart(new ilDateTime($this->getActivationStart(),IL_CAL_UNIX));
$apps[] = $app;
$app = new ilCalendarAppointmentTemplate(self::CAL_ACTIVATION_END);
$app->setTitle($this->getTitle());
$app->setSubtitle('crs_cal_activation_end');
$app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
$app->setDescription($this->getLongDescription());
$app->setStart(new ilDateTime($this->getActivationEnd(),IL_CAL_UNIX));
$apps[] = $app;
}
{
$app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
$app->setTitle($this->getTitle());
$app->setSubtitle('crs_cal_reg_start');
$app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
$app->setDescription($this->getLongDescription());
$app->setStart(new ilDateTime($this->getSubscriptionStart(),IL_CAL_UNIX));
$apps[] = $app;
$app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
$app->setTitle($this->getTitle());
$app->setSubtitle('crs_cal_reg_end');
$app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
$app->setDescription($this->getLongDescription());
$app->setStart(new ilDateTime($this->getSubscriptionEnd(),IL_CAL_UNIX));
$apps[] = $app;
}
return $apps ? $apps : array();
case 'delete':
// Nothing to do: The category and all assigned appointments will be deleted.
return array();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::read (   $a_force_db = false)

read object data from db into object

Parameters
booleanpublic

Reimplemented from ilObject.

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

References __readSettings(), and ilContainer\read().

{
parent::read($a_force_db);
$this->__readSettings();
}

+ Here is the call graph for this function:

ilObjCourse::setAboStatus (   $a_status)

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

Referenced by __readSettings().

{
$this->abo = $a_status;
}

+ Here is the caller graph for this function:

ilObjCourse::setActivationEnd (   $a_value)

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

Referenced by __readSettings().

{
$this->activation_end = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setActivationStart (   $a_value)

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

Referenced by __readSettings().

{
$this->activation_start = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setActivationType (   $a_type)

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

Referenced by __readSettings().

{
$this->activation_type = $a_type;
}

+ Here is the caller graph for this function:

ilObjCourse::setArchiveEnd (   $a_value)

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

Referenced by __readSettings().

{
$this->archive_end = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setArchiveStart (   $a_value)

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

Referenced by __readSettings().

{
$this->archive_start = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setArchiveType (   $a_value)

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

Referenced by __readSettings().

{
$this->archive_type = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setContactConsultation (   $a_value)

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

Referenced by __readSettings().

{
$this->contact_consultation = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setContactEmail (   $a_value)

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

Referenced by __readSettings().

{
$this->contact_email = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setContactName (   $a_cn)

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

Referenced by __readSettings().

{
$this->contact_name = $a_cn;
}

+ Here is the caller graph for this function:

ilObjCourse::setContactPhone (   $a_value)

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

Referenced by __readSettings().

{
$this->contact_phone = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setContactResponsibility (   $a_value)

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

Referenced by __readSettings().

{
$this->contact_responsibility = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setEnableCourseMap (   $a_enablemap)

Set Enable Course Map.

Parameters
boolean$a_enablemapEnable Course Map

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

Referenced by __readSettings().

{
$this->enablemap = $a_enablemap;
}

+ Here is the caller graph for this function:

ilObjCourse::setImportantInformation (   $a_info)

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

Referenced by __readSettings().

{
$this->important = $a_info;
}

+ Here is the caller graph for this function:

ilObjCourse::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by __readSettings().

{
$this->latitude = $a_latitude;
}

+ Here is the caller graph for this function:

ilObjCourse::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

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

Referenced by __readSettings().

{
$this->locationzoom = $a_locationzoom;
}

+ Here is the caller graph for this function:

ilObjCourse::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by __readSettings().

{
$this->longitude = $a_longitude;
}

+ Here is the caller graph for this function:

ilObjCourse::setMessage (   $a_message)

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

Referenced by validate().

{
$this->message = $a_message;
}

+ Here is the caller graph for this function:

ilObjCourse::setShowMembers (   $a_status)

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

Referenced by __readSettings().

{
$this->show_members = $a_status;
}

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionEnd (   $a_value)

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

Referenced by __readSettings().

{
$this->subscription_end = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionLimitationType (   $a_type)

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

Referenced by __readSettings().

{
$this->subscription_limitation_type = $a_type;
}

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionMaxMembers (   $a_value)

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

Referenced by __readSettings().

{
$this->subscription_max_members = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionNotify (   $a_value)

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

Referenced by __readSettings().

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

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionPassword (   $a_value)

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

Referenced by __readSettings().

{
$this->subscription_password = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionStart (   $a_value)

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

Referenced by __readSettings().

{
$this->subscription_start = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setSubscriptionType (   $a_value)

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

Referenced by __readSettings().

{
$this->subscription_type = $a_value;
}

+ Here is the caller graph for this function:

ilObjCourse::setSyllabus (   $a_syllabus)

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

Referenced by __readSettings().

{
$this->syllabus = $a_syllabus;
}

+ Here is the caller graph for this function:

ilObjCourse::setViewMode (   $a_mode)

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

Referenced by __readSettings().

{
$this->view_mode = $a_mode;
}

+ Here is the caller graph for this function:

ilObjCourse::update ( )

update complete object

Reimplemented from ilObject.

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

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

{
global $ilAppEventHandler;
include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
$sorting = new ilContainerSortingSettings($this->getId());
$sorting->setSortMode($this->getOrderType());
$sorting->update();
$this->updateMetaData();
$this->updateSettings();
$ilAppEventHandler->raise('Modules/Course',
'update',
array('object' => $this,
'obj_id' => $this->getId(),
'appointments' => $this->prepareAppointments('update')));
}

+ Here is the call graph for this function:

ilObjCourse::updateECSContent ( )

Update ECS Content.

public

Parameters

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

References $ilLog, and ilECSSettings\_getInstance().

Referenced by MDUpdateListener().

{
global $ilLog;
include_once('./Services/WebServices/ECS/classes/class.ilECSSettings.php');
if(!$settings->isEnabled())
{
return true;
}
try
{
// Update ECS EContent
include_once('./Services/WebServices/ECS/classes/class.ilECSContentWriter.php');
$writer = new ilECSContentWriter($this);
$writer->refreshSettings();
}
catch(ilException $exc)
{
$ilLog->write(__METHOD__.': Cannot save ECS settings. '.$exc->getMessage());
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::updateSettings ( )

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

References $res, __createDefaultSettings(), enabledWaitingList(), getAboStatus(), getActivationEnd(), getActivationStart(), getActivationType(), getArchiveEnd(), getArchiveStart(), getArchiveType(), getContactConsultation(), getContactEmail(), getContactName(), getContactPhone(), getContactResponsibility(), getEnableCourseMap(), ilObject\getId(), getImportantInformation(), getLatitude(), getLocationZoom(), getLongitude(), getShowMembers(), getSubscriptionEnd(), getSubscriptionLimitationType(), getSubscriptionMaxMembers(), getSubscriptionNotify(), getSubscriptionPassword(), getSubscriptionStart(), getSubscriptionType(), getSyllabus(), getViewMode(), and isSubscriptionMembershipLimited().

Referenced by update().

{
global $ilDB;
// Due to a bug 3.5.alpha maybe no settings exist. => create default settings
$query = "SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->getId())." ";
$res = $ilDB->query($query);
if(!$res->numRows())
{
}
$query = "UPDATE crs_settings SET ".
"syllabus = ".$ilDB->quote($this->getSyllabus()).", ".
"contact_name = ".$ilDB->quote($this->getContactName()).", ".
"contact_responsibility = ".$ilDB->quote($this->getContactResponsibility()).", ".
"contact_phone = ".$ilDB->quote($this->getContactPhone()).", ".
"contact_email = ".$ilDB->quote($this->getContactEmail()).", ".
"contact_consultation = ".$ilDB->quote($this->getContactConsultation()).", ".
"activation_type = ".$ilDB->quote($this->getActivationType()).", ".
#"activation_unlimited = '".(int) $this->getActivationUnlimitedStatus()."', ".
"activation_start = ".$ilDB->quote($this->getActivationStart()).", ".
"activation_end = ".$ilDB->quote($this->getActivationEnd()).", ".
#"activation_offline = '".(int) $this->getOfflineStatus()."', ".
"subscription_limitation_type = ".$ilDB->quote($this->getSubscriptionLimitationType()).", ".
#"subscription_unlimited = '".(int) $this->getSubscriptionUnlimitedStatus()."', ".
"subscription_start = ".$ilDB->quote($this->getSubscriptionStart()).", ".
"subscription_end = ".$ilDB->quote($this->getSubscriptionEnd()).", ".
"subscription_type = ".$ilDB->quote($this->getSubscriptionType()).", ".
"subscription_password = ".$ilDB->quote($this->getSubscriptionPassword()).", ".
"subscription_membership_limitation = ".$ilDB->quote((int) $this->isSubscriptionMembershipLimited()).", ".
"subscription_max_members = ".$ilDB->quote($this->getSubscriptionMaxMembers()).", ".
"subscription_notify = ".$ilDB->quote($this->getSubscriptionNotify()).", ".
"view_mode = ".$ilDB->quote($this->getViewMode()).", ".
"archive_start = ".$ilDB->quote($this->getArchiveStart()).", ".
"archive_end = ".$ilDB->quote($this->getArchiveEnd()).", ".
"archive_type = ".$ilDB->quote($this->getArchiveType()).", ".
"abo = ".$ilDB->quote($this->getAboStatus()).", ".
#"objective_view = '".(int) $this->enabledObjectiveView()."', ".
"waiting_list = ".$ilDB->quote($this->enabledWaitingList()).", ".
"important = ".$ilDB->quote($this->getImportantInformation()).", ".
"show_members = ".$ilDB->quote($this->getShowMembers()).", ".
"latitude = ".$ilDB->quote($this->getLatitude()).", ".
"longitude = ".$ilDB->quote($this->getLongitude()).", ".
"location_zoom = ".$ilDB->quote($this->getLocationZoom()).", ".
"enable_course_map = ".$ilDB->quote($this->getEnableCourseMap())." ".
"WHERE obj_id = ".$ilDB->quote($this->getId())."";
$res = $ilDB->query($query);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourse::validate ( )

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

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

{
$this->setMessage('');
#if(($this->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED) and
# $this->getSubscriptionType() == )
#{
# $this->appendMessage($this->lng->txt('crs_select_registration_type'));
#}
$this->getActivationEnd() < $this->getActivationStart())
{
$this->appendMessage($this->lng->txt("activation_times_not_valid"));
}
{
$this->appendMessage($this->lng->txt("subscription_times_not_valid"));
}
#if((!$this->getActivationUnlimitedStatus() and
# !$this->getSubscriptionUnlimitedStatus()) and
# ($this->getSubscriptionStart() > $this->getActivationEnd() or
# $this->getSubscriptionStart() < $this->getActivationStart() or
# $this->getSubscriptionEnd() > $this->getActivationEnd() or
# $this->getSubscriptionEnd() < $this->getActivationStart()))
#
#{
# $this->appendMessage($this->lng->txt("subscription_time_not_within_activation"));
#}
{
$this->appendMessage($this->lng->txt("crs_password_required"));
}
if($this->isSubscriptionMembershipLimited() and ($this->getSubscriptionMaxMembers() <= 0 or !is_numeric($this->getSubscriptionMaxMembers())))
{
$this->appendMessage($this->lng->txt("max_members_not_numeric"));
}
if(($this->getViewMode() == IL_CRS_VIEW_ARCHIVE) and
$this->getArchiveStart() > $this->getArchiveEnd())
{
$this->appendMessage($this->lng->txt("archive_times_not_valid"));
}
return $this->getMessage() ? false : true;
}

+ Here is the call graph for this function:

ilObjCourse::validateInfoSettings ( )

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

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

{
global $ilErr;
$error = false;
if($this->getContactEmail()) {
$emails = split(",",$this->getContactEmail());
foreach ($emails as $email) {
$email = trim($email);
if (!(ilUtil::is_email($email) or ilObjUser::getUserIdByLogin($email)))
{
$ilErr->appendMessage($this->lng->txt('contact_email_not_valid')." '".$email."'");
$error = true;
}
}
}
return !$error;
}

+ Here is the call graph for this function:

Field Documentation

ilObjCourse::$archives_obj

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

ilObjCourse::$items_obj

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

Referenced by getCourseItemObject().

ilObjCourse::$members_obj

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

const ilObjCourse::CAL_ACTIVATION_END = 4

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

const ilObjCourse::CAL_ACTIVATION_START = 3

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

const ilObjCourse::CAL_REG_END = 2

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

const ilObjCourse::CAL_REG_START = 1

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


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