Diff for /loncom/interface/slotrequest.pm between versions 1.46 and 1.47

version 1.46, 2006/02/09 17:59:57 version 1.47, 2006/02/09 18:04:51
Line 714  sub show_table { Line 714  sub show_table {
      'ip'           => 'IP or DNS restrictions',       'ip'           => 'IP or DNS restrictions',
      'symb'         => 'Resource slot is restricted to.',       'symb'         => 'Resource slot is restricted to.',
      'uniqueperiod' => 'Period of time slot is unique',       'uniqueperiod' => 'Period of time slot is unique',
        'scheduled'    => 'Scheduled Students',
      'proctor'      => 'List of proctors');       'proctor'      => 'List of proctors');
     my @show_order=('name','description','type','starttime','endtime',      my @show_order=('name','description','type','starttime','endtime',
        'startreserve','secret','maxspace','ip','symb',         'startreserve','secret','maxspace','ip','symb',
        'uniqueperiod','proctor');         'uniqueperiod','scheduled','proctor');
     my @show =       my @show = 
  (exists($env{'form.show'})) ? &Apache::loncommon::get_env_multiple('form.show')   (exists($env{'form.show'})) ? &Apache::loncommon::get_env_multiple('form.show')
                             : keys(%show_fields);                              : keys(%show_fields);
Line 793  sub show_table { Line 794  sub show_table {
     $r->print('<th>'.$linkstart.$which.'">'.$show_fields{$which}.'</a></th>');      $r->print('<th>'.$linkstart.$which.'">'.$show_fields{$which}.'</a></th>');
  }   }
     }      }
     $r->print('<th>Scheduled Students</th></tr>');  
   
     my %name_cache;      my %name_cache;
     my $slotsort = sub {      my $slotsort = sub {
Line 829  sub show_table { Line 829  sub show_table {
     #next;      #next;
  }   }
  my $description=&get_description($slot,$slots{$slot});   my $description=&get_description($slot,$slots{$slot});
  my %consumed=&Apache::lonnet::dump('slot_reservations',$cdom,$cnum,  
    "^$slot\0");  
  my $ids;   my $ids;
    if (exists($show{'scheduled'})) {
  my ($tmp)=%consumed;      my %consumed=&Apache::lonnet::dump('slot_reservations',$cdom,$cnum,
  if ($tmp !~ /^error: /) {         "^$slot\0");
     foreach my $entry (sort(keys(%consumed))) {      my ($tmp)=%consumed;
  my (undef,$id)=split("\0",$entry);      if ($tmp !~ /^error: /) {
  my ($uname,$udom) = split('@',$consumed{$entry}{'name'});   foreach my $entry (sort(keys(%consumed))) {
  $ids.= '<nobr>';      my (undef,$id)=split("\0",$entry);
  foreach my $item (@stu_display_order) {      my ($uname,$udom) = split('@',$consumed{$entry}{'name'});
     if ($stu_display{$item}) {      $ids.= '<nobr>';
  if ($item eq 'fullname') {      foreach my $item (@stu_display_order) {
     $ids.=$fullname->{"$uname:$udom"}.' ';   if ($stu_display{$item}) {
  } elsif ($item eq 'username') {      if ($item eq 'fullname') {
     $ids.="<tt>$uname\@$udom</tt> ";   $ids.=$fullname->{"$uname:$udom"}.' ';
       } elsif ($item eq 'username') {
    $ids.="<tt>$uname\@$udom</tt> ";
       }
  }   }
     }      }
       $ids.=&remove_link($slot,$entry,$uname,$udom,
          $consumed{$entry}{'symb'}).'</nobr><br />';
  }   }
  $ids.=&remove_link($slot,$entry,$uname,$udom,  
    $consumed{$entry}{'symb'}).'</nobr><br />';  
     }      }
  }   }
   
Line 937  DELETELINK Line 938  DELETELINK
  if (exists($show{'uniqueperiod'})) {   if (exists($show{'uniqueperiod'})) {
     $colspan++;$r->print("<td>$unique</td>\n");      $colspan++;$r->print("<td>$unique</td>\n");
  }   }
  $colspan++;$r->print("<td>$ids</td>\n</tr>\n");   if (exists($show{'scheduled'})) {
       $colspan++;$r->print("<td>$ids</td>\n</tr>\n");
    }
  if (exists($show{'proctor'})) {   if (exists($show{'proctor'})) {
     $r->print(<<STUFF);      $r->print(<<STUFF);
 <tr>  <tr>

Removed from v.1.46  
changed lines
  Added in v.1.47


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