Skip to content

Commit

Permalink
Bugfix: Possible fix for problems with CSV/Excel download of table (W…
Browse files Browse the repository at this point in the history
…underbyte-GmbH/Wunderbyte-GmbH#283).
  • Loading branch information
ibernhardf committed Dec 12, 2024
1 parent 2acd0c9 commit 4b7a7b9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions classes/table/bookingoptions_wbtable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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;
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {

Expand Down Expand Up @@ -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;
}

Expand All @@ -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 = '';

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4b7a7b9

Please sign in to comment.