Scripts Thread, SIMS to MRBS: Script Available in Coding and Web Development; Dear all,
Please find attached to this thread a script allowing you to import your SIMS Room Timetable into MRBS, ...
Please find attached to this thread a script allowing you to import your SIMS Room Timetable into MRBS, by exporting to CSV first.
To Set Up:
Place the PHP Script in the same folder as MRBS' config.inc.php
Amend the PHP Script (see below)
Amendments to make for your school:
Room Names to ID Numbers (Script Lines 44-61, using mrbs_room table in database for reference)
Default Entry Type for Booking, and an alternate entry type, along with which subjects to use this entry type for (Script Lines 17-19, using MRBS config.inc.php for reference)
Your Periods/Break/Lunch system, as MRBS treats each period as a 'booking slot' and break/lunch as a 'booking slot', so Period 10 = 0 (first 'slot') + 1 (registration) + 9 (periods past) + 1 (break) + 1 (lunch) = Slot 12, see script lines 203-217 with longer explanation.
Instructions for use:
Export SIMS timetable for ONE ROOM using attached Report Definition
Load PHP Script in Web Browser
Fill out form, including File to Upload [Start/End Term Dates auto-suggested]
Press Go.
CSV File Notes (auto-setup in Report Definition though):
ONE ROOM ONLY
Order of Columns: Room, Day, Period, Class, Teacher, Subject Code, NoStudents
Period should be defined as 'Mon:7' or 'Mon:07'
Hope this helps!
Last edited by McTedo; 25th August 2009 at 02:46 PM.
Reason: Reuploaded Attachment as Corrupted / Reuploaded under GPL
1. Do the room names ID Numbers on lines 44+ have to match exactly with the names and numbers in the MRBS_room table?
2. Does a room name / number entry have to be created for every bookable item in MRBS? We have some equipment on there that we obviously don't have a timetable for.
1. Names don't need to match, ID numbers do. (e.g. Sims knows one of our rooms as 'CON', and the name of the room in MRBS is 'Connexions'. The ID number to convert CON into must be the same as in the mrbs_room table.
2. No; just the ones you are going to import with the script.