--- loncom/html/adm/helper/newslot.helper 2006/03/07 16:29:14 1.14 +++ loncom/html/adm/helper/newslot.helper 2006/12/18 15:14:37 1.21 @@ -29,8 +29,14 @@ return $slot{$name}{$which}; } + + Help on required attributes + + + Required Attributes + - Name:
    +
Name:
   
@@ -64,6 +70,12 @@ return &{$helper->{DATA}{origslot}}('endtime'); + + if ($val < $helper->{'VARS'}{'starttime'}) { + return 'End time must be later than the start time.'; + } + return undef; +
Type: @@ -79,6 +91,13 @@ + + Help on optional attributes + + + Optional Attributes + +

Description:
    @@ -96,6 +115,12 @@ return &{$helper->{DATA}{origslot}}('startreserve','anytime'); + + if (defined($val) && $val > $helper->{'VARS'}{'starttime'}) { + return 'Reservation time must come before the slot has started.'; + } + return undef; +

Maxium number of students allowed in this slot:
    @@ -128,6 +153,12 @@ if (ref($default)) { return $default->[1]; } return 'anytime'; + + if (defined($val) && $val < $helper->{'VARS'}{'startunique'}) { + return 'End time must be later than the start time.'; + } + return undef; + @@ -139,6 +170,20 @@ delete($helper->{'VARS'}{'endunique'}); + + +

Proctored access: + + + No proctor checkin required for access. + Require proctored checkin for access. + + my $default=&{$helper->{DATA}{origslot}}('proctor'); + if ($default) { return 'yes'; } + return 'no'; + + +

Secret word proctors use to checkin users:
    @@ -153,6 +198,10 @@

Slot is: + + Resource Restriction + + usable for any resource. restricted to a specific resource. @@ -162,6 +211,7 @@ return 'any'; +

IP restrictions:
    @@ -193,12 +243,18 @@ - FINISH - - - $helper->{'VARS'}{'type'} eq 'schedulable_student' - RESTRICTUSER - + + $helper->{'VARS'}{'useproctor'} eq 'no' + RESTRICTUSER + + + RESTRICTUSER + + Specifying Proctors + + + Specifying Proctors + @@ -206,7 +262,6 @@ my @defaults; my $default=&{$helper->{DATA}{origslot}}('proctor'); if ($default) { - $default=~ tr/@/:/; @defaults=(split(',',$default)); } return @defaults; @@ -216,10 +271,18 @@ + + $helper->{'VARS'}{'type'} ne 'schedulable_student' + FINISH + + FINISH

Slots are by default available to all users in a course, if you would like this slot to be restricted to a subset of users you can specify restrictions.

+ + Restrict Availibility + Select sections to limit slot availability to:
    @@ -270,13 +333,16 @@ $helper->{'VARS'}{'endunique'}]; } - if ( $helper->{'VARS'}{'proctor'} =~/\S/ ) { + if ( $helper->{'VARS'}{'useproctor'} eq 'yes' + && $helper->{'VARS'}{'proctor'} =~/\S/ ) { my @names; + # just need the username/domain throw away the other data + # that returns foreach my $user (split(/\|\|\|/, $helper->{'VARS'}{'proctor'})) { my ($uname,$udomain)=split(/:/,$user); - push(@names,"$uname\@$udomain"); + push(@names,"$uname:$udomain"); } - # make sure the usenrmaes are unique + # make sure the usernmaes are unique my %proctors = map { ($_,1) } @names; $slot{'proctor'}=join(',',sort(keys(%proctors))); } @@ -288,8 +354,9 @@ } if ( $helper->{'VARS'}{'allowedusers'} =~/\S/ ) { - my @names; + # just need the username/domain throw away the other data + # that returns foreach my $item (split(/\|\|\|/, $helper->{'VARS'}{'allowedusers'})) { my ($uname,$udomain)=split(/:/,$item);