Skip to content

Commit

Permalink
Merge branch 'merge/9/9-4' into 'release_9'
Browse files Browse the repository at this point in the history
Latest 9.x Merge

See merge request ilias-hosting/ilias!10
  • Loading branch information
mjansenDatabay committed Sep 17, 2024
2 parents 54c9e8b + b3bf32d commit 6b62f53
Show file tree
Hide file tree
Showing 52 changed files with 2,117 additions and 800 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
/ilias.ini.php
/ilias.log
/db_template_writer.php
/setup/sql/dbupdate_custom.php
# seminar-patch: begin
#/setup/sql/dbupdate_custom.php
# seminar-patch: end
/install_client.php
/Services/GlobalScreen/artifacts/global_screen_providers.php
/Services/Style/System/data/data.php
Expand Down
2 changes: 1 addition & 1 deletion CI/PHP-CS-Fixer/code-format.php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ return (new PhpCsFixer\Config())
'strict_param' => false,
'cast_spaces' => true,
'concat_space' => ['spacing' => 'one'],
'function_typehint_space' => true,
'type_declaration_spaces' => true,
'function_declaration' => ['closure_fn_spacing' => 'none'],
'binary_operator_spaces' => ['default' => 'single_space'],
// 'types_spaces' => ['space' => 'single'],
Expand Down
209 changes: 128 additions & 81 deletions Modules/Chatroom/chat/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Modules/Chatroom/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "2.0.0",
"dependencies": {
"async": "^3.2",
"express": "^4.19.2",
"express": "^4.21.0",
"mysql": "^2.18.1",
"node-mysql": "^0.4.2",
"node-schedule": "^2.1.0",
Expand Down
3 changes: 3 additions & 0 deletions Modules/Course/classes/class.ilCourseConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class ilCourseConstants
public const IL_CRS_SUBSCRIPTION_CONFIRMATION = 2;
public const IL_CRS_SUBSCRIPTION_DIRECT = 3;
public const IL_CRS_SUBSCRIPTION_PASSWORD = 4;
// seminar-patch: begin
public const IL_CRS_SUBSCRIPTION_WORKFLOW = 5;
// seminar-patch: end
public const IL_CRS_ARCHIVE_DOWNLOAD = 3;
public const IL_CRS_ARCHIVE_NONE = 0;
}
109 changes: 103 additions & 6 deletions Modules/Course/classes/class.ilCourseMembershipMailNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public function forceSendingMail(bool $a_status): void

public function send(): bool
{
// seminar-patch: begin
global $DIC;
// seminar-patch: end
if (
$this->getRefId() &&
in_array($this->getType(), array(self::TYPE_ADMISSION_MEMBER))) {
Expand All @@ -119,6 +122,43 @@ public function send(): bool
case self::TYPE_ADMISSION_MEMBER:

foreach ($this->getRecipients() as $rcp) {
// seminar-patch: begin
if (ilUtil::hasActivePlugin('Services', 'UIComponent', 'uihk', 'CourseBooking')) {
// https://support.iliasnet.de/view.php?id=8725
$ref_ids = ilObject::_getAllReferences($this->getObjId());
$ref_id = current($ref_ids);
/** @var ilObjCourse $crs */
$crs = ilObjectFactory::getInstanceByRefId($ref_id);

if ($rcp == $DIC->user()->getId()) {
$mail_data_object = new ilParticipantInvitationMailData();
$mail_data_object->setCourse($crs);
$mail_data_object->setRecipientUserId($rcp);
$api = new ilMailTemplateManagementAPI();
$api->sendMail(
'Booking',
'Buchungsbestätigung bei Selbstbuchung (6.1 / Mail 1)',
ilObjUser::_lookupLanguage($rcp),
$mail_data_object
);
} elseif ($crs->getSubscriptionType() === ilCourseConstants::IL_CRS_SUBSCRIPTION_WORKFLOW) {
ilBookingProcessesUtils::CourseAdminBooksProcessCourse(
(int) $rcp,
$crs->getRefId(),
$DIC->user()->getId(),
true
);
} else {
ilBookingProcessesUtils::CourseAdminBooksNonWorkflowCourse(
(int) $rcp,
$crs->getRefId(),
$DIC->user()->getId(),
true
);
}
continue;
}
// seminar-patch: end
$this->initLanguage($rcp);
$this->initMail();
$this->setSubject(
Expand All @@ -140,7 +180,11 @@ public function send(): bool
break;

case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:

// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand All @@ -163,7 +207,11 @@ public function send(): bool
break;

case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:

// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand All @@ -183,6 +231,11 @@ public function send(): bool
break;

case self::TYPE_STATUS_CHANGED:
// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand Down Expand Up @@ -210,7 +263,29 @@ public function send(): bool
break;

case self::TYPE_DISMISS_MEMBER:

// seminar-patch: begin
if (ilUtil::hasActivePlugin('Services', 'UIComponent', 'uihk', 'CourseBooking')) {
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}

// https://support.iliasnet.de/view.php?id=8698
$ref_ids = ilObject::_getAllReferences($this->getObjId());
$ref_id = current($ref_ids);
/** @var ilObjCourse $crs */
$crs = ilObjectFactory::getInstanceByRefId($ref_id);
foreach ($this->getRecipients() as $rcp) {
ilBookingProcessesUtils::CourseAdminCancellationNonWorkflow(
(int) $rcp,
$crs->getRefId(),
$DIC->user()->getId(),
'',
true
);
}
return true;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand All @@ -228,7 +303,11 @@ public function send(): bool
break;

case self::TYPE_BLOCKED_MEMBER:

// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand All @@ -246,7 +325,11 @@ public function send(): bool
break;

case self::TYPE_UNBLOCKED_MEMBER:

// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand Down Expand Up @@ -366,6 +449,11 @@ public function send(): bool
break;

case self::TYPE_UNSUBSCRIBE_MEMBER:
// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand All @@ -385,7 +473,11 @@ public function send(): bool
break;

case self::TYPE_SUBSCRIBE_MEMBER:

// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand All @@ -409,6 +501,11 @@ public function send(): bool
break;

case self::TYPE_WAITING_LIST_MEMBER:
// seminar-patch: begin
if (!$DIC->settings()->get('mail_crs_member_notification', true)) {
return false;
}
// seminar-patch: end
foreach ($this->getRecipients() as $rcp) {
$this->initLanguage($rcp);
$this->initMail();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,9 @@ public function parse(): void
foreach ($data as $usr_id => $fields) {
$usr_id = (int) $usr_id;
// #7264: as we get data for all course members filter against user data
if (!$this->checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) {
// seminar-patch: begin
if (!in_array($usr_id, $usr_ids)) {
// seminar-patch: end
continue;
}

Expand Down
Loading

0 comments on commit 6b62f53

Please sign in to comment.