Diff for /loncom/homework/bridgetask.pm between versions 1.158 and 1.159

version 1.158, 2006/05/30 12:45:36 version 1.159, 2006/06/01 19:20:56
Line 1257  sub show_queue { Line 1257  sub show_queue {
     my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp);      my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp);
     my ($tmp)=%queue;      my ($tmp)=%queue;
     if ($tmp=~/^error: 2 /) {      if ($tmp=~/^error: 2 /) {
  return "\n<h3>Current Queue - $queue</h3><table border='1'><tr><td>Empty</td></tr></table>";   return "\n<h3>Current Queue - $queue</h3>".
       &Apache::loncommon::start_data_table().
       &Apache::loncommon::start_data_table_row().
       '<td>'.&mt('Empty').'</td>'.
       &Apache::loncommon::end_data_table_row().
       &Apache::loncommon::end_data_table();
     }      }
     my $title=&Apache::lonnet::gettitle($symb);      my $title=&Apache::lonnet::gettitle($symb);
     $result.="\n<h3>Current Queue - $title $queue </h3><table border='1'><tr>";      $result.="\n<h3>Current Queue - $title $queue </h3>".
    &Apache::loncommon::start_data_table().
    &Apache::loncommon::start_data_table_header_row();
     if ($with_selects) { $result.="<th>Status</th><th></th>"; }      if ($with_selects) { $result.="<th>Status</th><th></th>"; }
     $result.="<th>user</th><th>data</th></tr>";      $result.="<th>user</th><th>data</th>".
    &Apache::loncommon::end_data_table_header_row();
     foreach my $key (sort(keys(%queue))) {      foreach my $key (sort(keys(%queue))) {
  my ($symb,$uname,$udom) = &decode_queue_key($key);   my ($symb,$uname,$udom) = &decode_queue_key($key);
  if (!defined($classlist->{$uname.':'.$udom})) { next; }   if (!defined($classlist->{$uname.':'.$udom})) { next; }
Line 1277  sub show_queue { Line 1285  sub show_queue {
  }   }
   
  if ($key=~/locked$/ && !$with_selects) {   if ($key=~/locked$/ && !$with_selects) {
     $result.="<tr><td>$uname</td>";      $result.= &Apache::loncommon::start_data_table_row().
    "<td>$uname</td>";
     $result.='<td>'.$queue{$key}.'</td></tr>';      $result.='<td>'.$queue{$key}.'</td></tr>';
  } elsif ($key=~/timestamp$/ && !$with_selects) {   } elsif ($key=~/timestamp$/ && !$with_selects) {
     $result.="<tr><td></td>";      $result.=&Apache::loncommon::start_data_table_row()."<td></td>";
     $result.='<td>'.      $result.='<td>'.
  &Apache::lonlocal::locallocaltime($queue{$key})."</td></tr>";   &Apache::lonlocal::locallocaltime($queue{$key})."</td></tr>";
  } elsif ($key!~/(timestamp|locked)$/) {   } elsif ($key!~/(timestamp|locked)$/) {
     $result.="<tr>";      $result.= &Apache::loncommon::start_data_table_row();
     my ($end_time,$slot_text);      my ($end_time,$slot_text);
     if (my $slot=&slotted_access($queue{$key})) {      if (my $slot=&slotted_access($queue{$key})) {
  my %slot_data=&Apache::lonnet::get_slot($slot);   my %slot_data=&Apache::lonnet::get_slot($slot);
Line 1336  FORM Line 1345  FORM
  " <tt>($uname:$udom)</tt> </td>";   " <tt>($uname:$udom)</tt> </td>";
     $result.='<td>'.$slot_text.' End time: '.      $result.='<td>'.$slot_text.' End time: '.
  &Apache::lonlocal::locallocaltime($end_time).   &Apache::lonlocal::locallocaltime($end_time).
  "</td></tr>";   "</td>".&Apache::loncommon::end_data_table_row();
  }   }
     }      }
     $result.="</table><hr />\n";      $result.= &Apache::loncommon::end_data_table()."<hr />\n";
     return $result;      return $result;
 }  }
   
Line 1643  sub select_user { Line 1652  sub select_user {
  $result.='<p> Showing only sections <tt>'.join(', ',@chosen_sections).   $result.='<p> Showing only sections <tt>'.join(', ',@chosen_sections).
     '</tt>.</p> '."\n";      '</tt>.</p> '."\n";
     }      }
     $result.='<table border="1">';      $result.=&Apache::loncommon::start_data_table();
   
     foreach my $student (sort {lc($classlist->{$a}[&Apache::loncoursedata::CL_FULLNAME()]) cmp lc($classlist->{$b}[&Apache::loncoursedata::CL_FULLNAME()]) } (keys(%$classlist))) {      foreach my $student (sort {lc($classlist->{$a}[&Apache::loncoursedata::CL_FULLNAME()]) cmp lc($classlist->{$b}[&Apache::loncoursedata::CL_FULLNAME()]) } (keys(%$classlist))) {
  my ($uname,$udom) = split(/:/,$student);   my ($uname,$udom) = split(/:/,$student);
Line 1668  sub select_user { Line 1677  sub select_user {
  my $todo =    my $todo = 
     &escape(&encode_queue_key($symb,$udom,$uname));      &escape(&encode_queue_key($symb,$udom,$uname));
  if ($cannot_grade) {   if ($cannot_grade) {
     $result.='<tr><td>&nbsp;</td><td>'.$classlist->{$student}[&Apache::loncoursedata::CL_FULLNAME()].      $result.=&Apache::loncommon::start_data_table_row().
    '<td>&nbsp;</td><td>'.$classlist->{$student}[&Apache::loncoursedata::CL_FULLNAME()].
  '</td><td>';   '</td><td>';
  } else {   } else {
     my $seclist;      my $seclist;
Line 1676  sub select_user { Line 1686  sub select_user {
  $seclist.='<input type="hidden" name="chosensections"    $seclist.='<input type="hidden" name="chosensections" 
                                value="'.$sec.'" />';                                 value="'.$sec.'" />';
     }      }
       $result.=&Apache::loncommon::start_data_table_row();
     $result.=<<RESULT;      $result.=<<RESULT;
 <tr>  
   <td>    <td>
     <form style="display: inline" method="post">      <form style="display: inline" method="post">
       <input type="hidden" name="gradingkey" value="$todo" />        <input type="hidden" name="gradingkey" value="$todo" />
Line 1726  RESULT Line 1736  RESULT
  } else {   } else {
     $result.="&nbsp;";      $result.="&nbsp;";
  }   }
  $result.= '</td></tr>';   $result.= '</td>'.&Apache::loncommon::end_data_table_row();
     }      }
     $result.='</table>';      $result.=&Apache::loncommon::end_data_table();
     return $result;      return $result;
 }  }
   

Removed from v.1.158  
changed lines
  Added in v.1.159


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