From 7a3580f963fc0f4637bbf61a2dce5cafce2457a2 Mon Sep 17 00:00:00 2001 From: Bernhard Fischer Date: Thu, 12 Dec 2024 23:07:50 +0100 Subject: [PATCH] Bugfix: Possible fix for problems with CSV/Excel download of table (Wunderbyte-GmbH/Wunderbyte-GmbH#283). --- classes/table/bookingoptions_wbtable.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/classes/table/bookingoptions_wbtable.php b/classes/table/bookingoptions_wbtable.php index d54546338..f8b999f10 100644 --- a/classes/table/bookingoptions_wbtable.php +++ b/classes/table/bookingoptions_wbtable.php @@ -71,7 +71,7 @@ class bookingoptions_wbtable extends wunderbyte_table { */ public function col_invisibleoption($values) { - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); if (!empty($settings->invisible)) { return get_string('invisibleoption', 'mod_booking'); @@ -90,7 +90,7 @@ public function col_invisibleoption($values) { */ public function col_image($values) { - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); if (empty($settings->imageurl)) { return null; @@ -170,7 +170,7 @@ public function col_booknow($values) { global $USER; // Render col_price using a template. - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); $buyforuser = price::return_user_to_buy_for(); @@ -403,7 +403,7 @@ public function col_ratings($values) { public function col_bookings($values) { $output = singleton_service::get_renderer('mod_booking'); - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); $buyforuser = price::return_user_to_buy_for(); // Render col_bookings using a template. $data = new col_availableplaces($values, $settings, $buyforuser); @@ -438,7 +438,7 @@ public function col_bookings($values) { */ public function col_location($values) { - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); if (isset($settings->entity) && (count($settings->entity) > 0)) { @@ -474,7 +474,7 @@ public function col_location($values) { */ public function col_institution($values) { - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); return $settings->institution; } @@ -489,7 +489,7 @@ public function col_institution($values) { public function col_course($values) { global $USER; - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); $ret = ''; @@ -556,7 +556,7 @@ public function col_course($values) { */ public function col_dayofweektime($values) { $ret = ''; - $settings = singleton_service::get_instance_of_booking_option_settings($values->id, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->id); if (!empty($settings->dayofweektime)) { $ret = $settings->dayofweektime; } @@ -621,7 +621,7 @@ public function col_manageresponses($values) { // Link is empty on default. $link = ''; - $settings = singleton_service::get_instance_of_booking_option_settings($values->optionid, $values); + $settings = singleton_service::get_instance_of_booking_option_settings($values->optionid); $bookinganswers = singleton_service::get_instance_of_booking_answers($settings, 0); if (booking_answers::count_places($bookinganswers->usersonlist) > 0) {