IMPORTANT - The script has been updated, please jump to post 50 for the latest working version.
The old attachment has been removed to prevent confusion.
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 vikpaw; 25th February 2013 at 06:26 AM. Reason: update notice | Reuploaded Attachment as Corrupted / Reuploaded under GPL
What licence have you released this under?
Released under GPL - sorry, hadn't thought of this.
Added GPL statements and copy to zip file.
Very nice I will have a good look at this soon .
Thanks for updating Edward, greatly appreciated
Tried this but my second line in the exported CSV file ws just:
Not sure if its jsut cos the timetable doesn't take effect until 3rd September so will try again next week...
Bug Fix: Now allows lessons longer than 2 periods long; i.e. a triple or quadruple.
S'OK. Extracted fine with WinRAR.
The contents of the compressed archive is a single file, 'SIMStoMRBS', which has no file extension and opens as gobbeldygook.
Downloads fine for me in Firefox, but not in IE!
Code:# Archive C:\SIMStoMRBS(1-0-1).zip 2009-09-04 10:25 9645 3719 bulkYearMake.php 2009-08-25 14:43 35147 12112 gpl.txt 2009-08-25 11:18 4279 4272 Room Timetables.RptDef # # Total Size Packed Files # 49071 20103 3
Works fine through Firefox.
Sorry, two quick questions..
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.
Hope this helps!
bonjour (7th September 2009)
There are currently 1 users browsing this thread. (0 members and 1 guests)