Diff for /loncom/homework/bridgetask.pm between versions 1.212 and 1.214

version 1.212, 2006/11/28 16:43:51 version 1.214, 2006/12/07 20:44:55
Line 1061  DONEBUTTON Line 1061  DONEBUTTON
     $start_time=&Apache::lonlocal::locallocaltime($start_time);      $start_time=&Apache::lonlocal::locallocaltime($start_time);
   
     my $status =       my $status = 
  "\n<div class='LC_$bt_status LC_criteria'>\n\t";   "\n<div class='LC_$bt_status LC_criteria LC_task_overall_status'>\n\t";
           
       my $dim = $top;
       my %counts = &get_counts($dim,undef,$parstack,
        $safeeval);
       my $question_status ="\n\t<p>".
    &question_status_message(\%counts,-1).
    "</p>\n";
   
     if ($bt_status eq 'pass')  {      if ($bt_status eq 'pass')  {
  $status.='<h2>You passed the '.$title.' given on '.   $status.='<h2>You passed the '.$title.' given on '.
     $start_time.'</h2>';      $start_time.'</h2>';
    $status.=$question_status;
     }      }
     if ($bt_status eq 'fail')  {      if ($bt_status eq 'fail')  {
  $status.='<h2>You did not pass the '.$title.' given on '.   $status.='<h2>You did not pass the '.$title.' given on '.
     $start_time.'</h2>';      $start_time.'</h2>';
    $status.=$question_status;
  if (!$previous) {   if (!$previous) {
     $status.=&add_request_another_attempt_button();      $status.=&add_request_another_attempt_button();
  }   }
     }      }
     $status.="\n".'</div>'."\n";  
     my $dim = $top;  
     my %counts = &get_counts($dim,undef,$parstack,  
      $safeeval);  
     $status.="\n<div class='LC_$bt_status LC_criteria LC_task_overall_status'>\n\t<p>".  
  &question_status_message(\%counts,-1).  
  "</p>\n</div>\n";  
           
       $status.="\n".'</div>'."\n";
   
     foreach my $id (@{$dimension{$dim}{'criterias'}}) {      foreach my $id (@{$dimension{$dim}{'criterias'}}) {
  my $type = $dimension{$dim}{'criteria.'.$id.'.type'};   my $type = $dimension{$dim}{'criteria.'.$id.'.type'};
Line 1574  sub show_queue { Line 1577  sub show_queue {
  my $ekey=&escape($key);   my $ekey=&escape($key);
  my ($action,$description,$status)=('select',&mt('Select'));   my ($action,$description,$status)=('select',&mt('Select'));
  if (exists($queue{"$key\0locked"})) {   if (exists($queue{"$key\0locked"})) {
       my $locker = $queue{"$key\0locked"};
       my $time;
       if (ref($queue{"$key\0locked"}) eq 'ARRAY') {
    ($locker, $time) = @{$queue{"$key\0locked"}};
    $time = 
       &Apache::lonnavmaps::timeToHumanString($time,
      'start');
       }
     my $me=$env{'user.name'}.':'.$env{'user.domain'};      my $me=$env{'user.name'}.':'.$env{'user.domain'};
     $status=&mt('Locked by <tt>[_1]</tt>',$queue{"$key\0locked"});      $status=&mt('Locked by <tt>[_1]</tt> [_2]',$locker,$time);
     if ($me eq $queue{"$key\0locked"}) {      if ($me eq $queue{"$key\0locked"}) {
  ($action,$description)=('resume',&mt('Resume'));   ($action,$description)=('resume',&mt('Resume'));
     } else {      } else {
Line 1794  sub lock_key { Line 1805  sub lock_key {
     my (undef,$cid)=&Apache::lonnet::whichuser();      my (undef,$cid)=&Apache::lonnet::whichuser();
     my $cnum=$env{'course.'.$cid.'.num'};      my $cnum=$env{'course.'.$cid.'.num'};
     my $cdom=$env{'course.'.$cid.'.domain'};      my $cdom=$env{'course.'.$cid.'.domain'};
     my $success=&Apache::lonnet::newput($queue,{"$todo\0locked"=> $me},      my $success=&Apache::lonnet::newput($queue,{"$todo\0locked"=> [$me,time]},
  $cdom,$cnum);   $cdom,$cnum);
     &Apache::lonxml::debug("success $success $todo");      &Apache::lonxml::debug("success $success $todo");
     if ($success eq 'ok') {      if ($success eq 'ok') {
Line 2431  sub question_status_message { Line 2442  sub question_status_message {
  foreach my $type ('cri','dim') {   foreach my $type ('cri','dim') {
     if ($counts->{$req.'_'.$type}) {      if ($counts->{$req.'_'.$type}) {
  push(@sections,   push(@sections,
      $counts->{$req.'_'.$type.'_passed'}.' of '.       $counts->{$req.'_'.$type.'_passed'}.' of the '.
      $counts->{$req.'_'.$type}.' '.       $counts->{$req.'_'.$type}.' '.
      $req{$req}.' '.$type{$type});       $req{$req}.' '.$type{$type});
     }      }

Removed from v.1.212  
changed lines
  Added in v.1.214


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