[LON-CAPA-cvs] cvs: loncom /debugging_tools make_slots.pl
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 31 May 2005 21:35:53 -0000
albertel Tue May 31 17:35:53 2005 EDT
Modified files:
/loncom/debugging_tools make_slots.pl
Log:
- added some documentation and some more slots to my example
Index: loncom/debugging_tools/make_slots.pl
diff -u loncom/debugging_tools/make_slots.pl:1.2 loncom/debugging_tools/make_slots.pl:1.3
--- loncom/debugging_tools/make_slots.pl:1.2 Mon Mar 28 16:51:21 2005
+++ loncom/debugging_tools/make_slots.pl Tue May 31 17:35:51 2005
@@ -8,8 +8,40 @@
warn "Unable to tie to $fname";
exit;
}
+
+=pod
+
+slots can have these parts;:
+
+Required:
+ starttime - unix time that a slot start
+ endtime - unix time that a slot ends
+
+
+Optional:
+ type - either 'preassigned' or 'scheduleable_student'
+ (controls whether slotrequest.pm will allow one to select it)
+ ip - comma seperated list of ip address or wildcard ranges or
+ wilcard hostnames, or [] style range of allowable client IP
+ addresses
+ proctor - comma seperated list of user@domain that can checkin a user
+ description - string that will displayed to people when talking about
+ 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
+
+
+=cut
+
$db{'slot1'}=
&freeze_escape({
+ 'type' => 'preassigned',
'starttime' => &UnixDate("Aug 30th 00:00:00 2004","%s"),
'endtime' => &UnixDate("Aug 30th 01:00:00 2004","%s"),
'ip' => "*albertelli.com",
@@ -17,6 +49,7 @@
});
$db{'slot2'}=
&freeze_escape({
+ 'type' => 'preassigned',
'starttime' => &UnixDate("Aug 30th 00:00:00 2006","%s"),
'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"),
'ip' => "*albertelli.com",
@@ -24,15 +57,41 @@
});
$db{'slot3'}=
&freeze_escape({
+ 'type' => 'preassigned',
+ 'description' => 'slot3',
'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",
'proctor' => 'testuser@annarbor',
});
$db{'slot4'}=
&freeze_escape({
+ 'type' => 'preassigned',
+ '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",
+ 'proctor' => 'testuser@annarbor',
+ });
+$db{'slot5'}=
+ &freeze_escape({
+ 'type' => 'schedulable_student',
+ 'description' => 'Aug 30th 4 P.M., Room 123 Kedzie',
+ '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",
+ 'proctor' => 'testuser@annarbor',
+ });
+$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"),
'endtime' => &UnixDate("Aug 30th 00:00:00 2006","%s"),
+ 'endtime' => &UnixDate("Aug 30th 00:00:00 2004","%s"),
'ip' => "*albertelli.com",
'proctor' => 'testuser@annarbor',
});