--- loncom/html/adm/helper/newslot.helper 2006/04/24 23:23:18 1.15 +++ loncom/html/adm/helper/newslot.helper 2006/05/16 21:03:42 1.19 @@ -218,13 +218,22 @@ RESTRICTUSER + + No proctor checkin required for access. + Require proctored access. + + my $default=&{$helper->{DATA}{origslot}}('proctor'); + if ($default) { return 'yes'; } + return 'no'; + + + my @defaults; my $default=&{$helper->{DATA}{origslot}}('proctor'); if ($default) { - $default=~ tr/@/:/; @defaults=(split(',',$default)); } return @defaults; @@ -288,13 +297,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))); } @@ -306,8 +318,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);