Version 1.3 of SIMS to MRBS script
Version 1.3 of the script is now available, with the following improvements:
- Import multiple rooms from a single file (you can select multiple rooms in SIMS, change all of the IDs in one go, and they should all be imported at once - saves time!)
- Check for matching teachers when combining periods as well as room, class, and day
Download here: Attachment 20318
- Extract bulkYearMake.php and copy it to your main MRBS folder
- Extract Room Timetables.RptDef and import it into SIMS.Net
Edit bulkYearMake.php according to your own school's needs:
- Default entry type for booking, and an alternative type for certain subjects if you want - see first few lines of the script.
- MRBS period setup - search for 'PERIOD EXPLANATION' inside the source for more details. You need to tell it how the periods in the SIMS export file match up to the periods in MRBS. If you're not sure, there is some advice in the previous posts on this forum, or you could just run it against your MRBS as-is - but make a back up first!
- (You don't need to map room names to numbers in the script any more - see below).
- Run the 'Room Timetables' report under SIMS.Net, select the room(s) that you want to import (can now import multiple rooms in one go), and save the file it generates
- EDIT the file that SIMS.Net generated - replace the name of each room (e.g. "Z") with the internal MRBS 'room' ID (e.g. "1"). To find the MRBS 'room' ID, open a room in MRBS, and look in the address bar for 'room=#'. It should look something like this when you are done:
"Room","Day name","Period","Class","Initials","Subject code","Students"
- Navigate to bulkYearMake.php in your Web browser, change the 'Start of Term' and 'End of Term' fields if you want to, select the file you edited earlier, and click 'Go'. (You only need to change the edit_entry_handler.php field if you put bulkYearMake.php into a different area of the website to your main MRBS install).
- The script should load & create a series of frames within itself, each of which represents an attempt to book a period into MRBS. It may take some time to load - be patient! If it all works OK, you should see each of these displaying the MRBS calendar, and the necessary entries created. If not, you may see an MRBS error message or a Scheduling Conflict. If you get an error message, try importing again, just in case this helps. If you get a scheduling conflict, and you are running MRBS 1.4.8 or above, you should be able to tell it to ignore the conflict if you want to.
- Make sure you get rid of bulkYearMake.php from your MRBS directory when you're done. It's not insecure in the way it accesses the MRBS database, but it was hacked together & is probably full of XSS vulnerabilities.
The script was tested with MRBS 1.4.8 - let me know if it stops working in a later version. Can I also encourage you to upgrade MRBS to at least version 1.4.8 if you haven't done so already, as it supports the ability to ignore scheduling conflicts for repeat entries and create as many entries as it can, which is great if you already have bookings in your database.
It's released under the GPL as before, so if you do make any changes that others might find helpful, please post them back here so that we can all benefit.
For instructions to modify this script to ensure operation with MRBS 1.4.10 and above, see here: