+ Post New Thread
Page 2 of 8 FirstFirst 123456 ... LastLast
Results 16 to 30 of 106
Scripts Thread, SIMS to MRBS: Script Available in Coding and Web Development; Cheers dude. One other thing.. I understand how MRBS deals with periods / slots, but I'm unsure exactly as to ...
  1. #16

    Join Date
    Jul 2007
    Posts
    64
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    15
    Cheers dude.

    One other thing..

    I understand how MRBS deals with periods / slots, but I'm unsure exactly as to what I have to change in the bulkYearMake script.

    The bookable periods we have (that appear in MRBS) are 'Before school', 'Period 1', 'Period 2', 'Period 3', 'Period 4', 'Lunch', 'Period 5' and 'After School'. How would this transpose into the bulkYearMake script.

    Thanks ever so much for your help. This will save an immense amount of time in the coming years.

  2. #17

    Join Date
    Aug 2009
    Posts
    7
    Thank Post
    0
    Thanked 6 Times in 4 Posts
    Rep Power
    0
    Before School = Slot 0
    Period 1 = Slot 1
    Period 2 = Slot 2
    Period 3 = Slot 3
    Period 4 = Slot 4
    Lunch = Slot 5
    Period 5 = Slot 6
    After School = Slot 7.

    You need some sort of code that manages the period number and adds one; e.g.
    PHP Code:
    if(substr($period[$item],4,2) == "Rg"){ 
        
    $pmrbs 0
    } else {
        
    $pmrbs = (int)substr($period[$item],4,2);
        if(
    $pmrbs >= 5){$pmrbs += 1;}

    i.e. If the Period >= 5, then Add 1 to make the Slot Number correct.

  3. Thanks to McTedo from:

    bonjour (7th September 2009)

  4. #18

    Join Date
    Jul 2007
    Posts
    64
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    15
    Thanks mate.

    My php isn't actually that bad, I just couldn't quite work it out.

  5. #19

    Join Date
    Jul 2007
    Posts
    64
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    15
    Sorry, me again.

    Finally received the timetables from our data manager in .CSV format.

    Whenever I try to import a room's timetable, though, I get the following errors:


    Notice: Undefined offset: 2 in /home/ileagorg/public_html/aps_mrbs/bulkYearMake.php on line 83 - Same error for lines 84 through to 91, 93, 95 and 111


    Warning: require_once(HTTP/Request.php) [function.require-once]: failed to open stream: No such file or directory in /home/ileagorg/public_html/aps_mrbs/bulkYearMake.php on line 140

    Fatal error: require_once() [function.require]: Failed opening required 'HTTP/Request.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ileagorg/public_html/aps_mrbs/bulkYearMake.php on line 140


    Have I just done something silly, or is it more serious?

    Cheers.

  6. #20

    Join Date
    Jul 2007
    Posts
    64
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    15
    The problem would appear to be with line "require_once "HTTP/Request.php";

  7. #21

    Join Date
    Jul 2007
    Posts
    64
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    15
    Also, at the top of bulkYearMake.php, I get the line Notice: Undefined index: csvfile in /home/ileagorg/public_html/aps_mrbs/bulkYearMake.php on line 28
    .

    Is this normal?

  8. #22
    walkden-high's Avatar
    Join Date
    May 2009
    Location
    salford- manchester
    Posts
    29
    Thank Post
    6
    Thanked 1 Time in 1 Post
    Rep Power
    0

    bulkYearMake.php

    Hi there

    Has anyone got an example of what the script should look like for importing in to edit_enty_handler.php everytime I fill in the form and press go nothing happens it just says results with a white screen.

    Below is what I have so far as a test for one period every monday I have saved it as rm10.csv

    ('ROOM10','MON:07','1','11E','SDW','EN4','I','0');

  9. #23

    Join Date
    Oct 2009
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    SIMs to mrbs

    Hi i am getting the same error as bonjour
    an example of what the csv file and php script should look like when edited would be helpful
    thanks j

  10. #24


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148
    Has anyone got this to work yet? Getting the "require_once "HTTP/Request.php"; error, and the report def doesnt seem to output the teacher name entry.

    We have 5 periods per day, 2 week calender. Thats it, no bookings any other time.


    Anyone fancy sending me their working bulkYearMake.php?
    Last edited by j17sparky; 20th November 2009 at 10:57 AM.

  11. #25


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148
    Anyone?

  12. #26
    walkden-high's Avatar
    Join Date
    May 2009
    Location
    salford- manchester
    Posts
    29
    Thank Post
    6
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Bulk import

    Hi J17 Sparky

    I never managed to get the script to work for me neither I do have a method of block booking rooms for up to 8 weeks if you are interested, I have attached 2 spreadsheets that uses a formula to put the correct time stamp in the periods once you have selected the date eg 05/01/10 the first day of term in Jan.

    You will have edit the formula in B-4 to match your periods it is currently setup to find the time stamp for our 5 periods then all you do is fill fill in the fields that are in yellow.

    our periods below

    before school
    period 1
    period 2
    break
    period 3
    period 4
    lunch
    period 5
    after school

    once I have my spreadsheet filled in correctly I then save it as a tab delimited txt file then import in to mrbs_entry with php myadmin straight in to the database.

    unix time stamp finder

    UNIX Timestamp To Standard Time Calculator

    Hope this can help, let me know if you have any problems

    Justin
    Attached Files Attached Files

  13. #27


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148
    Cheers for that.

    Ive put the entries in until feb half term so will have to wait till then to try your spreedsheet.

    Cheers

  14. #28
    RobFuller's Avatar
    Join Date
    Feb 2007
    Location
    Chelmsford
    Posts
    311
    Thank Post
    82
    Thanked 38 Times in 28 Posts
    Rep Power
    22
    Anyone come across this error before?

    Windows IIS7 Application Event Log -

    php[4364]
    PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'HTTP/Request.php' (include_path='.;C:\php5\pear') in D:\Websites\IRBS\bulkYearMake.php on line 170

    php[4364]
    PHP Notice: Undefined offset: 26 in D:\Websites\IRBS\bulkYearMake.php on line 143

    php[4364]
    PHP Notice: Undefined offset: 2 in D:\Websites\IRBS\bulkYearMake.php on line 129

    php[4364]
    PHP Notice: Undefined offset: 2 in D:\Websites\IRBS\bulkYearMake.php on line 127

  15. #29

    Join Date
    Jun 2007
    Location
    Colchester, Essex, UK
    Posts
    56
    Thank Post
    2
    Thanked 16 Times in 14 Posts
    Rep Power
    21

    Lightbulb

    Dear all,

    Revisited this script for the coming academic year (it was originally written by a former pupil at my school) and realised that many people were struggling to get it to work.

    I have now rewritten the script so that it no longer depends on the PEAR HTTP_Request module, which seemed to be causing most of the problems. It now uses iframes to accomplish the same goal instead, which also has the advantage that it will probably work on almost any copy of MRBS, so long as you can get into it from a web browser.

    I've also made a few other fixes and alterations to make the script work with the latest version of MRBS (1.4.7) and easier to use.

    To install:
    1. Extract bulkYearMake.php and copy it to your main MRBS folder
    2. 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, 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).


    To use:
    1. Run the 'Room Timetables' report under SIMS.Net, select a single room, and save the file it generates
    2. EDIT the file that SIMS.Net generated - replace the name of the 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:
      Code:
      "Room","Day name","Period","Class","Initials","Subject code","Students"
      "3","Fri","Fri:1","9cr/Gr2","RS  ","Gr",22
      "3","Fri","Fri:10","8C/Ma","HO  ","Ma",32
      "3","Fri","Fri:2","9cr/Gr2","RS  ","Gr",22
      ...
    3. 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).
    4. 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 (which you need to resolve yourself!) or a Scheduling Conflict (which means you need to clear out the room bookings before you start).
    5. 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.

    I hope a few more people manage to get this one to work. I have tested it pretty extensively here and it seems to work fine.

    I can't offer a huge amount of support for people wanting to get it to fit their timetable - you'll need to experiment yourself - and if it doesn't work in other MRBS auth schemes (we use IIS and 'nt') then I probably can't help there either. However any other problems drop a message in this post and I'll see what I can do to help.

    It's released under the GPL as before, so if you do make any changes that others might find helpful (one idea would be to modify the script so that it can handle more than one room at once), please post them back here so that we can all benefit.
    Attached Files Attached Files
    Last edited by Minkus; 16th September 2011 at 04:15 PM.

  16. Thanks to Minkus from:

    PICNIC (24th July 2012)

  17. #30
    mikeglover's Avatar
    Join Date
    Mar 2009
    Location
    Northampton
    Posts
    149
    Thank Post
    33
    Thanked 30 Times in 9 Posts
    Rep Power
    16
    I'm having issues working out what to change the periods to in the bulkYearMake.php. We dont have a Reg in the morning so currently when i import the timetable Mon:1 is appearring in the Lesson 2 slot on MRBS. This is the period script I have setup already:
    if(substr($period[$item],4,3) == "RgA"){ // If this is an AM registration period
    $start_secs = 12*60*60;
    } elseif(substr($period[$item],4,3) == "RgP"){ // If this is a PM registration period
    $start_secs = 12*60*60 + (60 * 9);
    } else { // If this is an ordinary period
    $this_period = (int)substr($period[$item],4,2); // Get the period number into an integer
    if($this_period == 5 or $this_period == 6){$this_period += 1;} // If we are Periods 5 and 6, add one (to skip break)
    elseif($this_period >= 7){$this_period += 3;} // If we are Period 7 or beyond, add three (to skip break, lunch and registration PM)
    $start_secs = 12*60*60 + (60 * $this_period); // Convert the period number into seconds for MRBS
    }
    And the periods that appear in the SIMS csv are Mon:1, Mon:2, Mon3, Mon4, Mon5, Mon6. The script doesnt need to skip any breaks or lunches.
    Can someone help me by giving me the correct script I need. Thanks

SHARE:
+ Post New Thread
Page 2 of 8 FirstFirst 123456 ... LastLast

Similar Threads

  1. Exporting SIMS timetable into MRBS
    By amvc in forum MIS Systems
    Replies: 2
    Last Post: 29th July 2009, 04:25 PM
  2. Changing passwords for SIMS users by script
    By academic_mwnci in forum MIS Systems
    Replies: 2
    Last Post: 3rd September 2008, 12:02 AM
  3. SIMs backup script after SQL 2005 migration failing...
    By mullet_man in forum MIS Systems
    Replies: 13
    Last Post: 23rd November 2007, 06:03 PM
  4. MRBS help
    By niknik in forum Web Development
    Replies: 0
    Last Post: 29th August 2007, 03:00 PM
  5. SIMS update script
    By nicholab in forum MIS Systems
    Replies: 1
    Last Post: 27th April 2007, 08:17 AM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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