+ Post New Thread
Page 3 of 8 FirstFirst 1234567 ... LastLast
Results 31 to 45 of 109
Home Access Plus+ Thread, Booking System: Split Resources in Projects:; It'll get incremented in an hour anyway as it ticks over to 0527 = 27th May...
  1. #31

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    It'll get incremented in an hour anyway as it ticks over to 0527 = 27th May

  2. #32

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    Does it seem to be working now?

    It works fine for me in my tests

  3. #33

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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.

  4. #34

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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!
    Last edited by Arkaine; 27th May 2013 at 12:56 AM.

  5. #35
    FishCustard's Avatar
    Join Date
    Feb 2013
    Location
    Croydon
    Posts
    426
    Thank Post
    74
    Thanked 43 Times in 39 Posts
    Rep Power
    19
    Quote Originally Posted by Arkaine View Post
    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!

  6. #36

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Okay, I think I've figured out both problems.

    Issue 1: HTTP post variable. One of the conditions in Line 473 is the culprit.
    Code:
    else if (curres.Quantities.length > 0 && curres.CanShare && $("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1]) {
    Code:
    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.
    Code:
    h = '<span class="share' + (xy + 3 < this.Quantities[this.Quantities.length - 1] ? '' : ' full') + '">' + h;
    if (!this.ReadOnly && xy + 3 < this.Quantities[this.Quantities.length - 1])
    Code:
    h = '<span class="share' + (xy < this.Quantities[this.Quantities.length - 1] ? '' : ' full') + '">' + h;
    if (!this.ReadOnly && xy < this.Quantities[this.Quantities.length - 1])

  7. #37

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    I've narrowed line 473 down to one condition (the commented one).
    Code:
    else if (curres.Quantities.length > 0 && curres.CanShare /*&& $("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1]*/) {
    Last edited by Arkaine; 27th May 2013 at 10:07 AM.

  8. #38

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    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

  9. #39

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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?

  10. #40

    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,691
    Thank Post
    43
    Thanked 560 Times in 468 Posts
    Rep Power
    124
    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

  11. #41

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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.

  12. #42

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by Arkaine View Post
    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.

  13. #43
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,123
    Thank Post
    767
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    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?

  14. #44

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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
    Quote Originally Posted by nickbro View Post
    ...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:
    Code:
    $("#bfquantspin").val() < curres.Quantities[curres.Quantities.length - 1]
    would become:
    Code:
    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>

  15. #45

    Join Date
    May 2013
    Posts
    65
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by TheScarfedOne View Post
    Blimey this was active after I clocked off! ...
    No rest for the wicked.



SHARE:
+ Post New Thread
Page 3 of 8 FirstFirst 1234567 ... LastLast

Similar Threads

  1. ICT Resource booking system
    By lew_bob in forum AV and Multimedia Related
    Replies: 8
    Last Post: 19th May 2011, 11:09 AM
  2. Online Resource Booking System
    By SimpleSi in forum Web Development
    Replies: 14
    Last Post: 29th October 2008, 09:34 PM
  3. Online Parental Booking System
    By robknowles in forum MIS Systems
    Replies: 4
    Last Post: 3rd July 2007, 08:52 PM
  4. pc booking systems including my-pc
    By in forum Network and Classroom Management
    Replies: 8
    Last Post: 9th March 2007, 08:28 PM
  5. Online Booking System
    By imullings in forum Educational Software
    Replies: 2
    Last Post: 5th September 2006, 09:10 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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