Why aren't locations basic entities?

Why aren't locations basic entities?

by Florian Metzger-Noel -
Number of replies: 2

I'm currently working my way into the moodle framework as I have a job writing a plugin for a school.

The basic entities in the moodle core seem to be courses, users, enrollments and many others... but I'm missing one that seems to be so essential, that I'm wondering if I oversaw it: locations

Most schools are physical buildings and courses or events often happen in physical rooms. Shouldn't there be a form in the general settings where you could define a list of rooms? These rooms could be referenced by courses, sessions, events, etc.. 

I could write a plugin that adds this feature - but plugins aren't allowed to talk to each other, so this seems to be something that should be part of the core implementation. Actually: all it would take would be a "locations" table and a little management form in settings. In a perfect world this would be an API that also allows for checking double bookings of rooms..

Please tell me if I oversaw something or if you think this could be a good feature for a future release.


Thanks,

Florian Metzger-Noel

Average of ratings: -
In reply to Florian Metzger-Noel

Re: Why aren't locations basic entities?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You have not overlooked anything, core Moodle does not know anything about locations. This is similar to how it doesn't know anything/much about timetables or management hierarchies. Plugins can talk to each other so long as they know about each other i.e. are created by the same/collaborating people.

*You are probably straying into the the area of a School Management System which covers things slightly outside a strict interpretation of the core function of Moodle to cover Teaching and Learning. This can be a useful way of searching the Moodle table structure.
https://www.examulator.com/er/

*observation not criticism.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Why aren't locations basic entities?

by Florian Metzger-Noel -
You're absolutely right - the project I'm assigned for aims at adding some school management features to moodle. The main reason being that the school uses moodle already and these features would come in really handy - they prefer this over getting a second software for school management.

When the plugin is ready, moodle will be one step closer into being a school management solution, too smile

Thanks for the great map of the moodle database! Also for the insight on plugins talking to each other.. I saw somewhere in the moodle dev docs, that plugins shouldn't talk to each other bidirectionally, only a dependent plugin should be allowed to talk to the plugin it's dependent  on. But I guess, that's a clean code recommendation and not a technical limitation.