3

I have to do this (human-)time consuming scheduling task, I have:

  • A set of teachers
  • A set of sessions in one week

And I need to organize this:

  • Some weeks we don't teach (holydays)
  • Over one year the teachers have to teach the same amount of sessions
  • Some teachers have additional constraints, like "I cannot teach on Monday" or "I can teach only on Monday and Tuesday" ...

I don't know exactly what I should be looking for, I found job scheduling tools for HPC like SLURM, but I don't want to tweak them so much. Since then I've been writing small not-so-good python scripts to do that. I have no budget and I would prefer that it runs on Linux (or web based). Obviously google calendar is not enough, and I've also been trying some other tools like proofhub but it cannot do resource assignment. I think it's not so hard (basically you put the teachers in a queue and assign them with a round robin policy, that's what I've been doing since then). I want something lightweight if possible.

  • Google calendar may not be the solution, by itself, but you can extend its functionality through the Google Calendar API is multiple programming languages include python and PHP. Each teacher can have a google calendar, and some of the complexities can be handled by the teacher simply marking a timeslot as "Busy". Doesn't matter why, it only matters that they can't teach. Ditto for holidays. You may need to write some code for load balancing and/or more complex teaching restrictions. – cybernard Jul 9 '16 at 4:24
  • Are the techers totally interchangable in their ability to teach? – Mawg Dec 7 '16 at 12:58
  • In this case Yes. I know it's a scheduling problem basically, I was just wondering if some existing software is able to do this. – Emilien Dec 7 '16 at 15:19
1

Have a look at Drupal (free and open source), which runs on (eg) a LAMP stack. It also offers various "distributions", and "contributed modules" related to "calendar"-stuff.

  • A set of teachers

These would be the "users" defined in Drupal (whereas multiple "roles" can be used for all types of "permissions").

  • A set of sessions in one week

Each of those sessions could be implemented as nodes of a custom content type, with all sorts of fields corresponding to the data (attributes) to each session. Pretty sure a date/time "from" and "to" would be one of such fields, typically handled by the Date module. And with the Calendar module to show a visualization of all such sessios in calendar format.

  • Some weeks we don't teach (holidays)

No problem, there are various techniques to prevent sessions to be scheduled in such weeks. That's what typically boils down to "reservations" and/or "bookings" of a resource (= your teachers and/or your classrooms?).

  • Over one year the teachers have to teach the same amount of sessions

Makes sense, that's what "repeating dates" is all about ...

  • Some teachers have additional constraints, like "I cannot teach on Monday" or "I can teach only on Monday and Tuesday" ...

Now that is where it really gets interesting. That sounds like implementing some business logic. There are a few approaches possible, but my favourite one is the approach where the site administrator does not have to be a PHP expert. But instead only has to know about how to use the admin UI of the "Rules" module. To make it work, you'd have to think of a way to have your teachers "enter their constraints" in their profile somehow. There are multiple ways to implement such things (Drupal is like "Lego" ...). A possible (simplistic?) solution could be to use the Flag module so that each teach could "flag" the days that they are either available or not available

To make what is above work requires "Drupal site building" experience, NOT a (more expensive) "Drupal developer" who writes all sorts of custom code (which in the long run will be hard, and expensive, to maintain also).


Read on for more details (ie: this is the TL;DR mark ...).


Calendar module

The (contributed) Calendar module is commonly perceived as "the" module (plugin) for anything related to calendar-requirements. Here are some details about it (from its project page):

This module will display any Views date field in calendar formats, including CCK date fields, node created or updated dates, etc. Switch between year, month, and day views. Back and next navigation is provided for all views. Lots of the Calendar functionality comes from the Date module, so any time you update the Calendar module you should be sure you also update to the latest version of the Date module at the same time.

And a screenprint about it:

enter image description here

Making Booking (or Reservations)

That's about creating, editing, etc all sorts of things that should be part of such calendar, which is possible too (hang on a bit for an updated version of this answer).

Implementing Business logic

That's about adding all sorts of "Rules", e.g. for somebody who is not available on any Monday, which is possible too (hang on a bit for an updated version of this answer).

PS: Wait, there is even more ... a SO site dedicated to Drupal, located at Drupal Answers.

  • 2
    No no no no no definitely I don't wand to use a small plugin of a very big CMS to do that job. – Emilien Dec 11 '15 at 9:50
  • SORRY for my answer. But the comment you added now should be included in your question I think. Which is why I just suggested an appropriate edit of it ... (merci for already having accepted a refined version of it). Good luck to find a better answer – Pierre.Vriens Dec 11 '15 at 10:37
  • 1
    So how does your solution match the requirements? As Emilien correctly pointed out, Drupal is a CMS in the first place (and known as such). "offers various related stuff" is a bit vague. Take a look at out answer quality guideline to see what an answer should contain (you probably know that, you're not new here and already gained some rep – so I'm sure you can do better :) – Izzy Dec 11 '15 at 10:43
  • 1
    Sure, Pierre – I'm 100% with you at this point: I doubt that improving the answer would help the OP. But keep in mind we're not a "personal service" but a "Q&A resource"; so while it wouldn't fit Emilien's wishes, it well might do for someone else already running Drupal for other reasons. For that person it might seem a good idea just to install a plugin, as it would even integrate with other resources that way. Of course, if you think it isn't worth the effort, I can understand that, and deleting the answer would be an alternative then. Your choice ;) – Izzy Dec 11 '15 at 10:52
  • 1
    AHA, you and I seem to be on the same page. For most (or all?) of my answers I write, I always try to think like "how can I make my answer make sense in a year from now, so that somebody else (not OPer) might still perceive it as valueable". So with your latest comment, I'm for sure NOT going to delete it. Instead I'll do some extra effort to make it similar to some (???) of my well perceived answers on Drupal.SE – Pierre.Vriens Dec 11 '15 at 10:57

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.