Does anyone know if it's possible to have the booking type (internal, external) be pre-selected based on a user's login?
That would be great, as students could be part of one auth type, teachers another, and techs another. That way, when they made a booking, the type would be selected for them.
Also, I want to add rules to each auth class. Admins would have no rules, but regular users would be limited to x number of hours of booking per day.
Anyone have any ideas on these?
Thanks very much.
I don't think the first is possible by default. You could probably modify the php code to do it. I think it would need to go in edit_entry.php. Look at the part where it outputs the select box for this.
How are you defining the user types? IIRC, mrbs only has admin and user, but you might be able to do some sort of regular expression or pattern matching if you have students starting with a different prefix (ie st01anon or c11anon), you could probably code that in.
There are various options to restrict user bookings, if you look through systemdefaults.inc.php or areadefaults.inc.php (but that might not be in your version), you might find something that does the job. this bit seems similar to what you want:
220 * Booking policies
223 // Most booking policies can be configured on a per-area basis, so these variables
224 // appear in the areadefaults.inc.php file.
226 // The settings below are global policy settings
228 // Set a maximum duration for bookings
229 $max_duration_enabled = FALSE; // Set to TRUE if you want to enforce a maximum duration
230 $max_duration_secs = 60*60*2; // (seconds) - when using "times"
231 $max_duration_periods = 2; // (periods) - when using "periods"
Any settings that you change need to go in config.inc.php, or they get overwritten the next time you upgrade.
There are currently 1 users browsing this thread. (0 members and 1 guests)