Jump to content

Recommended Posts

  • 4 months later...
Posted
Hi there,

 

Just experimenting with this right now but looking good. Any suggestions on how I'd get i to work with an "n-weekly" timetable?

 

Chris

Hi Chris,

 

I presume you've tried my post from #38 above?

 

Can you post a snippet of your CSV output, and a list of your sessions and non-sessions in order? (Reg, S2, Break, S3, S4, Lunch.... etc)

 

I'll see if I get chance to look through it for you.

 

Peter

Posted
If I'm honest I haven't got that far yet. I'm still trying to figure out what changes need to be made for room names to ID #'s and slots etc. Php is not something I'm all too familiar with. Your post #38 should hopefully be useful though, thanks for that I'd overlooked it.
Posted (edited)

Hello,

 

I'm currently playing about with this script and I have got a small problem that I’m hoping someone will be able to help me with.

I have got it setup so it’s working with our period structure and with a two week timetable.

However all bookings are being booked as tentative with a seemingly random mix between internal and external bookings.

Does anyone know how to get all bookings as confirmed and all as either internal or external?

 

Thank you.

Edited by Edgehill
Posted
Hello,

 

I'm currently playing about with this script and I have got a small problem that I’m hoping someone will be able to help me with.

I have got it setup so it’s working with our period structure and with a two week timetable.

However all bookings are being booked as tentative with a seemingly random mix between internal and external bookings.

Does anyone know how to get all bookings as confirmed and all as either internal or external?

 

Thank you.

Hi,

 

At the top of the script around line 28 are three lines:

 

$defaultEntryType = "E";	// Default Type for each Entry
$alternateEntryType = "J";
$alternateEntrySubCodes = "Rg|ICT|It|Co";

 

If any of your lessons match the codes in line three (Rg, ICT, It or Co) then they will be marked with entry type J (line 2) otherwise they will be entry type E (line 1).

 

If you want them all Internal, then set both lines 1 and 2 to entry type E (or whatever type you are using for Internal - see your config.inc.php for this if you're not sure)

 

I'm not sure about tentativeness to be honest - unless you have some of your types to require confirmation? (I don't use confirmation so I don't know if/how it affects anything)

 

Peter

  • Thanks 1
Posted

Hey Peter,

 

Is there any chance you could send me a copy of your script? I could maybe then revers engineer it to suit our set up.

 

All the very best

 

Hi Chris,

 

I presume you've tried my post from #38 above?

 

Can you post a snippet of your CSV output, and a list of your sessions and non-sessions in order? (Reg, S2, Break, S3, S4, Lunch.... etc)

 

I'll see if I get chance to look through it for you.

 

Peter

Posted
Hey Peter,

 

Is there any chance you could send me a copy of your script? I could maybe then revers engineer it to suit our set up.

 

All the very best

Ok, see attached - it shouldn't be much different other than a few lines may have been unwrapped so I can follow loops and if()'s more easily.

 

Peter

bulkYearMake.txt

Posted (edited)

Re the 'confirmed' thing, try adding the following lines near the bottom of the script, just after $postData[20][1] = "series";

 

$postData[21][0] = "confirmed";
$postData[21][1] = "1";

 

This should tell the script to create all confirmed entries. We don't use confirmation here - hence why this has been missed out.

 

Let me know if this works, and if so I'll add it to the script next year.

Edited by Minkus
Posted

Thanks for the quick replies. I really appreciate it.

 

All booking are now showing as external.

 

I tried;

 

$postData[21][0] = "confirmed";

$postData[21][1] = "1";

All bookings are still coming back as tentative.

 

As far as I’m aware I’ve not setup anything up in Config.inc.php with regards to confirmation. As when I manual input a booking it defaults to being confirmed.

Posted
Hmmm... not sure then. If you want to disable confirmation completely, switch it off in the Area setup. Otherwise I'll have to look at this next time I update the script, but this might not be until next September, I'm afraid! :/
Posted

I’ve already tried to completely disable it. But it didn’t seem to work. I added the following line to config.inc.php,

$cofrmation_enabled = FALSE;

Is this correct or is there something else I need to do.

 

Thank you.

Posted

The above line just disables it for new areas.

 

You still need to go into MRBS / Rooms (at the top), select each 'Area', click the 'pen' to the right, and UNtick 'Allow Tentative Bookings'

 

Hope this helps!

  • Thanks 1
Posted

Thanks for that Peter. I think I've got it looking something like it should however when I run the script in a browser I'm getting Notice: Undefined index: csvfile in C:\xampp\wwwroot\mrbs-1.4.9\web\bulkYearMake.php on line 137

Any ideas how I can fix this?

Posted

Hi,

 

If you put the following line in your php.ini, it will stop 'Notice' and 'Deprecated' warnings from appearing:

 

error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE

 

Maybe not the response that you want - but notices are not 'fatal' errors, just warnings of less than perfect coding - which this script definitely has lots of, I'm afraid :)

Posted
It's after I try to upload the .csv. It thinks about it for a little while then gives up.

Does line 285 (ish) still say:

</pre><form enctype='\"multipart/form-data\"' method='\"post\"' action="%5C%22%22.%24_SERVER%5B'PHP_SELF'%5D.%22%5C%22"><

 

How big is the CSV you're using?

 

Peter

  • 2 weeks later...
Posted

Our current periods are setup as below in MRBS:

 

Before School

Period 1

Period 2

Morning Break

Period 3

Period 4

Lunchtime

Period 5

Period 6

After School 16.00 - 18.00

After School 18.00 - 20.00

After School 20.00 - 22.00

 

 

And in SIMS as:

 

Reg AM

P1

P2

P3

P4

RegPM

P5

P6

 

Any help you could give me about fixing this so the import would work correctly?

Also I tried the import and it brings up conflicts but also interestingly starts the booking process at 1970 not the date specified?

 

 

Wes

  • 2 weeks later...
Posted

Sorry Wes, been off ill for a fortnight.

 

Can you re-cap where we're at with this?

 

If anyone else is waiting for a response from me, please ask again!

 

Peter

Posted

Still at the same problem as above unsure how to setup the CSV file so that it can import as the sims csv doesn't have these periods?

 

Thanks

 

 

Wes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...