Students can register X appointments in this scheduler

Students can register X appointments in this scheduler

by James Sick -
Number of replies: 2

In our 15 week semester, students are required to schedule and attend 12 tutorials with teacher. A single scheduler for the course, limiting the number of appointments a student can register to 12, would suit our needs perfectly. Unfortunately, the limit on number of appointments seems to be hard coded to "10." Is there a way to change this to 12?

I am not a coder myself, but we have one on staff. If someone could direct me to where the limit to the number of appointments is coded, it would help considerably.

Average of ratings: -
In reply to James Sick

Re: Students can register X appointments in this scheduler

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers
If you have staff with coding skills around, then this is quite easy to change: The relevant code is in mod/scheduler/mod_form.php near line 61.
In reply to Henning Bostelmann

Re: Re: Students can register X appointments in this scheduler

by James Sick -
Thank you Henning. I located the code and tested it on a local staging site. The change worked perfectly. I will pass on the information to our IT person who will make the changes on the production site. If others would like to know more details, I located the following code in mod_form.php and changed the "<=10" in the code below to "<=12"

$maxbookoptions = array();
$maxbookoptions['0'] = get_string('unlimited', 'scheduler');
for ($i = 1; $i <= 10; $i++) {
$maxbookoptions[(string)$i] = $i;