\n");
}
if (exists($show{'scheduled'})) {
- $colspan++;$r->print("
$ids
\n
\n");
+ $colspan++;$r->print("
$remove_all $ids
\n\n");
}
if (exists($show{'proctor'})) {
$r->print(< $slot{'endtime'}) {
+ push(@errors,"$name not created -- Slot starts after it ends");
+ next;
+ }
+
if ($entries{$fields{'startreserve'}}) {
$slot{'startreserve'}=
&UnixDate($entries{$fields{'startreserve'}},"%s");
}
+ if (defined($slot{'startreserve'})
+ && $slot{'startreserve'} > $slot{'starttime'}) {
+ push(@errors,"$name not created -- Slot's reservation start time is after the slot's start time.");
+ next;
+ }
+
foreach my $key ('ip','proctor','description','maxspace',
'secret','symb') {
if ($entries{$fields{$key}}) {
$slot{$key}=$entries{$fields{$key}};
}
}
+
if ($entries{$fields{'uniqueperiod'}}) {
my ($start,$end)=split(',',$entries{$fields{'uniqueperiod'}});
my @times=(&UnixDate($start,"%s"),
&UnixDate($end,"%s"));
$slot{'uniqueperiod'}=\@times;
}
+ if (defined($slot{'uniqueperiod'})
+ && $slot{'uniqueperiod'}[0] > $slot{'uniqueperiod'}[1]) {
+ push(@errors,"$name not created -- Slot's unique period start time is later than the unique period's end time.");
+ next;
+ }
&Apache::lonnet::cput('slots',{$name=>\%slot},$cdom,$cname);
$r->print('.');
@@ -1500,7 +1552,7 @@ sub handler {
my $symb=&Apache::lonnet::unescape($env{'form.symb'});
my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb);
my $useslots = &Apache::lonnet::EXT("resource.0.useslots",$symb);
- if ($useslots ne 'resource') {
+ if ($useslots ne 'resource' && $useslots ne 'map') {
&fail($r,'not_valid');
return OK;
}