+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, MRBS - Use user type to assign booking type. in Coding and Web Development; Hi all, Does anyone know if it's possible to have the booking type (internal, external) be pre-selected based on a ...
  1. #1

    Join Date
    Oct 2011
    north vancouver
    Thank Post
    Thanked 0 Times in 0 Posts
    Rep Power

    MRBS - Use user type to assign booking type.

    Hi all,

    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.

  2. #2

    Join Date
    Sep 2008
    Thank Post
    Thanked 70 Times in 62 Posts
    Rep Power
    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:

    219 /******************
    220 * Booking policies
    221 ******************/
    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.

+ Post New Thread

Similar Threads

  1. how to set booking in MRBS v1.45 ?
    By Marcelo in forum Scripts
    Replies: 0
    Last Post: 8th December 2010, 12:01 PM
  2. Registry of pupil user type
    By kcymer in forum Network and Classroom Management
    Replies: 5
    Last Post: 23rd November 2010, 02:07 PM
  3. Replies: 3
    Last Post: 20th January 2010, 09:56 PM
  4. Using Group Policy to allow a user to install software
    By kaphc in forum Windows Server 2000/2003
    Replies: 3
    Last Post: 16th December 2009, 08:37 PM
  5. Replies: 2
    Last Post: 9th January 2006, 07:43 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts