--- loncom/debugging_tools/make_slots.pl 2005/05/31 21:35:51 1.3 +++ loncom/debugging_tools/make_slots.pl 2005/11/08 02:17:33 1.6 @@ -16,11 +16,11 @@ slots can have these parts;: Required: starttime - unix time that a slot start endtime - unix time that a slot ends - + type - either 'preassigned' or 'schedulable_student' + (controls whether slotrequest.pm will allow one to select it) Optional: - type - either 'preassigned' or 'scheduleable_student' - (controls whether slotrequest.pm will allow one to select it) + startreserve - unix time that a slot can start being reserved ip - comma seperated list of ip address or wildcard ranges or wilcard hostnames, or [] style range of allowable client IP addresses @@ -29,12 +29,12 @@ Optional: this slot maxspace - integer (number of people that can schedule this space) (if unspecfied no limit is used) - -Possibly Need: (but not yet supported) symb - arrayref of symbs that can be scheduled to be done in this slot - uniqperiod - if the user has a reservation that has a uniqpersion - that overlaps this dn't allow them to schedule this - reservation + uniqueperiod - if the user has a reservation that has a uniqueperiod + that overlaps this don't allow them to schedule this + slot + secret - arrary ref of words that are the secret for this slot +Possibly Need: (but not yet supported) =cut @@ -42,6 +42,7 @@ Possibly Need: (but not yet supported) $db{'slot1'}= &freeze_escape({ 'type' => 'preassigned', + 'startreserve' => &UnixDate("Aug 30th 00:00:00 2004","%s"), 'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), 'endtime' => &UnixDate("Aug 30th 01:00:00 2004","%s"), 'ip' => "*albertelli.com", @@ -50,8 +51,11 @@ $db{'slot1'}= $db{'slot2'}= &freeze_escape({ 'type' => 'preassigned', - 'starttime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), + 'startreserve' => &UnixDate("Aug 30th 00:00:00 2006","%s"), + 'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), + #'starttime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), + 'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), 'ip' => "*albertelli.com", 'proctor' => 'testuser@annarbor', }); @@ -59,41 +63,55 @@ $db{'slot3'}= &freeze_escape({ 'type' => 'preassigned', 'description' => 'slot3', + 'startreserve' => &UnixDate("Aug 29th 00:00:00 2004","%s"), 'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), - 'ip' => "1.2.3.4", - 'ip' => "*albertelli.com", + #'ip' => "1.2.3.4", + #'ip' => "*albertelli.com", 'proctor' => 'testuser@annarbor', }); $db{'slot4'}= &freeze_escape({ 'type' => 'preassigned', + 'startreserve' => &UnixDate("Aug 29th 00:00:00 2004","%s"), 'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), - 'ip' => "*albertelli.com", + #'ip' => "*albertelli.com", 'proctor' => 'testuser@annarbor', }); $db{'slot5'}= &freeze_escape({ 'type' => 'schedulable_student', 'description' => 'Aug 30th 4 P.M., Room 123 Kedzie', + 'startreserve' => &UnixDate("Aug 29th 00:00:00 2004","%s"), 'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), - 'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), + #'starttime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), + 'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), + #'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), - 'ip' => "*albertelli.com", + #'ip' => "*albertelli.com," 'proctor' => 'testuser@annarbor', + 'uniqueperiod' => [&UnixDate("Aug 30th 00:00:00 2004","%s"), + &UnixDate("Aug 30th 00:00:00 2005","%s")], + 'maxspace' => 10, + 'secret' => 'sauce' }); $db{'slot6'}= &freeze_escape({ 'type' => 'schedulable_student', 'description' => 'Aug 31th 4 P.M., Room 222 Computer Center', - 'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), + 'startreserve' => &UnixDate("Aug 29th 00:00:00 2004","%s"), + #'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), + 'starttime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), 'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"), - 'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), - 'ip' => "*albertelli.com", + #'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"), + #'ip' => "*albertelli.com", 'proctor' => 'testuser@annarbor', + 'uniqueperiod' => [&UnixDate("Aug 1st 00:00:00 2005","%s"), + &UnixDate("Aug 30th 00:00:00 2006","%s")], + 'maxspace' => 4, }); sub freeze_escape {