Arkaine Posted May 26, 2013 Author Posted May 26, 2013 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.
Arkaine Posted May 26, 2013 Author Posted May 26, 2013 It's weird, because sometimes it works and sometimes it doesn't.
nickbro Posted May 26, 2013 Posted May 26, 2013 (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 May 26, 2013 by nickbro
Arkaine Posted May 26, 2013 Author Posted May 26, 2013 (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 May 26, 2013 by Arkaine
Arkaine Posted May 26, 2013 Author Posted May 26, 2013 will re-release alpha 2 with that fixed. Don't be afraid to increment the release number. It's less confusing that way.
nickbro Posted May 26, 2013 Posted May 26, 2013 It'll get incremented in an hour anyway as it ticks over to 0527 = 27th May
nickbro Posted May 26, 2013 Posted May 26, 2013 Does it seem to be working now? It works fine for me in my tests
Arkaine Posted May 26, 2013 Author Posted May 26, 2013 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.
Arkaine Posted May 26, 2013 Author Posted May 26, 2013 (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 May 26, 2013 by Arkaine
FishCustard Posted May 26, 2013 Posted May 26, 2013 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!
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 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])
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 (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 May 27, 2013 by Arkaine
nickbro Posted May 27, 2013 Posted May 27, 2013 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
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 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?
nickbro Posted May 27, 2013 Posted May 27, 2013 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
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 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.
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 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.
TheScarfedOne Posted May 27, 2013 Posted May 27, 2013 Blimey this was active after I clocked off! I will get this onto my beta system and give some feedback as well. Did that feature of mine sneak in too?
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 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>
Arkaine Posted May 27, 2013 Author Posted May 27, 2013 Blimey this was active after I clocked off! ... No rest for the wicked.
nickbro Posted May 28, 2013 Posted May 28, 2013 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.
Arkaine Posted May 28, 2013 Author Posted May 28, 2013 ...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.
Arkaine Posted May 28, 2013 Author Posted May 28, 2013 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.
nickbro Posted May 28, 2013 Posted May 28, 2013 Right, I'm back, from both MS Reading and the internet blackout. Will look into these now
nickbro Posted May 28, 2013 Posted May 28, 2013 @Arkaine does the spinner (the quantity) textbox get shown when you book and get the issue with 0 getting submitted?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now