--- loncom/html/adm/helper/newslot.helper 2005/10/14 22:17:33 1.3 +++ loncom/html/adm/helper/newslot.helper 2005/10/17 18:21:26 1.4 @@ -86,7 +86,7 @@ - usable for any resource. + usable for any resource. restricted to a specific resource. 'any' @@ -106,9 +106,14 @@ return $res->is_problem() return $res->symb() - FINISH + PROCTOR + + + + Created Slot @@ -119,7 +124,7 @@ foreach my $which ('type','starttime','endtime') { $slot{$which} = $helper->{'VARS'}{$which}; } - foreach my $which ('ip','proctor','description','maxspace', + foreach my $which ('ip','description','maxspace', 'secret','symb') { if ( $helper->{'VARS'}{$which} =~/\S/ ) { $slot{$which} = $helper->{'VARS'}{$which}; @@ -130,15 +135,23 @@ $slot{'uniqueperiod'} = [$helper->{'VARS'}{'startunique'}, $helper->{'VARS'}{'endunique'}]; } + if ( $helper->{'VARS'}{'proctor'} =~/\S/ ) { + my @names; + foreach my $user (split(/\|\|\|/, $helper->{'VARS'}{'proctor'})) { + my ($uname,$udomain)=split(/:/,$user); + push(@names,"$uname\@$udomain"); + } + $slot{'proctor'}=join(',',@names); + } my $cname = $env{'course.'.$env{'request.course.id'}.'.num'}; my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; my $ret = &Apache::lonnet::cput('slots', {$helper->{'VARS'}{'name'} => \%slot}, $cdom,$cname); - $result.="\n".'
  • Name: '.&HTML::Entities::encode($slot{name}).'
  • '. - "\n".'
  • Starts: '.&Apache::lonlocal::locallocaltime($slot{start}).'
  • '. - "\n".'
  • Ends: '.&Apache::lonlocal::locallocaltime($slot{end}).'
  • '. + $result.="\n$ret ".'Name: '.&HTML::Entities::encode($helper->{'VARS'}{'name'}).''. + "\n".'
  • Starts: '.&Apache::lonlocal::locallocaltime($slot{'starttime'}).'
  • '. + "\n".'
  • Ends: '.&Apache::lonlocal::locallocaltime($slot{'endtime'}).'
  • '. "\n".'
  • Type: '.$slot{'type'}.'
  • '; my %labels = map {($_->[0],$_->[1])} &Apache::slotrequest::csvupload_fields(); @@ -159,7 +172,7 @@ } return $result; - /adm/flip?postdata=return: + /adm/slotrequest?command=showslots