2

I want to make a calendar view that will show when music teachers are available, so that students can register online and attend a lesson. The courses have all the same duration which is 2 hours. For this, I created a content type called "Lessons" (Fields: title, description, teacher name, teacher email, date/time) and a content type using node reference module for registrations to each specific lesson. In that way students can register online for music lessons.

There are 2 problems with this:

  1. How can I have a fixed 2 hour duration in the day of the calendar view that won't let students register for more or less time than the two hours? I can not just hide the time fileds because the system must show them the time that the lesson takes place?

  2. I want to allow just one user register for each lesson and then the system must show that lesson as booked. To be more specific, I want the calendar to show the whole day seperated in 2-hour periods and which periods are free. When a user registers for a lesson, the lesson changes color (I can do this with css) and is marked as reserved so that the "next" user can only register for another of the open lessons and so on.

Any ideas?

  • As for #2, you could use the Flag module. Let a user "reserve" a lesson by flagging it, and then disallow registration for any lessons that have been flagged. Please note that on Drupal Answers, you will usually get better answers faster if you break each post up into one question rather than two as you have down here. If you have two fairly different questions, people will feel obligated to answer the whole thing when they may only have a good solution for part of it, discouraging them to respond. – Patrick Kenny Jan 17 '13 at 1:13
  • How is the registration handled now? IS it by just creating a node by the student or are you using any registration module. – Mohammed Shameem Jan 17 '13 at 3:37
  • Thanks for your response and for your advice! I will try the flag module right away! As for the registration, I tried the cck signup module but could not manage to understand it correctly. I want to try it again! For the moment, the student creates another content type and registers for the lesson. And I made a view to see who registered for each lesson. – Pam Adams Jan 17 '13 at 6:36
0

If you don't want to re-invent the wheel, have a look at these contributed modules that are typically used for this (quotes are from their project pages):

  • Availability Calendars.

    ... allows you to add an availability calendar to entities. Example use cases are tourist accommodation, e.g. bed and breakfast, holiday homes or self catered apartments, and car or motor bike rental.

    An availability calendar shows your customers at what dates your accommodation is still available and at what dates it is already booked.

  • Simple Reservation.

    ... provides a simple and easy way to reserve items which can be created by the administrator. Examples for it's usage can be hotel rooms, boats, cars, airplanes, basically anything you can think of which can be reserved by one individual.

    The module provides the possibility to create reservations for other users (dependend on the permissions), and provides also restrictions in the maximum number of reservations a user can make and a maximum time a reservation can be made in advance.

    There is NO support for payment, booking and what ever one could imagine beyond the pure and simple reservation, and it is also NOT intended to create more than this simple functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.