+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
Home Access Plus+ Thread, Feature Request - Booking System in Projects:; Is there a way that the "Unavailable" and "Charging" automatic entries can be changed? I would like to be able ...
  1. #1
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86

    Feature Request - Booking System

    Is there a way that the "Unavailable" and "Charging" automatic entries can be changed? I would like to be able to set them to be two sessions each side, as we have Break and Lunch on our booking system (to allow staff to book rooms and equipment at those times.

    S1 Break S2 Lunch S3 Break S4
    Unavail Unavail Bookied Charging Charging Free Free

    Any ideas?

  2. #2

    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
    At the moment, no, I think Paul is working on doing something with the charging rules

  3. #3
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Great thanks Nick. When you have something that you would like tested on this - give me a nudge and Ill get it on my install.

  4. #4

    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
    @TheScarfedOne would you be willing to test something I've been working on, if I can get it to work on my test site. It'll be an advanced feature and require editing an xml file to define rules. I'll try and make one to begin with and see where it goes.

    Hopefully, it will work the way I want it to.

  5. #5
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Sure no prob...what needs looking at?

  6. #6

    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
    See attached dll.

    If after you install this dll, you make a temp booking and remove it you should see a new XML file in the ~/App_Data folder called bookingrules.xml

    HTML Code:
    <?xml version="1.0"?>
     <bookingrules>
       <rule>
         <And condition1="User.IsInRole(Domain Admins)" condition2="True" operation="Equals" />
         <action>bookcharging(booking.NextLesson().NextLesson())</action>
         <action>bookcharging(booking.PreviousLesson().PreviousLesson())</action>
       </rule>
    </bookingrules>
    So what is this rule doing?

    It's asking if the current user is a Domain Admins (User.IsInRole) and if that equals YES (true)

    It then proceeds to do that the actions, which at the moment are just book or bookcharging (it will remove the bookings that are made from the rules when you remove the booking, or should)

    I may add more rule actions at a later date.

    It then uses the current booking, asks for the booking in the next lesson, then the lesson after that to book

    Does the same the opposite way. If it hits a problem the action will not run, other actions may.


    You can add multiple Conditions And Conditions mean it uses the logical AND, or there is Or which uses the Or

    The operation that can go on are And, Or, Not, Equals, Null, GT (greater than, int or datetime only), LT (less than, int or datetime only), GTE (greater than or equals), LTE (less than or equals), NotNull, the operations are case sesnsitive

    You can query against various inbuilt objects:

    • Resource (the current resource being used)
    • Booking (the current booking)
    • BookingSystem (the overall booking system)
    • User (the current user object)


    You do need to have some knowledge of the inners of the booking system, and how some stuff is worded and works, the source code is the best place for that.




    What do you think?
    Last edited by nickbro; 4th January 2013 at 10:25 PM.

  7. #7
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Hi Nick

    Sorry - Ive been a bit slack on replying to this one! I tried the above, and the version included in v8.7 - but cant see it logging anything the HAP Event Log on the server; and its not changing an action on the booking system either.

  8. #8

    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
    Hmm that's an odd one, I'll have to look into that. It will only send emails to resource admins, not booking system admins, so you have to have specific admins specified in the admins for the resource as well

  9. #9
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Yep, got me and my team listed by name, with a , and space between each entry. It's weird that we get the cancellations!!

  10. #10

    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
    very odd. I've done some changes to the booking system dll today, added a trip function to remove any white spaces, this may, or may not fix the issue though, can you try this attached dll

  11. #11
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Right, before I change the DLL to the one above - heres some info from the event log for you...

    Failed Action: bookcharging(booking.NextLesson().NextLesson()) System.NullReferenceException: Object reference not set to an instance of an object. at HAP.BookingSystem.BookingCondition.processConditio n(Object o, String Condition) at HAP.BookingSystem.BookingCondition.processConditio n(String Condition, Booking b, Resource r, BookingSystem bs) at HAP.BookingSystem.BookingRule.ExecuteRule(Booking b, Resource r, BookingSystem bs, Boolean IsRemoveEvent)

  12. #12
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Same on the new DLL as well.

  13. #13

    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
    Ok, what rules have you defined. Is this stopping the admin emails?

  14. #14
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,128
    Thank Post
    772
    Thanked 176 Times in 159 Posts
    Blog Entries
    78
    Rep Power
    86
    Using the same code as posted earlier
    Code:
    <?xml version="1.0"?>
     <bookingrules>
       <rule>
         <And condition1="User.IsInRole(Domain Admins)" condition2="True" operation="Equals" />
         <action>bookcharging(booking.NextLesson().NextLesson())</action>
         <action>bookcharging(booking.PreviousLesson().PreviousLesson())</action>
       </rule>
    </bookingrules>
    The booking gets made, and the emails sent (including Admin one, but it doesnt perform the actions in the rule - the error above is posted twice to the event log)
    Last edited by TheScarfedOne; 21st January 2013 at 09:45 PM.

  15. #15

    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
    Ok, I'll have to look into this to see why, it hasn't been fully tested yet



SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Online Resource Booking System
    By SimpleSi in forum Web Development
    Replies: 14
    Last Post: 29th October 2008, 09:34 PM
  2. Online Parental Booking System
    By robknowles in forum MIS Systems
    Replies: 4
    Last Post: 3rd July 2007, 08:52 PM
  3. pc booking systems including my-pc
    By in forum Network and Classroom Management
    Replies: 8
    Last Post: 9th March 2007, 08:28 PM
  4. Online Booking System
    By imullings in forum Educational Software
    Replies: 2
    Last Post: 5th September 2006, 09:10 PM
  5. Bug/Feature Requests
    By russdev in forum General EduGeek News/Announcements
    Replies: 0
    Last Post: 15th January 2006, 09:59 AM

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
  •