Jump to content

Recommended Posts

Posted
Ok, post count of 0 means use the whole room, will have to look into why that isn't getting set.

 

What value are you putting in for the quantity when you do a booking?

Anything at or below the free resource count.

Posted (edited)

Ok, the upgrade script is stuck getting reset, oops, will re-release alpha 2 with that fixed. It was resetting the can share attribute back to False each time.

 

Also found an issue with the more than 1 charging periods, another doh moment

Edited by nickbro
Posted (edited)
Ok, the upgrade script is stuck getting reset, oops, will re-release alpha 2 with that fixed. It was resetting the can share attribute back to False each time.

Oh, it only did that the first time for me. I just had to change it once. FYI: In setup, the hapswitches on the pop-up dialogs always seem to render initially as false, but the actual checkbox value is what it should be. I figure that's just a minor inconvenience since end users never see the setup menus.

Edited by Arkaine
Posted
will re-release alpha 2 with that fixed.

Don't be afraid to increment the release number. It's less confusing that way. :)

Posted
Does it seem to be working now?

 

It works fine for me in my tests

The sharing feature works, but...

 

(1) Sometimes it's still recording count="0" to Bookings.xml when a second/third user books the same lesson. In this scenario, the client doesn't send the count variable along with the other variables.

(2) Sometimes it doesn't render "X FREE" after two users book the same lesson and there are still resources free.

 

I wish I could tell you that there was some sort of pattern! We can do a remote support session if you're interested. :)

Posted (edited)
It'll get incremented in an hour anyway as it ticks over to 0527 = 27th May ;)

Do you sleep? :)

I guess I'm not the only one that doesn't!

Edited by Arkaine
Posted
Do you sleep? :)

I guess I'm not the only one that doesn't!

 

Another member of the 'who-needs-sleep?' crew reporting in. Also, HAP+ looks amazing, very much looking forward to implementing it on my new network! :D

Posted

Okay, I think I've figured out both problems.

 

Issue 1: HTTP post variable. One of the conditions in Line 473 is the culprit.

else if (curres.Quantities.length > 0 && curres.CanShare && $("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1]) {

else /*if (curres.Quantities.length > 0 && curres.CanShare && $("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1])*/ {

 

Issue 2: Rendering. I'm not sure exactly why there is a "+ 3" in lines 202-203. Maybe I'm screwing something else up by removing it, but it seems to make it function correctly.

h = '' + h;
if (!this.ReadOnly && xy + 3 < this.Quantities[this.Quantities.length - 1])

h = '' + h;
if (!this.ReadOnly && xy < this.Quantities[this.Quantities.length - 1])

Posted (edited)

I've narrowed line 473 down to one condition (the commented one).

else if (curres.Quantities.length > 0 && curres.CanShare /*&& $("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1]*/) {

Edited by Arkaine
Posted
line 473 needs to be there to stop it putting the count in when the resource isn't shared, and the quantity is the same as the full resource size
Posted
line 473 needs to be there to stop it putting the count in when the resource isn't shared, and the quantity is the same as the full resource size

 

Right, what's causing that condition to return false instead of true?

Posted

I don't know, it's really odd.

 

The + 3 thing is to now allow you to book the resource if only 3 spaces are left. I may remove that clause

Posted
The + 3 thing is to now allow you to book the resource if only 3 spaces are left. I may remove that clause

 

That would make a great resource control panel option! I'd set it to 0 myself, but maybe some like to keep spares open.

Posted
That would make a great resource control panel option! I'd set it to 0 myself, but maybe some like to keep spares open.

 

Actually, you'd probably want to set that option per resource.

Posted
line 473 needs to be there to stop it putting the count in when the resource isn't shared, and the quantity is the same as the full resource size

 

...the quantity is the same as the full resource size

...but if it can be shared, and even if the requested quantity == max quantity, then we still want the count transmitted, unless there is some other server-side logic that interprets null as just "book available quantity," which doesn't seem to be happening. It's interpreting it as "book 0 quantity."

 

Anyway, what we really want is to compare the input to the quantity available for that lesson, not the max quantity.

 

This:

$("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1]

would become:

0 < $("#bfquantspin").val() && $("#bfquantspin").val() <= whateverTheAvailableQuantityIs

 

To prevent overbookings and negative bookings (even though the dropdown input field is capped, a clever user can modify the client-side HTML/JavaScript to get around that), thus input validation should be done server-side before writing to bookings.xml, which prevents garbage records from getting into the database. <xkcd: Exploits of a Mom>

Posted
Will look into it when Sky fixes my internet at home - some bright spark dug through several sky fibre optic cables and cut off several exchanges, I'm most chuffed, so I've only got dial up speeds via the mobile phone network at the moment. I'm also in Reading today at MS UK HQ (to do with my day job now). Will try and have a look at it tomorrow, or if my internet is back on when I get home I'll have a look then. Got a 2.5 hour drive to Reading now.
Posted
...some bright spark dug through several sky fibre optic cables and cut off several exchanges, I'm most chuffed, so I've only got dial up speeds via the mobile phone network at the moment...

That sounds painful. I remember the dial-up days; we used to bond two 56k modems together to double our bandwidth at home, heh.

Posted
Will try and have a look at it tomorrow, or if my internet is back on when I get home I'll have a look then.

Hey, you've been great; there is no rush! I do have it functioning correctly with the two changes I mentioned earlier, and that's good enough to present to librarians and lab monitors.

 

I do have a request from one of my librarians, though.

 

What do you think about allowing the teacher to add notes when booking a resource...like a text area input field for special requests or details (e.g. "group work", "testing," "Johnny should work diligently on X and return to class at Y time," etc.)?

 

  • The value could be displayed as either hover text or in the "are you sure you want to remove" dialog.
  • There could be some sort of indicator on the grid that there are notes attached to the booking such as an icon, different font/background color, or text decoration (e.g. italic). That way the resource administrators know there is something to read.

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...