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';
125 public function __construct($a_id = 0, $a_call_by_reference =
true)
128 #define("ILIAS_MODULE","course"); 129 #define("KEEP_IMAGE_PATH",1); 131 $this->SUBSCRIPTION_DEACTIVATED = 1;
132 $this->SUBSCRIPTION_CONFIRMATION = 2;
133 $this->SUBSCRIPTION_DIRECT = 3;
134 $this->SUBSCRIPTION_PASSWORD = 4;
135 $this->SUBSCRIPTION_AUTOSUBSCRIPTION = 5;
136 $this->ARCHIVE_DISABLED = 1;
137 $this->ARCHIVE_READ = 2;
138 $this->ARCHIVE_DOWNLOAD = 3;
139 $this->ABO_ENABLED = 1;
140 $this->ABO_DISABLED = 0;
141 $this->SHOW_MEMBERS_ENABLED = 1;
142 $this->SHOW_MEMBERS_DISABLED = 0;
147 $this->course_logger =
$GLOBALS[
'DIC']->logger()->crs();
159 $query =
'SELECT show_members FROM crs_settings ' .
160 'WHERE obj_id = ' .
$GLOBALS[
'DIC'][
'ilDB']->quote($a_obj_id,
'integer');
163 return (
bool) $row->show_members;
175 $this->member_export = $a_mem_export;
194 $this->reg_access_code = $a_code;
213 $this->reg_access_code_enabled = $a_status;
218 return $this->important;
222 $this->important = $a_info;
226 return $this->syllabus;
230 $this->syllabus = $a_syllabus;
246 $this->target_group = $a_tg;
251 return $this->contact_name;
255 $this->contact_name = $a_cn;
259 return $this->contact_consultation;
263 $this->contact_consultation = $a_value;
267 return $this->contact_phone;
271 $this->contact_phone = $a_value;
275 return $this->contact_email;
279 $this->contact_email = $a_value;
283 return $this->contact_responsibility;
287 $this->contact_responsibility = $a_value;
300 return $this->activation_start;
304 $this->activation_start = $a_value;
308 return $this->activation_end;
312 $this->activation_end = $a_value;
316 $this->activation_visibility = (bool) $a_value;
320 return $this->activation_visibility;
325 return $this->subscription_limitation_type;
329 $this->subscription_limitation_type = $a_type;
337 return $this->subscription_start;
341 $this->subscription_start = $a_value;
345 return $this->subscription_end;
349 $this->subscription_end = $a_value;
354 #return $this->subscription_type ? $this->subscription_type : $this->SUBSCRIPTION_DEACTIVATED; 358 $this->subscription_type = $a_value;
362 return $this->subscription_password;
366 $this->subscription_password = $a_value;
375 return (
bool) $this->waiting_list;
380 $this->waiting_list = (bool) $a_status;
401 $this->session_limit = $a_status;
418 $this->subscription_membership_limitation = $a_status;
428 $this->session_prev = $a_num;
447 $this->session_next = $a_num;
467 return (
bool) $this->subscription_membership_limitation;
472 return $this->subscription_max_members;
476 $this->subscription_max_members = $a_value;
491 $ilDB = $DIC[
'ilDB'];
493 $query =
"SELECT * FROM crs_settings " .
494 "WHERE obj_id = " .
$ilDB->quote($a_course_id,
'integer') .
" " .
495 "AND sub_notify = 1";
497 return $res->numRows() ? true :
false;
507 $a_admin_panel_enabled =
false,
508 $a_include_side_block =
false,
513 if (is_array($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block])) {
514 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
518 parent::getSubItems($a_admin_panel_enabled, $a_include_side_block, $a_get_single);
522 (
bool) $a_admin_panel_enabled,
523 (
bool) $a_include_side_block
525 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
531 return $this->subscription_notify ? true :
false;
535 $this->subscription_notify = $a_value ? true :
false;
540 $this->view_mode = $a_mode;
544 return $this->view_mode;
555 $ilDB = $DIC[
'ilDB'];
557 $query =
'SELECT timing_mode FROM crs_settings ' .
558 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
562 return (
int) $row->timing_mode;
572 $this->timing_mode = $a_mode;
593 $ilDB = $DIC[
'ilDB'];
595 $query =
"SELECT view_mode FROM crs_settings WHERE obj_id = " .
$ilDB->quote($a_id,
'integer') .
" ";
598 return $row->view_mode;
607 $ilDB = $DIC[
'ilDB'];
609 $query =
"SELECT abo FROM crs_settings WHERE obj_id = " .
$ilDB->quote($a_id,
'integer') .
" ";
619 return $this->archive_start ? $this->archive_start : time();
623 $this->archive_start = $a_value;
627 return $this->archive_end ? $this->archive_end : mktime(0, 0, 0, 12, 12, date(
"Y", time()) + 2);
631 $this->archive_end = $a_value;
639 $this->archive_type = $a_value;
643 $this->abo = $a_status;
651 $this->show_members = $a_status;
655 return $this->show_members;
665 $this->mail_members = $a_type;
683 $this->message = $a_message;
688 $this->message .=
"<br /> ";
690 $this->message .= $a_message;
720 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
732 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
739 return $this->ABO == $this->ABO_ENABLED;
749 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
754 public function create($a_upload =
false)
758 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
760 parent::create($a_upload);
767 $ilAppEventHandler->raise(
770 array(
'object' => $this,
771 'obj_id' => $this->
getId(),
783 $this->latitude = $a_latitude;
803 $this->longitude = $a_longitude;
823 $this->locationzoom = $a_locationzoom;
843 $this->enablemap = $a_enablemap;
873 ($start instanceof \
ilDate && !$end instanceof
ilDate) ||
874 ($end instanceof \ilDate && !$start instanceof ilDate)
879 if ($start instanceof \ilDate) {
893 $this->course_start_time_indication = $time_indication;
910 $this->crs_start = $a_value;
926 $this->crs_end = $a_value;
939 $this->leave_end = $a_value;
949 if ($a_value !== null) {
950 $a_value = (int) $a_value;
952 $this->min_members = $a_value;
962 $this->auto_fill_from_waiting = (bool) $a_value;
978 public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree =
false)
982 $ilDB = $DIC[
'ilDB'];
984 $certificateLogger = $DIC->logger()->cert();
987 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
995 $new_obj->getMemberObject()->updateContact(
$ilUser->getId(), 1);
1001 if ($cwo->isRootNode($this->getRefId())) {
1009 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1013 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
1017 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
1019 $obj_settings->cloneSettings($new_obj->getId());
1020 unset($obj_settings);
1029 $templateRepository,
1030 $DIC->filesystem()->web(),
1034 $cloneAction->cloneCertificate($this, $new_obj);
1037 $book_service->cloneSettings($this->
getId(), $new_obj->getId());
1040 foreach ($badges as $badge) {
1041 $badge->clone($new_obj->getId());
1057 parent::cloneDependencies($a_target_id, $a_copy_id);
1060 include_once(
'Services/Container/classes/class.ilContainerStartObjects.php');
1062 $start->cloneDependencies($a_target_id, $a_copy_id);
1065 include_once(
'Services/Object/classes/class.ilObjectActivation.php');
1069 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
1073 include_once(
'Modules/Course/classes/class.ilCourseObjective.php');
1075 $crs_objective->ilClone($a_target_id, $a_copy_id);
1080 $grouping = new \ilObjCourseGrouping($grouping_id);
1081 $grouping->cloneGrouping($a_target_id, $a_copy_id);
1098 $ilLog = $DIC[
'ilLog'];
1103 $new_admin = $new_obj->getDefaultAdminRole();
1105 if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->getRefId()) {
1106 $ilLog->write(__METHOD__ .
' : Error cloning auto generated role: il_crs_admin');
1108 $rbacadmin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->getRefId(), $new_admin,
true);
1109 $ilLog->write(__METHOD__ .
' : Finished copying of role crs_admin.');
1112 $new_tutor = $new_obj->getDefaultTutorRole();
1113 if (!$tutor || !$new_tutor) {
1114 $ilLog->write(__METHOD__ .
' : Error cloning auto generated role: il_crs_tutor');
1116 $rbacadmin->copyRolePermissions($tutor, $this->
getRefId(), $new_obj->getRefId(), $new_tutor,
true);
1117 $ilLog->write(__METHOD__ .
' : Finished copying of role crs_tutor.');
1120 $new_member = $new_obj->getDefaultMemberRole();
1121 if (!$member || !$new_member) {
1122 $ilLog->write(__METHOD__ .
' : Error cloning auto generated role: il_crs_member');
1124 $rbacadmin->copyRolePermissions($member, $this->
getRefId(), $new_obj->getRefId(), $new_member,
true);
1125 $ilLog->write(__METHOD__ .
' : Finished copying of role crs_member.');
1137 $this->
appendMessage($this->lng->txt(
"subscription_times_not_valid"));
1140 $this->
appendMessage($this->lng->txt(
"crs_password_required"));
1144 $this->
appendMessage($this->lng->txt(
"crs_max_and_min_members_needed"));
1147 $this->
appendMessage($this->lng->txt(
"crs_max_members_needed"));
1150 $this->
appendMessage($this->lng->txt(
"crs_max_and_min_members_invalid"));
1161 $this->
appendMessage($this->lng->txt(
"crs_course_period_not_valid"));
1176 foreach ($emails as
$email) {
1177 $email = trim($email);
1179 $ilErr->appendMessage($this->lng->txt(
'contact_email_not_valid') .
" '" . $email .
"'");
1203 public function delete()
1207 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
1210 if (!parent::delete()) {
1221 include_once(
'Modules/Course/classes/class.ilCourseParticipants.php');
1224 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
1227 include_once
'./Modules/Course/classes/class.ilObjCourseGrouping.php';
1230 include_once
'./Modules/Course/classes/class.ilCourseFile.php';
1233 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1236 $ilAppEventHandler->raise(
1239 array(
'object' => $this,
1240 'obj_id' => $this->
getId(),
1256 $ilAppEventHandler = $DIC[
'ilAppEventHandler'];
1257 $ilLog = $DIC->logger()->crs();
1259 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
1268 $ilAppEventHandler->raise(
1271 array(
'object' => $this,
1272 'obj_id' => $this->
getId(),
1284 $ilDB = $DIC[
'ilDB'];
1288 $query =
"SELECT * FROM crs_settings WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer') .
" ";
1291 if (!
$res->numRows()) {
1296 $query =
"UPDATE crs_settings SET " .
1338 "WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer') .
"";
1343 if ($this->ref_id) {
1344 include_once
"./Services/Object/classes/class.ilObjectActivation.php";
1357 $item->update($this->ref_id);
1404 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1429 $ilDB = $DIC[
'ilDB'];
1431 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1434 $query =
"INSERT INTO crs_settings (obj_id,syllabus,contact_name,contact_responsibility," .
1435 "contact_phone,contact_email,contact_consultation," .
1436 "sub_limitation_type,sub_start,sub_end,sub_type,sub_password,sub_mem_limit," .
1437 "sub_max_members,sub_notify,view_mode,timing_mode,abo," .
1438 "latitude,longitude,location_zoom,enable_course_map,waiting_list,show_members,show_members_export, " .
1439 "session_limit,session_prev,session_next, reg_ac_enabled, reg_ac, auto_notification, status_dt,mail_members_type) " .
1441 $ilDB->quote($this->
getId(),
'integer') .
", " .
1458 $ilDB->quote($this->ABO_ENABLED,
'integer') .
", " .
1463 #
"objective_view = '0', ".
1480 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
1491 $ilDB = $DIC[
'ilDB'];
1493 $query =
"SELECT * FROM crs_settings WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer') .
"";
1538 if ($row->period_time_indication) {
1543 } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
1556 if ($this->ref_id) {
1557 include_once
"./Services/Object/classes/class.ilObjectActivation.php";
1559 switch ($activation[
"timing_type"]) {
1572 include_once
"./Modules/Course/classes/class.ilCourseWaitingList.php";
1574 if (!is_object($this->waiting_list_obj)) {
1592 include_once
"./Modules/Course/classes/class.ilCourseParticipant.php";
1608 include_once
"./Modules/Course/classes/class.ilCourseParticipants.php";
1645 $ilDB = $DIC[
'ilDB'];
1647 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1649 'il_crs_admin_' . $this->
getRefId(),
1650 "Admin of crs obj_no." . $this->
getId(),
1655 'il_crs_tutor_' . $this->
getRefId(),
1656 "Tutor of crs obj_no." . $this->
getId(),
1661 'il_crs_member_' . $this->
getRefId(),
1662 "Member of crs obj_no." . $this->
getId(),
1686 $parent_roles =
$rbacreview->getParentRoleIds($a_parent_ref);
1687 foreach ((array) $parent_roles as $parent_role) {
1690 $parent_role[
'obj_id'],
1691 $parent_role[
'parent'],
1708 $ilDB = $DIC[
'ilDB'];
1710 $q =
"SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_crs_non_member'";
1714 return $row[
"obj_id"];
1725 $ilDB = $DIC[
'ilDB'];
1727 $query =
'SELECT obj_id FROM object_data WHERE type = ' .
$ilDB->quote(
'rolt',
'text') .
' AND title = ' .
$ilDB->quote(
'il_crs_non_member',
'text');
1731 return isset($row[
'obj_id']) ? $row[
'obj_id'] : 0;
1747 if (empty($this->local_roles)) {
1748 $this->local_roles = array();
1751 foreach ($role_arr as $role_id) {
1752 if (
$rbacreview->isAssignable($role_id, $this->getRefId()) ==
true) {
1753 $role_Obj = $this->
ilias->obj_factory->getInstanceByObjId($role_id);
1758 $role_name = $role_Obj->getTitle();
1760 $this->local_roles[$role_name] = $role_Obj->getId();
1765 return $this->local_roles;
1786 if (strlen($a_crs_id) > 0) {
1787 $crs_id = $a_crs_id;
1792 $role_arr =
$rbacreview->getRolesOfRoleFolder($crs_id);
1794 foreach ($role_arr as $role_id) {
1795 $role_Obj = &$this->
ilias->obj_factory->getInstanceByObjId($role_id);
1797 $crs_Member =
"il_crs_member_" . $crs_id;
1798 $crs_Admin =
"il_crs_admin_" . $crs_id;
1799 $crs_Tutor =
"il_crs_tutor_" . $crs_id;
1801 if (strcmp($role_Obj->getTitle(), $crs_Member) == 0) {
1802 $arr_crsDefaultRoles[
"crs_member_role"] = $role_Obj->getId();
1805 if (strcmp($role_Obj->getTitle(), $crs_Admin) == 0) {
1806 $arr_crsDefaultRoles[
"crs_admin_role"] = $role_Obj->getId();
1809 if (strcmp($role_Obj->getTitle(), $crs_Tutor) == 0) {
1810 $arr_crsDefaultRoles[
"crs_tutor_role"] = $role_Obj->getId();
1814 return $arr_crsDefaultRoles;
1832 $ilDB = $DIC[
'ilDB'];
1834 $query =
"DELETE FROM crs_settings " .
1835 "WHERE obj_id = " .
$ilDB->quote($this->
getId(),
'integer') .
" ";
1846 foreach ($local_roles as $role_id) {
1848 if (substr(
$title, 0, 8) ==
'il_crs_m') {
1858 foreach ($local_roles as $role_id) {
1860 if (!strcmp($tmp_role->getTitle(),
"il_crs_tutor_" . $this->
getRefId())) {
1871 foreach ($local_roles as $role_id) {
1873 if (!strcmp($tmp_role->getTitle(),
"il_crs_admin_" . $this->
getRefId())) {
1885 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
1888 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1892 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1906 $ilLog = $DIC[
'ilLog'];
1908 parent::MDUpdateListener($a_element);
1910 switch ($a_element) {
1913 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1915 $ecs->handleContentUpdate();
1929 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
1942 include_once(
'./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1943 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1951 $app->setSubtitle(
'crs_cal_activation_start');
1959 $app->setSubtitle(
'crs_cal_activation_end');
1968 $app->setSubtitle(
'crs_cal_reg_start');
1976 $app->setSubtitle(
'crs_cal_reg_end');
1985 $app->setSubtitle(
'crs_cal_start');
1994 $app->setSubtitle(
'crs_cal_end');
2005 foreach ($active as $null => $item) {
2009 $app->setContextInfo($item[
'ref_id']);
2010 $app->setTitle($item[
'title']);
2011 $app->setSubtitle(
'cal_crs_timing_start');
2014 $app->setFullday(
true);
2018 $app->setContextInfo($item[
'ref_id']);
2019 $app->setTitle($item[
'title']);
2020 $app->setSubtitle(
'cal_crs_timing_end');
2023 $app->setFullday(
true);
2028 return $apps ? $apps : array();
2036 ###### Interface ilMembershipRegistrationCodes 2045 $ilDB = $DIC[
'ilDB'];
2047 $query =
"SELECT obj_id FROM crs_settings " .
2048 "WHERE reg_ac_enabled = " .
$ilDB->quote(1,
'integer') .
" " .
2049 "AND reg_ac = " .
$ilDB->quote($a_code,
'text');
2054 $obj_ids[] = $row->obj_id;
2070 $ilCtrl = $DIC[
'ilCtrl'];
2071 $tree = $DIC[
'tree'];
2072 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
2073 include_once
"./Modules/Course/classes/class.ilCourseParticipants.php";
2076 if ($part->isAssigned($a_user_id)) {
2080 if (!$a_force_registration) {
2084 "Can't register to course, course is offline.",
2091 "Can't register to course, course is not activated.",
2114 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2117 $waiting_list->addToList($a_user_id);
2118 $this->lng->loadLanguageModule(
"crs");
2120 $this->lng->txt(
'crs_added_to_list'),
2121 $waiting_list->getPosition($a_user_id)
2123 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
2125 $participants->sendNotification($participants->NOTIFY_WAITING_LIST, $a_user_id);
2137 $part->add($a_user_id, $a_role);
2138 $part->sendNotification($part->NOTIFY_ACCEPT_USER, $a_user_id);
2139 $part->sendNotification($part->NOTIFY_ADMINS, $a_user_id);
2142 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
2168 $this->auto_notification = $value;
2178 $a_value = (int) $a_value;
2181 if ($a_value == self::STATUS_DETERMINATION_LP) {
2182 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
2184 $a_value = self::STATUS_DETERMINATION_MANUAL;
2188 $this->status_dt = $a_value;
2206 include_once
"Services/Tracking/classes/class.ilLPStatusWrapper.php";
2223 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
2226 include_once(
"Services/Tracking/classes/class.ilLPStatus.php");
2229 $this->
getMembersObject()->updatePassed($a_member_id, $has_completed,
false,
true);
2238 return parent::getOrderType();
2250 $this->course_logger->debug(
'Waiting list or auto fill disabled.');
2257 $this->course_logger->debug(
'Max members: ' . $max);
2258 $this->course_logger->debug(
'Current members: ' . $now);
2265 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2268 foreach ($waiting_list->getUserIds() as $user_id) {
2270 $this->course_logger->warning(
'Cannot create user instance for id: ' . $user_id);
2274 $this->course_logger->warning(
'User is already assigned to course. uid: ' . $user_id .
' course_id: ' . $this->
getRefId());
2279 $waiting_list->removeFromList($user_id);
2282 $this->course_logger->info(
'Assigned user from waiting list to course: ' . $this->
getTitle());
2290 public static function mayLeave($a_course_id, $a_user_id = null, &$a_date = null)
2295 $ilDB = $DIC[
'ilDB'];
2298 $a_user_id =
$ilUser->getId();
2301 $set =
$ilDB->query(
"SELECT leave_end" .
2302 " FROM crs_settings" .
2303 " WHERE obj_id = " .
$ilDB->quote($a_course_id,
"integer"));
2304 $row =
$ilDB->fetchAssoc($set);
2305 if ($row && $row[
"leave_end"]) {
2307 $limit = date(
"Ymd", $row[
"leave_end"]);
2308 if ($limit < date(
"Ymd")) {
2332 include_once
"Modules/Course/classes/class.ilCourseParticipants.php";
2334 $set =
$ilDB->query(
"SELECT obj_id, min_members" .
2335 " FROM crs_settings" .
2336 " WHERE min_members > " .
$ilDB->quote(0,
"integer") .
2337 " AND sub_mem_limit = " .
$ilDB->quote(1,
"integer") .
2338 " AND ((leave_end IS NOT NULL" .
2339 " AND leave_end < " .
$ilDB->quote($now,
"text") .
")" .
2340 " OR (leave_end IS NULL" .
2341 " AND sub_end IS NOT NULL" .
2342 " AND sub_end < " .
$ilDB->quote($now,
"text") .
"))" .
2343 " AND (period_start IS NULL OR period_start > " .
$ilDB->quote($now,
"integer") .
")");
2344 while ($row =
$ilDB->fetchAssoc($set)) {
2348 if (
$tree->isDeleted($ref)) {
2353 $reci = $part->getNotificationRecipients();
2354 if (
sizeof($reci)) {
2355 $missing = (int) $row[
"min_members"] - $part->getCountMembers();
2357 $res[$row[
"obj_id"]] = array($missing, $reci);
const LP_STATUS_COMPLETED_NUM
getSubscriptionPassword()
setActivationEnd($a_value)
static getUserIdByLogin($a_login)
setSubscriptionNotify($a_value)
getEnableMap()
Type independent wrapper.
setContactResponsibility($a_value)
getMailToMembersType()
Get mail to members type.
getSubscriptionMinMembers()
setSubscriptionStart($a_value)
setSubscriptionEnd($a_value)
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
const IL_CRS_SUBSCRIPTION_LIMITED
setCoursePeriod(\ilDateTime $start=null, \ilDateTime $end=null)
static lookupNumberOfMembers($a_ref_id)
Lookup number of members ilRbacReview $rbacreview <type> $ilObjDataCache.
getSubscriptionMaxMembers()
setShowMembersExport($a_mem_export)
const IL_CRS_VIEW_OBJECTIVE
const ADDED_TO_WAITINGLIST
const IL_CRS_VIEW_TIMING_ABSOLUTE
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 convertDateToUtcDBTimestamp(\ilDateTime $date=null)
static cloneSettings($a_copy_id, $a_container_id, $a_new_container_id)
Clone settings.
static lookupObjectsByCode($a_code)
static _deleteUser($a_usr_id)
Delete user type $ilDB.
getActivationVisibility()
setParentRolePermissions($a_parent_ref)
This method is called before "initDefaultRoles".
static is_email($a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid.
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.
static _registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
setImportantInformation($a_info)
static _registrationEnabled($a_obj_id)
updateMetaData()
update meta data entry
setMailToMembersType($a_type)
Set mail to members type.
static getTimingsItems($a_container_ref_id)
Get (sub) item data for timings view (no session material, no side blocks)
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
getSubItems( $a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
Get subitems of container.
static getItem($a_ref_id)
Get item data.
getOfflineStatus()
Get offline status.
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
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Clone course (no member data)
const TIMINGS_DEACTIVATED
createMetaData()
create meta data entry
const REGISTRATION_INVALID_OFFLINE
const OUT_OF_REGISTRATION_PERIOD
enableSessionLimit($a_status)
en/disable limited number of sessions
const IL_CRS_VIEW_TIMING_ABSOLUTE
static _lookupTitle($a_id)
lookup object title
Apointment templates are used for automatic generated apointments.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
$course_start_time_indication
getStatusDetermination()
Get status determination mode.
static lookupTimingMode($a_obj_id)
static _lookupViewMode($a_id)
lookup view mode of container
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.
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.
static _getAllReferences($a_id)
get all reference ids of object
const IL_CRS_ARCHIVE_NONE
update()
update complete object
handleAutoFill()
Handle course auto fill.
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
setLatitude($a_latitude)
Set Latitude.
cloneSettings(\ilObjCourse $new_obj)
Clone entries in settings table.
setEnableCourseMap($a_enablemap)
Set Enable Course Map.
setActivationVisibility($a_value)
static lookupShowMembersEnabled($a_obj_id)
Check if show member is enabled.
getCourseStartTimeIndication()
static _deleteAll($a_course_id)
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)
static getInstancesByParentId($a_parent_id, array $a_filter=null)
isActivated()
Check if course is active and not offline.
getMemberObject()
Get course member object.
foreach($_POST as $key=> $value) $res
setLongitude($a_longitude)
Set Longitude.
getId()
get object id public
Interface for all objects that offer registration with access codes.
getNumberOfNextSessions()
Set number of previous sessions.
setSubscriptionType($a_value)
static _isOffline($a_obj_id)
Type-specific implementation of general status.
getContactResponsibility()
syncMembersStatusWithLP()
Set course status for all members by lp status.
__getCrsNonMemberTemplateId()
get course non-member template private
const REGISTRATION_CODE_DISABLED
static _lookupObjId($a_id)
prepareAppointments($a_mode='create')
Prepare calendar appointments.
cloneDependencies($a_target_id, $a_copy_id)
Clone object dependencies (start objects, preconditions)
setSubscriptionMinMembers($a_value)
Low level api for booking service.
setNumberOfNextSessions($a_num)
Set number of previous sessions.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
const IL_CRS_SUBSCRIPTION_UNLIMITED
const CAL_COURSE_TIMING_END
getTitle()
get object title public
setContactConsultation($a_value)
MDUpdateListener($a_element)
Overwriten Metadata update listener for ECS functionalities.
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.
const STATUS_DETERMINATION_MANUAL
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.
getRegistrationAccessCode()
get access code
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
enableRegistrationAccessCode($a_status)
En/disable registration access code.
static _getTranslation($a_role_title)
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...
static mayLeave($a_course_id, $a_user_id=null, &$a_date=null)
getAutoNotification()
Returns automatic notification status from $this->auto_notification.
checkLPStatusSync($a_member_id)
sync course status from lp
getLatitude()
Get Latitude.
cloneAutoGeneratedRoles($new_obj)
Clone automatic genrated roles (permissions and template permissions)
isSubscriptionMembershipLimited()
is membership limited
static _isActivated($a_obj_id)
Is activated.
setTargetGroup(?string $a_tg)
static generateCode()
Generate new registration key.
setContactPhone($a_value)
const CAL_COURSE_TIMING_START
static _lookupAboStatus($a_id)
const REGISTRATION_INVALID_AVAILABILITY
getActivationUnlimitedStatus()
get activation unlimited no start or no end
setCancellationEnd(ilDate $a_value=null)
static prepareSessionPresentationLimitation(array $items, ilContainer $container, bool $admin_panel_enabled=false, bool $include_side_block=false)
static findCoursesWithNotEnoughMembers()
Minimum members check type $ilDB.
static _deleteByCourse($a_course_id)
initCourseMembersObject()
Init course member object ilObjUser $ilUser.
setOfflineStatus($a_status)
Set offline status.
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
__construct(Container $dic, ilPlugin $plugin)
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)
static _deleteAll($course_id)
getRefId()
get reference id public
enableWaitingList($a_status)
static _deleteUser($a_usr_id)
getSubscriptionUnlimitedStatus()
deleteMetaData()
delete meta data entry
toggleCourseStartTimeIndication(bool $time_indication)
initCourseMemberObject()
Init course member object ilObjUser $ilUser.
const IL_CRS_SUBSCRIPTION_DIRECT
static getLogger($a_component_id)
Get component logger.
setWaitingListAutoFill($a_value)
static _lookupSortMode($a_obj_id)
lookup sort mode
static _getInstance()
Get instance of ilPrivacySettings.
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.
static _getGroupings($a_course_id)
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?
setCourseEnd(ilDateTime $a_value=null)
setCourseStart(ilDateTime $a_value=null)
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
updateSettings()
Update settings.
setStatusDetermination($a_value)
Set status determination mode.
setArchiveStart($a_value)
setSubscriptionLimitationType($a_type)