Menu

Clicking in agenda for simple user?

Help
2004-02-12
2004-02-17
  • Gabriel Parriaux

    Hello,
    Great job your php module! Thanks a lot.
    Actually, I'm trying to use ORS for the scheduling of multimedia material in a school.
    As administrator, it is possible to simply click in the agenda cells to choose the start date and time and the end date and time. It's very comfortable, as you don't have to type the hour and date yourself, with all the formats problems that can occur...
    But I can't activate the same feature for a simple user. Is there a way to give to the simple user the same possibility?
    Thank you for your help and good bye.
    Best regards

    Gabriel

     
    • Jeremy Shaver

      Jeremy Shaver - 2004-02-12

      I'm not sure what you mean for a "simple user" but any user who is signed in has the ability to select start and end times by just clicking in the calendar... The only times this is NOT active is:

      (1) for the public (when you are not logged in). The public can't sign up... you have to be logged in

      and
      (2) when you are editing a signup. This is a future enhancement - being able to change a past signup by simply clicking on the new end time - but it isn't active just yet.

      -Jeremy

       
    • Gabriel Parriaux

      What I mean by "simple user" is a registrated user which is "S" = "Signup allowed".
      I don't know what I made wrong, but in my installation, a user which is "Signup allowed" cannot click in the agenda to select start and end times. Only as administrator, this becomes possible...
      You can try it at:
      http://php.educanet2.ch/enanos/reservations/
      with user "toto" password "toto"
      Can I change this situation?
      Thank you for your help!
      Gabriel

       
      • Jeremy Shaver

        Jeremy Shaver - 2004-02-14

        Something seems wrong about the times. It should be showing h:m but it isn't. Did you make any changes to functions.php or any of the other files?

        The problem is that regular users can't sign up in "the past". It is interpreting all times as in the past because of the time format problem.

        I suspect you didn't want the ":00" part of the time to show - we'll have to figure out a way to do that "gracefully" without gumming up the time format problem.

        -Jeremy

         
    • Gabriel Parriaux

      Here we are!
      As I wish to use ORS for a school, we better speak of "periods" than of full hours.
      I saw on the forum a message of Paul Davis who also wanted to use ORS for a school and you indicated that it's possible to change the functions.php this way:

      "If you want to get fancier, you could edit functions.php and look near the top of the program for an if statement which says:

      if (twentyfourhour_clock)
      define("timeformat","H:i");
      else
      define("timeformat","h:i a");

      comment out these lines (add // to the beginning of each) and add the line:

      define("timeformat","G");"

      So I applied exactly this...

      Is there a way to keep this format, but to still permit the sign up?

      Thank you for your help.

      Gabriel Parriaux

       
      • Jeremy Shaver

        Jeremy Shaver - 2004-02-17

        I'm really sorry about that suggestion - I'm afraid it was poorly thought out... The difficulty is that although your time slots are labeled 1-7, TIME doesn't actually match those hours except in the early hours of the day (and even then I'm not certain the various tests will work, I'd have to check the code)

        The problem is more involved in that you'd have to create a "map" of time to period. One POSSIBLE solution (completely off the top of my head) would involve "translating" the time the system THINKS it is.

        Fortunately, this might not be as hard as it might sound. All references to time call the function "zulutime()" near the end of the functions.php file. All it does now is call mktime(). I haven't tested this theory, but you could:
        (1) create a simple look-up table which stated what the minimum and maxmum times were for each period (e.g. 6:50-7:50) and,
        (2) after the call to mktime, you could get the current time (h:m)
        (3) figure out which period you're in
        (4) set the current time so that hour = period  (e.g. fix(mktime()/60/60/24)*60*60*24+period*60*60  should do it)

        If you decide to try writing this, let me know. Sorry for the confusion.

         

Log in to post a comment.