--- loncom/html/adm/helper/newslot.helper 2005/11/02 21:58:14 1.6
+++ loncom/html/adm/helper/newslot.helper 2005/11/02 22:14:53 1.8
@@ -78,30 +78,64 @@
return &{$helper->{DATA}{origslot}}('description');
-
-
-
Time students can start reserving:
-
-
-
-
- return &{$helper->{DATA}{origslot}}('startreserve','anytime');
-
-
-
-
-
Maxium number of students allowed in this slot:
-
-
-
-
- if ($val ne '' && $val=~/\D/) { return 'Must be numeric.'; }
- return undef;
-
-
- return &{$helper->{DATA}{origslot}}('maxspace');
-
-
+
+ $helper->{'VARS'}{'type'} eq 'schedulable_student'
+
+
+
Time students can start reserving:
+
+
+
+
+ return &{$helper->{DATA}{origslot}}('startreserve','anytime');
+
+
+
+
+
Maxium number of students allowed in this slot:
+
+
+
+
+ if ($val ne '' && $val=~/\D/) { return 'Must be numeric.'; }
+ return undef;
+
+
+ return &{$helper->{DATA}{origslot}}('maxspace');
+
+
+
+
+
Period of time in which this slot is can only be uniquely chosen:
Start:
+
+
+
+
+ my $default=&{$helper->{DATA}{origslot}}('uniqueperiod','anytime');
+ if ($default eq 'anytime') { return 'anytime' };
+ if (ref($default)) { return $default->[0]; }
+ return 'anytime';
+
+
+
End:
+
+
+ my $default=&{$helper->{DATA}{origslot}}('uniqueperiod','anytime');
+ if ($default eq 'anytime') { return 'anytime' };
+ if (ref($default)) { return $default->[1]; }
+ return 'anytime';
+
+
+
+
+ $helper->{'VARS'}{'type'} eq 'preassigned'
+
+ delete($helper->{'VARS'}{'startreserve'});
+ delete($helper->{'VARS'}{'maxspace'});
+ delete($helper->{'VARS'}{'startunique'});
+ delete($helper->{'VARS'}{'endunique'});
+
+
Secret word proctors use to checkin users:
@@ -117,28 +151,6 @@
-
Period of time in which this slot is can only be uniquely chosen:
Start:
-
-
-
-
- my $default=&{$helper->{DATA}{origslot}}('uniqueperiod','anytime');
- if ($default eq 'anytime') { return 'anytime' };
- if (ref($default)) { return $default->[0]; }
- return 'anytime';
-
-
-
End:
-
-
- my $default=&{$helper->{DATA}{origslot}}('uniqueperiod','anytime');
- if ($default eq 'anytime') { return 'anytime' };
- if (ref($default)) { return $default->[1]; }
- return 'anytime';
-
-
-
-
Slot is:
@@ -217,7 +229,9 @@
my ($uname,$udomain)=split(/:/,$user);
push(@names,"$uname\@$udomain");
}
- $slot{'proctor'}=join(',',@names);
+ # make sure the usenrmaes are unique
+ my %proctors = map { ($_,1) } @names;
+ $slot{'proctor'}=join(',',sort(keys(%proctors)));
}
my $cname = $env{'course.'.$env{'request.course.id'}.'.num'};
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};