24 require_once
"./Services/Container/classes/class.ilContainer.php";
25 include_once
'./Modules/Course/classes/class.ilCourseConstants.php';
26 include_once
'./Services/Membership/interfaces/interface.ilMembershipRegistrationCodes.php';
84 #define("ILIAS_MODULE","course"); 85 #define("KEEP_IMAGE_PATH",1); 87 $this->SUBSCRIPTION_DEACTIVATED = 1;
88 $this->SUBSCRIPTION_CONFIRMATION = 2;
89 $this->SUBSCRIPTION_DIRECT = 3;
90 $this->SUBSCRIPTION_PASSWORD = 4;
91 $this->SUBSCRIPTION_AUTOSUBSCRIPTION = 5;
92 $this->ARCHIVE_DISABLED = 1;
93 $this->ARCHIVE_READ = 2;
94 $this->ARCHIVE_DOWNLOAD = 3;
95 $this->ABO_ENABLED = 1;
96 $this->ABO_DISABLED = 0;
97 $this->SHOW_MEMBERS_ENABLED = 1;
98 $this->SHOW_MEMBERS_DISABLED = 0;
103 parent::__construct($a_id,$a_call_by_reference);
114 $query =
'SELECT show_members FROM crs_settings '.
115 'WHERE obj_id = '.$GLOBALS[
'ilDB']->quote($a_obj_id,
'integer');
119 return (
bool)
$row->show_members;
140 $this->reg_access_code = $a_code;
159 $this->reg_access_code_enabled = $a_status;
164 return $this->important;
168 $this->important = $a_info;
172 return $this->syllabus;
176 $this->syllabus = $a_syllabus;
180 return $this->contact_name;
184 $this->contact_name = $a_cn;
188 return $this->contact_consultation;
192 $this->contact_consultation = $a_value;
196 return $this->contact_phone;
200 $this->contact_phone = $a_value;
204 return $this->contact_email;
208 $this->contact_email = $a_value;
212 return $this->contact_responsibility;
216 $this->contact_responsibility = $a_value;
220 return (
int) $this->activation_type;
231 $this->activation_type = $a_type;
239 return $this->activation_start ? $this->activation_start : time();
243 $this->activation_start = $a_value;
247 return $this->activation_end ? $this->activation_end : mktime(0,0,0,12,12,date(
"Y",time())+2);
251 $this->activation_end = $a_value;
255 return (
bool)$this->activation_offline;
259 $this->activation_offline = (bool) $a_value;
263 $this->activation_visibility = (bool) $a_value;
267 return $this->activation_visibility;
272 return $this->subscription_limitation_type;
276 $this->subscription_limitation_type = $a_type;
284 return $this->subscription_start ? $this->subscription_start : time();
288 $this->subscription_start = $a_value;
292 return $this->subscription_end ? $this->subscription_end : mktime(0,0,0,12,12,date(
"Y",time())+2);
296 $this->subscription_end = $a_value;
301 #return $this->subscription_type ? $this->subscription_type : $this->SUBSCRIPTION_DEACTIVATED; 305 $this->subscription_type = $a_value;
309 return $this->subscription_password;
313 $this->subscription_password = $a_value;
322 return (
bool) $this->waiting_list;
327 $this->waiting_list = (bool) $a_status;
350 $this->session_limit = $a_status;
367 $this->subscription_membership_limitation = $a_status;
377 $this->session_prev = $a_num;
396 $this->session_next = $a_num;
416 return (
bool) $this->subscription_membership_limitation;
421 return $this->subscription_max_members;
425 $this->subscription_max_members = $a_value;
440 $query =
"SELECT * FROM crs_settings ".
441 "WHERE obj_id = ".$ilDB->quote($a_course_id ,
'integer').
" ".
442 "AND sub_notify = 1";
444 return $res->numRows() ? true :
false;
453 public function getSubItems($a_admin_panel_enabled =
false, $a_include_side_block =
false)
458 if (is_array($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block]))
460 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
464 parent::getSubItems($a_admin_panel_enabled,$a_include_side_block);
467 if(!$a_admin_panel_enabled &&
468 !$a_include_side_block &&
469 $this->items[
'sess'] &&
470 is_array($this->items[
'sess']) &&
479 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
486 if(isset(
$_GET[
'crs_prev_sess']))
488 $ilUser->writePref(
'crs_sess_show_prev_'.$this->
getId(), (
string) (
int)
$_GET[
'crs_prev_sess']);
490 if(isset(
$_GET[
'crs_next_sess']))
492 $ilUser->writePref(
'crs_sess_show_next_'.$this->
getId(), (
string) (
int)
$_GET[
'crs_next_sess']);
497 $previous = $current = $next = array();
498 foreach($sessions as $key => $item)
516 $num_previous_remove = max(
520 while($num_previous_remove--)
522 if(!$ilUser->getPref(
'crs_sess_show_prev_'.$this->getId()))
524 array_shift($previous);
526 $this->items[
'sess_link'][
'prev'][
'value'] = 1;
529 $num_next_remove = max(
533 while($num_next_remove--)
535 if(!$ilUser->getPref(
'crs_sess_show_next_'.$this->getId()))
540 $this->items[
'sess_link'][
'next'][
'value'] = 1;
543 $sessions = array_merge($previous,$current,$next);
544 $this->items[
'sess'] = $sessions;
547 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
549 $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block] = $sort->sortItems($this->items);
551 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
557 return $this->subscription_notify ? true :
false;
561 $this->subscription_notify = $a_value ? true :
false;
566 $this->view_mode = $a_mode;
570 return $this->view_mode;
577 $query =
"SELECT view_mode FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id ,
'integer').
" ";
581 return $row->view_mode;
590 $query =
"SELECT abo FROM crs_settings WHERE obj_id = ".$ilDB->quote($a_id ,
'integer').
" ";
601 return $this->archive_start ? $this->archive_start : time();
605 $this->archive_start = $a_value;
609 return $this->archive_end ? $this->archive_end : mktime(0,0,0,12,12,date(
"Y",time())+2);
613 $this->archive_end = $a_value;
621 $this->archive_type = $a_value;
625 $this->abo = $a_status;
633 $this->show_members = $a_status;
637 return $this->show_members;
647 $this->mail_members = $a_type;
661 return $this->message;
665 $this->message = $a_message;
671 $this->message .=
"<br /> ";
673 $this->message .= $a_message;
709 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
721 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
740 return $this->ABO == $this->ABO_ENABLED;
743 function read($a_force_db =
false)
745 parent::read($a_force_db);
747 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
754 global $ilAppEventHandler;
756 parent::create($a_upload);
764 $ilAppEventHandler->raise(
'Modules/Course',
766 array(
'object' => $this,
767 'obj_id' => $this->
getId(),
779 $this->latitude = $a_latitude;
799 $this->longitude = $a_longitude;
819 $this->locationzoom = $a_locationzoom;
839 $this->enablemap = $a_enablemap;
864 $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
870 $new_obj->getMemberObject()->add($ilUser->getId(),
IL_CRS_ADMIN);
874 if($cwo->isRootNode($this->getRefId()))
883 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
887 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
891 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
893 $obj_settings->cloneSettings($new_obj->getId());
894 unset($obj_settings);
898 $ilLog->write(__METHOD__.
': '.$this->getBigIconPath().
' '.$this->
getSmallIconPath());
904 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
905 include_once
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
908 $cert->cloneCertificate($newcert);
923 parent::cloneDependencies($a_target_id,$a_copy_id);
926 include_once(
'Services/Container/classes/class.ilContainerStartObjects.php');
928 $start->cloneDependencies($a_target_id,$a_copy_id);
931 include_once(
'Services/Object/classes/class.ilObjectActivation.php');
934 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
938 include_once(
'Modules/Course/classes/class.ilCourseObjective.php');
940 $crs_objective->ilClone($a_target_id,$a_copy_id);
954 global
$ilLog,$rbacadmin,$rbacreview;
957 $new_admin = $new_obj->getDefaultAdminRole();
959 if(!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId())
961 $ilLog->write(__METHOD__.
' : Error cloning auto generated role: il_crs_admin');
963 $rbacadmin->copyRolePermissions($admin,$this->
getRefId(),$new_obj->getRefId(),$new_admin,
true);
964 $ilLog->write(__METHOD__.
' : Finished copying of role crs_admin.');
967 $new_tutor = $new_obj->getDefaultTutorRole();
968 if(!$tutor || !$new_tutor)
970 $ilLog->write(__METHOD__.
' : Error cloning auto generated role: il_crs_tutor');
972 $rbacadmin->copyRolePermissions($tutor,$this->
getRefId(),$new_obj->getRefId(),$new_tutor,
true);
973 $ilLog->write(__METHOD__.
' : Finished copying of role crs_tutor.');
976 $new_member = $new_obj->getDefaultMemberRole();
977 if(!$member || !$new_member)
979 $ilLog->write(__METHOD__.
' : Error cloning auto generated role: il_crs_member');
981 $rbacadmin->copyRolePermissions($member,$this->
getRefId(),$new_obj->getRefId(),$new_member,
true);
982 $ilLog->write(__METHOD__.
' : Finished copying of role crs_member.');
992 #if(($this->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED) and 993 # $this->getSubscriptionType() == ) 995 # $this->appendMessage($this->lng->txt('crs_select_registration_type')); 1001 $this->
appendMessage($this->lng->txt(
"activation_times_not_valid"));
1006 $this->
appendMessage($this->lng->txt(
"subscription_times_not_valid"));
1008 #if((!$this->getActivationUnlimitedStatus() and 1009 # !$this->getSubscriptionUnlimitedStatus()) and 1010 # ($this->getSubscriptionStart() > $this->getActivationEnd() or 1011 # $this->getSubscriptionStart() < $this->getActivationStart() or 1012 # $this->getSubscriptionEnd() > $this->getActivationEnd() or 1013 # $this->getSubscriptionEnd() < $this->getActivationStart())) 1016 # $this->appendMessage($this->lng->txt("subscription_time_not_within_activation")); 1020 $this->
appendMessage($this->lng->txt(
"crs_password_required"));
1024 $this->
appendMessage($this->lng->txt(
"max_members_not_numeric"));
1029 $this->
appendMessage($this->lng->txt(
"archive_times_not_valid"));
1047 foreach ($emails as $email) {
1048 $email = trim($email);
1051 $ilErr->appendMessage($this->lng->txt(
'contact_email_not_valid').
" '".$email.
"'");
1077 global $ilAppEventHandler;
1080 if (!parent::delete())
1092 include_once(
'Modules/Course/classes/class.ilCourseParticipants.php');
1096 $this->archives_obj->deleteAll();
1098 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
1101 include_once
'./Modules/Course/classes/class.ilObjCourseGrouping.php';
1104 include_once
'./Modules/Course/classes/class.ilCourseFile.php';
1107 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1110 $ilAppEventHandler->raise(
'Modules/Course',
1112 array(
'object' => $this,
1113 'obj_id' => $this->
getId(),
1127 global $ilAppEventHandler,
$ilLog;
1129 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
1138 $ilAppEventHandler->raise(
'Modules/Course',
1140 array(
'object' => $this,
1141 'obj_id' => $this->
getId(),
1152 $query =
"SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer').
" ";
1155 if(!
$res->numRows())
1160 $query =
"UPDATE crs_settings SET ".
1161 "syllabus = ".$ilDB->quote($this->
getSyllabus() ,
'text').
", ".
1162 "contact_name = ".$ilDB->quote($this->
getContactName() ,
'text').
", ".
1164 "contact_phone = ".$ilDB->quote($this->
getContactPhone() ,
'text').
", ".
1165 "contact_email = ".$ilDB->quote($this->
getContactEmail() ,
'text').
", ".
1167 "activation_type = ".$ilDB->quote(!$this->
getOfflineStatus() ,
'integer').
", ".
1176 "view_mode = ".$ilDB->quote($this->
getViewMode() ,
'integer').
", ".
1177 "archive_start = ".$ilDB->quote($this->
getArchiveStart() ,
'integer').
", ".
1178 "archive_end = ".$ilDB->quote($this->
getArchiveEnd() ,
'integer').
", ".
1179 "archive_type = ".$ilDB->quote($this->
getArchiveType() ,
'integer').
", ".
1180 "abo = ".$ilDB->quote($this->
getAboStatus() ,
'integer').
", ".
1183 "show_members = ".$ilDB->quote($this->
getShowMembers() ,
'integer').
", ".
1184 "latitude = ".$ilDB->quote($this->
getLatitude() ,
'text').
", ".
1185 "longitude = ".$ilDB->quote($this->
getLongitude() ,
'text').
", ".
1186 "location_zoom = ".$ilDB->quote($this->
getLocationZoom() ,
'integer').
", ".
1187 "enable_course_map = ".$ilDB->quote((
int) $this->
getEnableCourseMap() ,
'integer').
", ".
1196 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer').
"";
1204 include_once
"./Services/Object/classes/class.ilObjectActivation.php";
1220 $item->update($this->ref_id);
1266 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1284 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1287 $query =
"INSERT INTO crs_settings (obj_id,syllabus,contact_name,contact_responsibility,".
1288 "contact_phone,contact_email,contact_consultation,activation_type,activation_start,".
1289 "activation_end,sub_limitation_type,sub_start,sub_end,sub_type,sub_password,sub_mem_limit,".
1290 "sub_max_members,sub_notify,view_mode,archive_start,archive_end,archive_type,abo," .
1291 "latitude,longitude,location_zoom,enable_course_map,waiting_list,show_members, ".
1292 "session_limit,session_prev,session_next, reg_ac_enabled, reg_ac, auto_notification, status_dt,mail_members_type) ".
1294 $ilDB->quote($this->
getId() ,
'integer').
", ".
1301 $ilDB->quote(0 ,
'integer').
", ".
1316 $ilDB->quote($this->ABO_ENABLED ,
'integer').
", ".
1321 #"objective_view = '0', ". 1337 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
1348 $query =
"SELECT * FROM crs_settings WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer').
"";
1393 include_once
"./Services/Object/classes/class.ilObjectActivation.php";
1395 switch($activation[
"timing_type"])
1420 include_once
"./Modules/Course/classes/class.ilCourseWaitingList.php";
1422 if(!is_object($this->waiting_list_obj))
1439 include_once
"./Modules/Course/classes/class.ilCourseParticipant.php";
1453 include_once
"./Modules/Course/classes/class.ilCourseParticipants.php";
1486 include_once
"./Modules/Course/classes/class.ilCourseArchives.php";
1488 if(!is_object($this->archives_obj))
1500 global $rbacadmin,$rbacreview,
$ilDB;
1502 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1505 "Admin of crs obj_no.".$this->
getId(),
1511 "Tutor of crs obj_no.".$this->
getId(),
1516 'il_crs_member_'.$this->
getRefId(),
1517 "Member of crs obj_no.".$this->
getId(),
1536 global $rbacadmin, $rbacreview;
1538 $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1539 foreach((array) $parent_roles as $parent_role)
1541 $rbacadmin->initIntersectionPermissions(
1543 $parent_role[
'obj_id'],
1544 $parent_role[
'parent'],
1561 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_crs_non_member'";
1565 return $row[
"obj_id"];
1576 $query =
'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote(
'rolt',
'text').
' AND title = '.$ilDB->quote(
'il_crs_non_member',
'text');
1580 return isset(
$row[
'obj_id']) ?
$row[
'obj_id'] : 0;
1591 global $rbacadmin,$rbacreview;
1593 if (empty($this->local_roles))
1595 $this->local_roles = array();
1596 $role_arr = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
1598 foreach ($role_arr as $role_id)
1600 if ($rbacreview->isAssignable($role_id,$this->getRefId()) ==
true)
1602 $role_Obj = $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1610 $role_name = $role_Obj->getTitle();
1612 $this->local_roles[$role_name] = $role_Obj->getId();
1617 return $this->local_roles;
1633 global $rbacadmin, $rbacreview;
1635 if (strlen($a_crs_id) > 0)
1637 $crs_id = $a_crs_id;
1644 $role_arr = $rbacreview->getRolesOfRoleFolder($crs_id);
1646 foreach ($role_arr as $role_id)
1648 $role_Obj =& $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1650 $crs_Member =
"il_crs_member_".$crs_id;
1651 $crs_Admin =
"il_crs_admin_".$crs_id;
1652 $crs_Tutor =
"il_crs_tutor_".$crs_id;
1654 if (strcmp($role_Obj->getTitle(), $crs_Member) == 0 )
1656 $arr_crsDefaultRoles[
"crs_member_role"] = $role_Obj->getId();
1659 if (strcmp($role_Obj->getTitle(), $crs_Admin) == 0)
1661 $arr_crsDefaultRoles[
"crs_admin_role"] = $role_Obj->getId();
1664 if (strcmp($role_Obj->getTitle(), $crs_Tutor) == 0)
1666 $arr_crsDefaultRoles[
"crs_tutor_role"] = $role_Obj->getId();
1670 return $arr_crsDefaultRoles;
1679 return $rbacreview->getRolesOfRoleFolder($this->
getRefId(),
false);
1686 $query =
"DELETE FROM crs_settings ".
1687 "WHERE obj_id = ".$ilDB->quote($this->
getId() ,
'integer').
" ";
1698 foreach($local_roles as $role_id)
1701 if(substr(
$title,0,8) ==
'il_crs_m')
1712 foreach($local_roles as $role_id)
1716 if(!strcmp($tmp_role->getTitle(),
"il_crs_tutor_".$this->getRefId()))
1728 foreach($local_roles as $role_id)
1732 if(!strcmp($tmp_role->getTitle(),
"il_crs_admin_".$this->getRefId()))
1745 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
1748 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1752 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1766 parent::MDUpdateListener($a_element);
1772 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1774 $ecs->handleContentUpdate();
1788 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
1801 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1802 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1812 $app->setSubtitle(
'crs_cal_activation_start');
1820 $app->setSubtitle(
'crs_cal_activation_end');
1830 $app->setSubtitle(
'crs_cal_reg_start');
1838 $app->setSubtitle(
'crs_cal_reg_end');
1845 return $apps ? $apps : array();
1853 ###### Interface ilMembershipRegistrationCodes 1862 $query =
"SELECT obj_id FROM crs_settings ".
1863 "WHERE reg_ac_enabled = ".$ilDB->quote(1,
'integer').
" ".
1864 "AND reg_ac = ".$ilDB->quote($a_code,
'text');
1870 $obj_ids[] =
$row->obj_id;
1884 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1885 include_once
"./Modules/Course/classes/class.ilCourseParticipants.php";
1888 if($part->isAssigned($a_user_id))
1893 if(!$a_force_registration)
1898 include_once
'./Modules/Group/classes/class.ilObjGroupAccess.php';
1903 ', course subscription is deactivated.',
'456');
1913 ', course is out of registration time.',
'789');
1921 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
1925 $waiting_list->addToList($a_user_id);
1926 $this->lng->loadLanguageModule(
"crs");
1927 $info = sprintf($this->lng->txt(
'crs_added_to_list'),
1928 $waiting_list->getPosition($a_user_id));
1929 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
1931 $participants->sendNotification($participants->NOTIFY_WAITING_LIST,$a_user_id);
1939 ', membership is limited.',
'123');
1944 $part->add($a_user_id,$a_role);
1945 $part->sendNotification($part->NOTIFY_ACCEPT_USER, $a_user_id);
1946 $part->sendNotification($part->NOTIFY_ADMINS,$a_user_id);
1949 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1975 $this->auto_notification = $value;
1985 $a_value = (int)$a_value;
1988 if($a_value == self::STATUS_DETERMINATION_LP)
1990 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1993 $a_value = self::STATUS_DETERMINATION_MANUAL;
1997 $this->status_dt = $a_value;
2015 include_once
"Services/Tracking/classes/class.ilLPStatusWrapper.php";
2033 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
2037 include_once(
"Services/Tracking/classes/class.ilLPStatus.php");
2040 $this->
getMembersObject()->updatePassed($a_member_id, $has_completed,
false,
true);
2050 return parent::getOrderType();
const LP_STATUS_COMPLETED_NUM
getSubscriptionPassword()
setActivationEnd($a_value)
setSubscriptionNotify($a_value)
const IL_CRS_ACTIVATION_LIMITED
setContactResponsibility($a_value)
getMailToMembersType()
Get mail to members type.
setSubscriptionStart($a_value)
setSubscriptionEnd($a_value)
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
const IL_CRS_SUBSCRIPTION_LIMITED
getSubscriptionMaxMembers()
const IL_CRS_VIEW_OBJECTIVE
setNumberOfPreviousSessions($a_num)
Set number of previous sessions.
getLongitude()
Get Longitude.
setAutoNotification($value)
Sets automatic notification status in $this->auto_notification, using given $status.
static cloneSettings($a_copy_id, $a_container_id, $a_new_container_id)
Clone settings.
static lookupObjectsByCode($a_code)
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.
isActivated($a_check_archive=false)
getActivationVisibility()
setParentRolePermissions($a_parent_ref)
This method is called before "initDefaultRoles".
getDefaultCourseRoles($a_crs_id="")
get default course roles, returns the defaultlike create roles il_crs_tutor, il_crs_admin and il_crs_...
const IL_CAL_TRANSLATION_SYSTEM
static lookupCourseNonMemberTemplatesId()
Lookup course non member id.
setImportantInformation($a_info)
_registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
static _registrationEnabled($a_obj_id)
updateMetaData()
update meta data entry
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.
setMailToMembersType($a_type)
Set mail to members type.
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.
_getTranslation($a_role_title)
static getItem($a_ref_id)
Get item data.
static _isSubscriptionNotificationEnabled($a_course_id)
Check if subscription notification is enabled.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
setContactEmail($a_value)
enableSubscriptionMembershipLimitation($a_status)
enable max members
getBigIconPath()
Get path for big icon.
const TIMINGS_DEACTIVATED
static is_email($a_email)
This preg-based function checks whether an e-mail address is formally valid.
setOfflineStatus($a_value)
createMetaData()
create meta data entry
getTinyIconPath()
Get path for tiny icon.
enableSessionLimit($a_status)
en/disable limited number of sessions
static _lookupTitle($a_id)
lookup object title
Apointment templates are used for automatic generated apointments.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getStatusDetermination()
Get status determination mode.
setSubscriptionPassword($a_value)
static _deleteByContainer($a_container_id)
Delete all fields of a container.
const STATUS_DETERMINATION_LP
addAdditionalSubItemInformation(&$a_item_data)
Add additional information to sub item, e.g.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
setRegistrationAccessCode($a_code)
Set refistration access code.
static _clone($a_source_id, $a_target_id)
Clone fields.
static deleteResultsForUser($a_user_id)
Delete all result entries for user.
__createDefaultSettings()
static _usingRegistrationCode()
Using Registration code.
const IL_CRS_ARCHIVE_NONE
update()
update complete object
const DB_FETCHMODE_OBJECT
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
setLatitude($a_latitude)
Set Latitude.
getUserIdByLogin($a_login)
setEnableCourseMap($a_enablemap)
Set Enable Course Map.
setActivationVisibility($a_value)
static lookupShowMembersEnabled($a_obj_id)
Check if show member is enabled.
Test certificate adapter.
setLocationZoom($a_locationzoom)
Set LocationZoom.
static _enabledLearningProgress()
check wether learing progress is enabled or not
const IL_CRS_SUBSCRIPTION_PASSWORD
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
const CAL_ACTIVATION_START
static _getInstance($a_copy_id)
Get instance of copy wizard options.
getLocationZoom()
Get LocationZoom.
setActivationStart($a_value)
getMemberObject()
Get course member object.
setLongitude($a_longitude)
Set Longitude.
getId()
get object id public
_isActivated($a_obj_id)
Is activated.
Interface for all objects that offer registration with access codes.
getNumberOfNextSessions()
Set number of previous sessions.
setSubscriptionType($a_value)
const IL_CRS_ACTIVATION_OFFLINE
getContactResponsibility()
syncMembersStatusWithLP()
Set course status for all members by lp status.
__getCrsNonMemberTemplateId()
get course non-member template private
static _lookupObjId($a_id)
prepareAppointments($a_mode='create')
Prepare calendar appointments.
ilObjCourse($a_id=0, $a_call_by_reference=true)
Constructor public.
cloneDependencies($a_target_id, $a_copy_id)
Clone object dependencies (start objects, preconditions)
setNumberOfNextSessions($a_num)
Set number of previous sessions.
const IL_CRS_SUBSCRIPTION_UNLIMITED
getTitle()
get object title public
setContactConsultation($a_value)
MDUpdateListener($a_element)
Overwriten Metadata update listener for ECS functionalities.
const IL_CRS_VIEW_ARCHIVE
redirection script todo: (a better solution should control the processing via a xml file) ...
cloneMetaData($target_obj)
Copy meta data.
membership registration exception
const IL_CRS_ADMIN
Base class for course and group participants.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
cloneSettings($new_obj)
Clone entries in settings table.
const STATUS_DETERMINATION_MANUAL
getSubItems($a_admin_panel_enabled=false, $a_include_side_block=false)
Get subitems of container.
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.
getRegistrationAccessCode()
get access code
enableRegistrationAccessCode($a_status)
En/disable registration access code.
getSubscriptionLimitationType()
setTimingType($a_type)
Set timing type.
getLocalCourseRoles($a_translate=false)
get ALL local roles of course, also those created and defined afterwards only fetch data once from da...
getAutoNotification()
Returns automatic notification status from $this->auto_notification.
checkLPStatusSync($a_member_id)
sync course status from lp
getLatitude()
Get Latitude.
getSmallIconPath()
Get path for small icon.
cloneAutoGeneratedRoles($new_obj)
Clone automatic genrated roles (permissions and template permissions)
isSubscriptionMembershipLimited()
is membership limited
setActivationType($a_type)
static generateCode()
Generate new registration key.
setContactPhone($a_value)
getActivationUnlimitedStatus()
initCourseMembersObject()
Init course member object ilObjUser $ilUser.
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
const IL_CRS_ARCHIVE_DOWNLOAD
static _deleteUser($a_usr_id)
Delete user data.
getNumberOfPreviousSessions()
Set number of previous sessions.
getLongDescription()
get object long description (stored in object_description)
setSubscriptionMaxMembers($a_value)
getRefId()
get reference id public
enableWaitingList($a_status)
getSubscriptionUnlimitedStatus()
deleteMetaData()
delete meta data entry
initCourseMemberObject()
Init course member object ilObjUser $ilUser.
const IL_CRS_SUBSCRIPTION_DIRECT
static _lookupSortMode($a_obj_id)
lookup sort mode
cloneObject($a_target_id, $a_copy_id=0)
Clone course (no member data)
static _getInstance($a_obj_id)
get instance by obj_id
_deleteByCourse($a_course_id)
initCourseArchiveObject()
getEnableCourseMap()
Get Enable Course Map.
static checkForumsExistsInsert($ref_id, $user_id=0)
static _isActivated($a_obj_id, &$a_visible_flag=null, $a_mind_member_view=true)
Is activated?
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.
Class ilObjectActivation.
static _cloneFiles($a_source_id, $a_target_id)
Clone course files.
appendMessage($a_message)
getImportantInformation()
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
setShowMembers($a_status)
Class ilECSCourseSettings.
const IL_CRS_SUBSCRIPTION_DEACTIVATED
const IL_CRS_ACTIVATION_UNLIMITED
setStatusDetermination($a_value)
Set status determination mode.
setArchiveStart($a_value)
setSubscriptionLimitationType($a_type)