Skip to content

Commit

Permalink
Bugfix: Presence status still needs to work without PRO license!
Browse files Browse the repository at this point in the history
  • Loading branch information
ibernhardf authored and eynimeni committed Jan 15, 2025
1 parent 2801fd8 commit e5409f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions classes/all_userbookings.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use mod_booking\output\report_edit_bookingnotes;
use html_writer;
use mod_booking\bo_availability\conditions\customform;
use mod_booking\utils\wb_payment;
use moodle_url;
use stdClass;
use user_picture;
Expand Down Expand Up @@ -597,8 +598,13 @@ public function wrap_html_finish() {

$presences = [];
$storedpresences = explode(',', get_config('booking', 'presenceoptions'));
foreach ($storedpresences as $id) {
$presences[$id] = $possiblepresences[$id];
if (wb_payment::pro_version_is_activated()) {
foreach ($storedpresences as $id) {
$presences[$id] = $possiblepresences[$id];
}
} else {
// Without PRO version, use all possible presences.
$presences = $possiblepresences;
}

echo html_writer::select($presences, 'selectpresencestatus', '', ['' => 'choosedots'],
Expand Down

0 comments on commit e5409f1

Please sign in to comment.