Skip to content

Commit

Permalink
Bugfix: instance of callback via constructor (Wunderbyte-GmbH/moodle-…
Browse files Browse the repository at this point in the history
  • Loading branch information
eynimeni committed Jan 23, 2025
1 parent 2b844d1 commit a51d703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ private static function inittableforcourses($booking) {
*
*/
private static function add_standardfilters(&$table) {
$callbackfilter = callback::get_instance('bookable', get_string('bookable', 'local_musi'));
$callbackfilter = new callback('bookable', get_string('bookable', 'local_musi'));
$callbackfilter->add_options([
0 => get_string('notbookable', 'local_musi'),
1 => get_string('bookable', 'local_musi'),
Expand Down Expand Up @@ -873,6 +873,7 @@ private static function set_table_options_from_arguments(&$table, $args) {
);
// $sortbycallback->define_callbackfunction('local_musi\shortcodes::sort_freeplaces');
// $table->add_sortable($sortbycallback);
*/

$standardsortable = new \local_wunderbyte_table\local\sortables\types\standardsortable(
'freeplaces',
Expand All @@ -887,7 +888,6 @@ private static function set_table_options_from_arguments(&$table, $args) {

$standardsortable->define_cache('mod_booking', 'bookedusertable');
$table->add_sortable($standardsortable);
*/

if (get_config('local_musi', 'musishortcodesshowstart')) {
$sortablecolumns['coursestarttime'] = get_string('coursestarttime', 'mod_booking');
Expand Down

0 comments on commit a51d703

Please sign in to comment.