## Activities: Reservation

mod_reservation
Maintained by Roberto Pinna
This activity module permits to schedule an event with a defined reservation time.
672 sites
23 fans
Moodle 2.2, 2.3, 2.4
The main targets of this module are schedule laboratory sessions and exams but you can schedule everything you want.

Teacher can define the number of seats available for the event, event date, reservation opening and closing date.
A reservation may have a grade or a scale.

After the event starts the teacher can grade the event. Students will noticed by mail.

- teacher can also define multiple sublimits for available seats basis on user profile fields;
- reservation permits overbooking, also for sublimits;
- teacher can manually reserve seats for other user;
- teacher can send messages to reserved users;
- admin can define which profile fields are shown in reservation list table in reservation module settings;
- reservation can be connected to another reservation so students can reserve to only one of them;
- managers and administrators can upload list of reservation through a CSV file;

### Awards

• Thu, 26 Nov 2015, 4:11 PM
Sorry that's my fault.
Reservation 3.0 must require Moodle 2.9.
I try to update 2.7 release to solve this problem.

Regards,
Roberto.
• Thu, 26 Nov 2015, 10:39 PM
Hello,
I've update Reservation 3.0 to support Moodle 2.7 and above.

Roberto.
• Fri, 27 Nov 2015, 9:19 AM
Hi Roberto,
Thanks for the quick response. We will update the Reservation 3.0 now.
Lina
• Fri, 27 Nov 2015, 9:24 AM
Hi Roberto,
We've tested that everything is working with this new version. Thanks a lot.
Lina
• Fri, 11 Dec 2015, 2:51 AM
Hi Roberto,
I have a brand new installation of Moodle 2.9.3 and a new server. Tried to install but it fails at validation. Would you help please.
Thanks a lot.
Ranjana
• Fri, 18 Mar 2016, 5:20 AM
I've got a situation where we have students that we know are registered and in a reservation; but, as an admin, when I go to the reservation page to manage the list and perhaps even cancel some reservations, there are no students listed. I had emptied my cookies the other day, and I had also changed the reservation end date of the activity, a few days after the reservation window had closed. Since then, I can't seem to see the reservation list, and even when I reserved a spot, the counter on the page still says 0/20. I can't even see myself on the list after I made my own reservation. I can see the students when I run my daily query against the database, and the output shows me all reservations NOT cancelled. They are there. The other reservation activity that we set up has 19 students in it, and I can see and manage that list no problem. CAn you suggest what could be causing this behavior??

Thanks
• Tue, 10 May 2016, 1:27 AM
Salve, ho un problema con il modulo: ho installato la versione 3.0 del modulo su Moodle 2.8.5 ma non riesco ad accedere alla pagina di invio messaggio per i prenotati delle attività: dopo aver selezionato uno, più o tutti i prenotati nella scheda "Gestione prenotazioni", seleziono "invia messaggio" e clicco su OK. A questo il punto il sistema mi genera una pagina bianca con lo stesso url dal quale sono partito (http://www.icscalvino.gov.it/Moodle/mod/reservation/view.php?id=109&mode=manage). Specifico che non sto usando l'invio attraverso SMTP. E' obbligatorio per attivare questa funzionalità del modulo? Grazie in anticipo per ogni suggerimento!
• Tue, 10 May 2016, 3:29 PM
Ho aggiornato la versione del modulo 3.0 qui pubblicata con l'ultima versione che era già disponibile su github. Dovrebbe risolvere il problema segnalato.
• Tue, 10 May 2016, 6:15 PM
Ciao Roberto, grazie per l'immediata risposta. Purtroppo però scaricando la versione da github e sostituendola, il sistema mi segnala che è necessario l'aggiornamento del db ma lanciandolo mi appare questo errore di cui invio screenshot: https://drive.google.com/open?id=0B6VGQmq43cXSVi1CV2xMblNQQWs (NB fra l'altro tornando alla vecchia versione sono sparite tutte le icone delle prenotazioni dalle attività dei corsi...).
• Tue, 10 May 2016, 7:19 PM
Ok, come non detto per il problema di aggiornamento. Tutto ok. L'unica cosa è che continua a non visualizzare l'icona nella struttura del corso e nella pagina di ogni attività di tipo prenotazione (il link errato all'icona è: http://www.icscalvino.gov.it/Moodle/theme/image.php/adaptable/reservation/1462874402/icon), mentre la visualizza correttamente nella pagina di panoramica plugin (questo il link corretto: http://www.icscalvino.gov.it/Moodle/theme/image.php/adaptable/mod_reservation/1462874402/icon)
• Tue, 10 May 2016, 7:24 PM
Risolto finalmente tutto con l'aggiornamento del db.
• Tue, 28 Jun 2016, 4:16 PM
Hi Roberto. 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 Reservation 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 Reservation plugin is installed and available. However, as you can see, the Reservation 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 Reservation 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 Reservation 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
• Tue, 20 Dec 2016, 10:06 PM
Hi, I've discovered two small bugs. I provide the descriptions and the fixes in the following. Perhaps, it should be good to integrate them in the next realease.

1) The option "Users can view requests list" doesnt work. The problem is a ">" instead of a "<" in line 878 of view.php as in the following:
($now <$reservation->timeclose) && (is_enrolled($coursecontext)))) { 2) The list of teachers in the reservation settings shows also the managers inherited from the category where the course resides. A possible fix in mod_form.php is to replace the line if ($teacherusers = get_users_by_capability($context,$capability, 'u.*', 'u.lastname ASC')) {
with these two
$teacherRole =$DB->get_record('role',array('shortname' => 'editingteacher'));
if ($teacherusers = get_role_users($teacherRole->id, $context)) { Bests, Valentino • Tue, 20 Dec 2016, 10:22 PM Hi Valentino, the first one is not a bug. Student can view request list, as for reservation number, only after the reservation time has expired. This is done because during reservation time the list numbering can change. A new feature for the next release could be to let the teacher choose when list or reservation number are shown. For the second I think could be useful to add a capability instead of using course one. Cheers, Roberto. • Tue, 20 Dec 2016, 11:10 PM Thanks for the reply. I think that the name of the option is misunderstandable. A lot of our teachers think that, setting that option, the request list should appear to every student at every time. To address the complaints I have now changed the if: if (has_capability('mod/reservation:viewrequest',$context) || (($reservation->showrequest == 1) && ($now > $reservation->timeclose) && (is_enrolled($coursecontext)))) {
to this one
if (has_capability('mod/reservation:viewrequest',$context) ||$reservation->showrequest == 1 ) {

Now, if the option is set, students can see the request list at every time. Moreover, also teacher/manager/admin can see the list if they switch the role to student.

Bests,
Valentino