missing notification to student after unilateral change of Date/Time from teacher

missing notification to student after unilateral change of Date/Time from teacher

by Kathrin Schwarz -
Number of replies: 2

Hello Henning,

great plugin!

You wrote ....

There are two types of notifications that Scheduler would send out to students:

(a) when the teacher cancels their appointment,

(b) a reminder of the upcoming slot, if the teacher has selected this

We have the situation that teacher change the agreed appointment. Students geht no notification, but this would be very important. Can you give any hint where I can change the source that students will notify by changing ?

This would help us a lot.

With best regards

Kathrin




Average of ratings: -
In reply to Kathrin Schwarz

Re: missing notification to student after unilateral change of Date/Time from teacher

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

You would need to look into teacherview.php, near line 137. teacherview.controller.php also has some examples of these notification messages.

There were some requests for additional notification messages earlier; you may want to add your thoughts to CONTRIB-4647. However, I'm not entirely sure whether adding many more "automatic" messages would be really helpful in all cases. They might be sent out without teachers noticing, and annoying students if they are about irrelevant changes.


In reply to Henning Bostelmann

Re: missing notification to student after unilateral change of Date/Time from teacher

by Kathrin Schwarz -

Thanks a lot !!!

I have change the source in techerview.php line 235 and expand the lang/scheduler.php with the new Email Text.
Tomorrow I will test again, but it looks good. Thank you!!

The code

if ($mform->is_cancelled()) { redirect($returnurl); } else if ($formdata = $mform->get_data()) { scheduler_save_slotform ($scheduler, $course, $slotid, $formdata);
// ks6 /************************* notify student if slot change *********************/
 $oldstudents = array(); foreach ($slot->get_appointments() as $app) { $oldstudents[] = $app->studentid; $slot->remove_appointment($app); }
// notify student if ($scheduler->allownotifications) { foreach ($oldstudents as $oldstudent) { include_once($CFG->dirroot.'/mod/scheduler/mailtemplatelib.php');
 $student = $DB->get_record('user', array('id' => $oldstudent)); $teacher = $DB->get_record('user', array('id' => $slot->teacherid));
 $vars = scheduler_get_mail_variables($scheduler, $slot, $teacher, $student, $COURSE, $student); scheduler_send_email_from_template($student,
 $teacher, $COURSE, 'changebyteacher', 'teacherchange', $vars, 'scheduler'); } } echo $output->action_message(get_string('slotupdated', 'scheduler'));