Network and Classroom Management Thread, MRBS Help! Thanks! in Technical; Hey Everyone,
We are using 1.4.1 and I am having some issues. I want to limit bookings to 45 minutes, ...
18th October 2011, 06:57 PM #1
- Rep Power
MRBS Help! Thanks!
We are using 1.4.1 and I am having some issues. I want to limit bookings to 45 minutes, no more.
I took this code from online:
# if not administrator, reject bookings longer than 2 hours
if ((!getAuthorised(2)) && (($units * $duration) > 7200))
print_header($day, $month, $year, $area);
<H1><?php echo get_vocab('invalid_booking'); ?></H1>
<?php echo get_vocab('invalid_duration'); ?>
and put it in the edit_entry_handler.php and it is not working. I have looked through all the code and one of the problems is that I have to do this through VIM. It's not the easiest to read or search! haha
Any help would be appreciated. Thanks,
18th October 2011, 08:54 PM #2
Is it possible for you to update to the latest version? 1.4.1 is 2 years old. There is an option in 1.4.7 for this:
// Set a maximum duration for bookings
$max_duration_enabled = FALSE; // Set to TRUE if you want to enforce a maximum duration
$max_duration_secs = 60*60*2; // (seconds) - when using "times"
$max_duration_periods = 2; // (periods) - when using "periods"
There are also other improvments as well.
If you don't have any customisations, the upgrade is usually fairly painless as long as you have a working backup.
19th October 2011, 01:46 PM #3
- Rep Power
Is the upgrade seamless? And what do I need to do for the upgrade? Our programmer in IT left so I took over this but I am not familiar with MRBS.
We have it working with our LDAP and I am wondering if the upgrade will mess that all up?
19th October 2011, 02:06 PM #4
As Chris said, it's fairly painless unless you have custom code. I have completely redesigned our MRBS to the extent it is unrecognisable (see here), though if it's just using a vanilla setup, it's normally just a case of overwriting the MRBS files (afaik, there is no upgrade routine via GUI or cmd).
Just make sure you don't overwrite your current config.inc.php as you'll need that for reference when reconfiguring the settings (but rename the old one).
You could, if you're feeling nervous, is copy the files for the new version to a different folder/location but still reference the same database and have 2 versions of MRBS working with the same database. That is what I did whilst I developed the newer version to suit our needs, and staff continued to use the old version, then I simply renamed the folder where the new version was and it was fine!
Not sure about LDAP, as I use an independant database for MRBS (for 2 reasons - had issues with LDAP and cba looking into it)!
By Gavinc in forum Network and Classroom Management
Last Post: 16th January 2009, 11:16 AM
By mickeyh080 in forum Network and Classroom Management
Last Post: 21st June 2008, 04:05 PM
By Scotmk in forum Wireless Networks
Last Post: 27th March 2008, 08:34 AM
By niknik in forum Web Development
Last Post: 29th August 2007, 03:00 PM
By adamf in forum Network and Classroom Management
Last Post: 22nd April 2007, 09:48 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread