From a78be190f8432392ae8ffe5cd6794192fb752fe4 Mon Sep 17 00:00:00 2001 From: Matthias Opitz Date: Tue, 13 Jan 2026 17:13:49 +0000 Subject: [PATCH 1/2] fixed failing Behat tests: - added missing static variables - in feature clicking "Edit" "link" instead of "icon" --- bookingform.php | 2 ++ renderable.php | 5 +++++ tests/behat/grades.feature | 8 ++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bookingform.php b/bookingform.php index 4ae84b0e..d86aceb6 100644 --- a/bookingform.php +++ b/bookingform.php @@ -45,6 +45,8 @@ class scheduler_booking_form extends moodleform { /** @var mixed */ protected $uploadoptions; /** @var mixed */ + protected $noteoptions; + /** @var mixed */ protected $existing; /** diff --git a/renderable.php b/renderable.php index 38c3bb7f..faf58c3d 100644 --- a/renderable.php +++ b/renderable.php @@ -650,6 +650,11 @@ class scheduler_appointment_info implements renderable { */ public $showresult; + /** + * @var bool whether to show booking info + */ + public $showboookinginfo; + /** * Create appointment information for a new appointment in a slot. * diff --git a/tests/behat/grades.feature b/tests/behat/grades.feature index 06fa1954..fc33c23b 100644 --- a/tests/behat/grades.feature +++ b/tests/behat/grades.feature @@ -166,7 +166,7 @@ Feature: Teachers can grade student appointments with totals automatically compu And I expand all fieldsets And I set the field "Grading strategy" to "Take the highest grade" And I press "Save and display" - And I click on "Edit" "icon" in the "3:00 AM" "table_row" + And I click on "Edit" "link" in the "3:00 AM" "table_row" And I set the following fields to these values: | grade[0] | 5 | And I click on "Save" "button" @@ -175,7 +175,7 @@ Feature: Teachers can grade student appointments with totals automatically compu And I should see "5.00" in the "div.totalgrade" "css_element" When I am on the "scheduler1" Activity page logged in as "teacher1" - And I click on "Edit" "icon" in the "4:00 AM" "table_row" + And I click on "Edit" "link" in the "4:00 AM" "table_row" And I set the following fields to these values: | grade[0] | 7 | And I click on "Save" "button" @@ -185,7 +185,7 @@ Feature: Teachers can grade student appointments with totals automatically compu And I should see "7.00" in the "div.totalgrade" "css_element" When I am on the "scheduler1" Activity page logged in as "teacher1" - And I click on "Edit" "icon" in the "4:00 AM" "table_row" + And I click on "Edit" "link" in the "4:00 AM" "table_row" And I set the following fields to these values: | grade[0] | 2 | And I click on "Save" "button" @@ -195,7 +195,7 @@ Feature: Teachers can grade student appointments with totals automatically compu And I should see "5.00" in the "div.totalgrade" "css_element" When I am on the "scheduler1" Activity page logged in as "teacher1" - And I click on "Edit" "icon" in the "3:00 AM" "table_row" + And I click on "Edit" "link" in the "3:00 AM" "table_row" And I set the following fields to these values: | grade[0] | No grade | And I click on "Save" "button" From 888e4176a047a464b78cc96262313f679e2a1530 Mon Sep 17 00:00:00 2001 From: Matthias Opitz Date: Wed, 14 Jan 2026 10:44:06 +0000 Subject: [PATCH 2/2] removed unused dynamic variable $delselected->formid --- teacherview.php | 1 - 1 file changed, 1 deletion(-) diff --git a/teacherview.php b/teacherview.php index a5dc7094..a3b9cff3 100644 --- a/teacherview.php +++ b/teacherview.php @@ -471,7 +471,6 @@ function scheduler_print_schedulebox(scheduler $scheduler, $studentid, $groupid $PAGE->requires->js_call_amd('mod_scheduler/delselected', 'init', [$delselectedurl->out(false)]); $delselected = $commandbar->action_menu_link($delselectedurl, 'deleteselection', 't/delete', 'confirmdelete-selected', 'delselected'); - $delselected->formid = 'delselected'; $delbuttons[] = $delselected; if ($permissions->can_edit_all_slots() && $subpage == 'allappointments') {