Skip to content

Commit

Permalink
Making sure the studentid property actually exists before we try to a…
Browse files Browse the repository at this point in the history
…ccess it.
  • Loading branch information
JohnOLane committed Jul 12, 2024
1 parent 2c51b0d commit 17e0661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teacherview.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function scheduler_action_doaddsession($scheduler, $formdata, moodle_url $return

//URCOURSE HACK LEFT OFF HERE MUST TEST
for ($i = 0; $i < $data->appointment_repeats; $i++) {
if ($data->studentid[$i] > 0) {
if (property_exists($data, 'studentid') && $data->studentid[$i] > 0) {

$slotfinal = \mod_scheduler\model\slot::load_by_id($slotid, $scheduler);
$noteoptions = array('trusttext' => true, 'maxfiles' => -1, 'maxbytes' => 0,
Expand Down

0 comments on commit 17e0661

Please sign in to comment.