Diff for /loncom/interface/slotrequest.pm between versions 1.67 and 1.71

version 1.67, 2006/06/22 14:53:15 version 1.71, 2006/10/31 15:58:09
Line 77  sub end_page { Line 77  sub end_page {
 =cut  =cut
   
 sub get_course {  sub get_course {
     (undef,my $courseid)=&Apache::lonxml::whichuser();      (undef,my $courseid)=&Apache::lonnet::whichuser();
     my $cdom=$env{'course.'.$courseid.'.domain'};      my $cdom=$env{'course.'.$courseid.'.domain'};
     my $cnum=$env{'course.'.$courseid.'.num'};      my $cnum=$env{'course.'.$courseid.'.num'};
     return ($cnum,$cdom);      return ($cnum,$cdom);
Line 433  sub release_slot { Line 433  sub release_slot {
   
     if ($mgr eq 'F'       if ($mgr eq 'F' 
  && defined($env{'form.symb'})) {   && defined($env{'form.symb'})) {
  $symb = $env{'form.symb'};   $symb = &unescape($env{'form.symb'});
     }      }
   
     my ($result,$msg) =      my ($result,$msg) =
Line 675  sub allowed_slot { Line 675  sub allowed_slot {
     split(',',$slot->{'allowedsections'}))) {      split(',',$slot->{'allowedsections'}))) {
     $userallowed=1;      $userallowed=1;
  }   }
    if (defined($env{'request.course.groups'})) {
       my @groups = split(/:/,$env{'request.course.groups'});
       my @allowed_sec = split(',',$slot->{'allowedsections'});
       foreach my $group (@groups) {
    if (grep {$_ eq $group} (@allowed_sec)) {
       $userallowed=1;
       last;
    }
       }
    }
     }      }
     &Apache::lonxml::debug("$slot_name sections is $userallowed");      &Apache::lonxml::debug("$slot_name sections is $userallowed");
   
Line 749  sub show_choices { Line 759  sub show_choices {
     my $text=&mt('Select');      my $text=&mt('Select');
     my $command='get';      my $command='get';
     if (grep(/^\Q$slot\E$/,@got_slots)) {      if (grep(/^\Q$slot\E$/,@got_slots)) {
  $text=&mt('Free Reservation');   $text=&mt('Drop Reservation');
  $command='release';   $command='release';
     } else {      } else {
  my $conflict = &check_for_conflict($symb,$slot,$slots{$slot},   my $conflict = &check_for_conflict($symb,$slot,$slots{$slot},

Removed from v.1.67  
changed lines
  Added in v.1.71


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>