## Activities: Scheduler

mod_scheduler
Maintained by Henning Bostelmann
An appointment scheduler for planning face-to-face meetings between teachers and students. Teachers can set up time slots, and students can choose one of these on Moodle.
2425 sites
38 fans
Moodle 2.5, 2.6

The Scheduler module helps you in scheduling appointments with your students. Teachers specify time slots for meetings, students then choose one of them on Moodle. Teachers in turn can record the outcome of the meeting - and optionally a grade - within the scheduler.

Group scheduling is supported; that is, each time slot can accomodate several students, and optionally it is possible to schedule appointments for entire groups at the same time.

Please note that minor updates to this module will normally be released on github only.

For help and discussion about the module, please use the Scheduler forum on moodle.org.

For an earlier version supporting Moodle up to release 1.9, see the Scheduler 1.9 module.

### Awards

• Thu, 16 Jun 2016, 1:07 AM
@Guido Roessling: The e-mail content can be customized using "Language Customization" (https://docs.moodle.org/31/en/Language_customisation). Look for the key "scheduler/email_applied_html". (However, in the default setting and in the English language pack this does contain date and time of the appointment - possibly it has been changed in your installation?)
• Thu, 16 Jun 2016, 1:09 AM
@Ron Andrade: Similar features have been requested by others, see https://tracker.moodle.org/browse/CONTRIB-5343 . Your input there would be welcome. I'm not planning to add this on the short-term but it is, say, on my medium-term list.
• Thu, 7 Jul 2016, 1:40 PM
Hi Henning. Many thanks for providing this plugin to the community; its functionality is really appreciated by our staff and students, and we’re really grateful to you for your efforts to maintain and update it.

On that note, please could I quickly query whether you have any plans to update the plugin to be fully compatible with Moodle v3.1, and its new Global Search feature in particular? To clarify: while we’ve tested the Scheduler plugin under v3.1 and all of the core functionality seems to work fine, we’ve found that instances of the activity are not searchable via v3.1’s Global Search feature. Please see the following screenshot for details, which lists all of the available areas that can searched under v3.1 (note that these settings are available via: Site Administration -> Plugins -> Search -> Manage Global Search):

http://imgur.com/lWWQByE

Note also that the above screenshot was taken on a v3.1 system where the Scheduler plugin is installed and available. However, as you can see, the Scheduler activity is not listed as being available to be searched. Obviously, this is likely to be a significant problem/cause of confusion for users who might want to search for specific instances of the Scheduler activity across Moodle.

I’m not a developer, but my understanding is that mod plugins can be made searchable relatively easily via the addition of a new search class within the plugin’s codebase (located at ../classes/search/activity.php). Please see the following for further details:

https://moodle.org/mod/forum/discuss.php?d=334938
https://docs.moodle.org/31/en/Global_search
https://docs.moodle.org/dev/Search_API

We really hope this search capability can be added to Scheduler as I’m sure it would be a huge benefit to our users (as well as those of other v3.1 systems) and, again, many thanks for all your efforts to develop this plugin and share it with the community.

Best wishes,
Lina
• Thu, 7 Jul 2016, 4:28 PM
Hi Lina
you already sent me the same question by private message on 28 May and I replied by e-mail on 29 May. Please do not send these in duplicate. In case the message got lost, I'm copying my reply below.

---

I'm planning to release a specific 3.1 branch of Scheduler later this year, probably by the end of September. This will include some added functionality, and I also hope to look into the new global search feature.

However, it's not quite clear to me at this point what content in Scheduler should actually be searchable. It seems that most plugins (including core) currently allow to search the activity description only. This should be quite easy to add to Scheduler, but I'm not quite sure how useful it would actually be (many users in our installation actually leave the activity description empty).

From your message it seems that you have some particular use case in mind, maybe you can let me know what users are actually looking for?
• Fri, 8 Jul 2016, 3:06 PM
Hi Henning,
I'm sorry that our mail server has blocked your private email, so I didn't receive that email in time. Sorry for the inconvenience this caused. Thanks a lot for your prompt reply.
The Scheduler plugin is one of the most popular activities to our teachers and students. Our teachers will provide guidance description for the students to read before they start to book appointments. For example, our Language Centre will provide one to one tutorial for students and usually, it will be many different scheduler activities open for students to book different appointments. So the description is frequently used. If we can search the title and description of the scheduler activity, it will be easier for students to find the right topic they want to book. Also for teachers, it will be easier to manage the schedulers by search the key word in the title or description.
We will be really looking forward to your new release with the global search feature.
Thanks.
Best wishes,
Lina
• Thu, 14 Jul 2016, 12:40 AM
Hi Lina
Just to say that the search functionality for Scheduler titles/descriptions is now included in the master branch on github and will be released as part of Scheduler 3.1, expected in August or September.
• Thu, 14 Jul 2016, 11:57 AM
Hi Henning,
Thanks a lot for your great help. I'll be looking forward to the release of Scheduler 3.1.
Best wishes,
Lina
• Mon, 12 Sep 2016, 5:32 AM
Hi Henning,

This is a really great plugin and is working great except for one issue that I'm not sure how to handle.

Is there any possibility that you could add an option to limit the number of appointments within a given day, but still giving a range of appointment times above that limit?

For example, I want to schedule my students between 12pm and 6pm Monday through Friday in 20 minute increments and 30 minutes between each time slot. I would like them to have the choice of any of those 20 minute time slots within that time frame, but I want to limit the appointments to only 3 students per day, therefore only taking up 3 time slots out of the 7 that are created for any given day. After 3 are filled, I would like it to cancel the rest of the time slots.

Is this possible?
• Mon, 26 Sep 2016, 7:37 PM
Dear Henning,
With great joy we use the schedule plugin. This helps to let our students be responsible for their own participation. However I encountered a problem.

I am not sure yet if it is the template, or the plugin. But after a teacher created time slots, it becomes impossible for him to add new time slots until he deleted the time slots or all time slots are expired . I will test the issue also with a different theme (we use the essential theme).

Moodle 2.9.6
latest PHP

Frank Weissman
• Tue, 27 Sep 2016, 1:04 AM
Dear Frank, I'm not quite sure about the problem, and have never seen this before. When you say "it becomes impossible from him to add new time slots", do you mean that the "Add slots" button is no longer being displayed, or is there any other error message? If you can reproduce the problem, it might be best to open a ticket on the Moodle tracker (https://tracker.moodle.org/) where I can follow this up further.
• Wed, 5 Apr 2017, 7:17 PM
Hi Heinning,
Many thanks for this great plugin.

I just wanna share with you a small bug while i was testing the plugin under Moodle 3.2.2 on LinuxMint 17.3 and PHP 5.6.

I added some slots, and then i wanted to delete them.

The thing is, when i choosed (Delete slots -> Delete selected slots) without selecting any of the slots, i got an error and then redirected to the main page of the course.

I would be very greatful if you can help me with this.

Amr

• Tue, 11 Apr 2017, 11:41 PM
Dear Amr, thanks for mentioning this. I have created an entry on the Moodle Tracker (CONTRIB-6857) and hope to get to it soon. Meanwhile, you can work around the problem by selecting one or more slots first.
Best wishes
Henning
• Thu, 13 Apr 2017, 12:45 AM
Hello Henning, We are currently testing an upgrade of our moodle site from 3.0 to 3.2. Our production version of mod_scheduler is 2015102902. I know it is old but...

I installed the most recent 2016100402 and encountered a databse level error. Since we have not upgraded, the cron is looking to remove old unused slots. In our case it is many thousands. Our database backend is postgres and the query has exceeded 65535 parameters. I have over 250000. Query Fails.

SELECT DISTINCT s.id
FROM mdl_scheduler_slots s
LEFT OUTER JOIN mdl_scheduler_appointment a ON s.id = a.slotid
WHERE a.studentid IS NULL
AND starttime < 1492015298

Do you have any suggestions or more importantly, is the query correct?

Thanks

Eric
• Thu, 13 Apr 2017, 10:19 PM
Hello, Henning as a followup I have modified the purge code slightly. I realize this is a unique occurrance in that there are rarely so many unused slots as the cron runs on a regular basis. But...

scheduler_instance.php

...

$todelete =$DB->get_records_sql($sql, array($now));
if ($todelete) {$keys = array_keys($todelete);$emptyslots = array_chunk($keys , 10000); foreach ($emptyslots as $emptyslot) { list($usql, $params) =$DB->get_in_or_equal($emptyslot);$DB->delete_records_select('scheduler_slots', " id $usql ",$params);
}
}

At least for sites like ours where we are still using the older version, the initial problem will be handled.

• Fri, 14 Apr 2017, 10:22 PM
Hello Eric,
good point. I've now limited the number of slots to be deleted to 1000 at a time. I'm just not sure how this problem has built up - even in earlier versions of Scheduler (back to 1.9 in fact), the cron should have deleted old unused slots periodically. It's just that it has been rewritten in the new version.
Best wishes
Henning