Diff for /loncom/homework/bridgetask.pm between versions 1.165 and 1.166

version 1.165, 2006/06/12 18:45:35 version 1.166, 2006/06/12 18:57:20
Line 413  INFO Line 413  INFO
     return $result;      return $result;
 }  }
   
   sub done_screen {
       my ($version) = @_;
       my $title=&Apache::lonnet::gettitle();
       my @files=split(',',$Apache::lonhomework::history{'resource.'.$version.'.0.bridgetask.portfiles'});
       my (undef,undef,$domain,$user)= &Apache::lonxml::whichuser();
       my $files = '<ul>';
       foreach my $file (@files) {
    my $url="/uploaded/$domain/$user/portfolio$file";
    if (! &Apache::lonnet::stat_file($url)) {
       $file = &mt('<span class="LC_error"> Nonexistent file:</span> '.
    '<span class="LC_filename">[_1]</span>',$file);
    } else {
       $file = '<span class="LC_filename">'.$file.'</span>';
    }
    $files .= '<li>'.$file.'</li>';
       }
       $files.='</ul>';
       
       return <<DONESCREEN;
   <h2>$title</h2>
   <p> Files submitted: $files </p>
   <p> You are now done with this Bridge Task </p>
   <hr />
   <p> <a href="/adm/logout">Logout</a> </p>
   <p> <a href="/adm/roles">Change to a different course</a> </p>
   DONESCREEN
   
   }
   
 sub start_Task {  sub start_Task {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   
Line 513  sub start_Task { Line 542  sub start_Task {
  } elsif ($status eq 'WAITING_FOR_GRADE') {   } elsif ($status eq 'WAITING_FOR_GRADE') {
     $msg.='<h1>'.&mt('Your submission is in the grading queue.').'</h1>';      $msg.='<h1>'.&mt('Your submission is in the grading queue.').'</h1>';
  } elsif ($env{'form.donescreen'}) {   } elsif ($env{'form.donescreen'}) {
     my $title=&Apache::lonnet::gettitle();      $result .= &done_screen();
     my @files=split(',',$Apache::lonhomework::history{'resource.'.$version.'.0.bridgetask.portfiles'});  
     my (undef,undef,$domain,$user)=  
  &Apache::lonxml::whichuser();  
     my $files = '<ul>';  
     foreach my $file (@files) {  
  my $url="/uploaded/$domain/$user/portfolio$file";  
  if (! &Apache::lonnet::stat_file($url)) {  
     $file = &mt('<font color="red"> Nonexistant file:</font> <tt>[_1]</tt>',$file);  
  } else {  
     $file = '<tt>'.$file.'</tt>';  
  }  
  $files .= '<li>'.$file.'</li>';  
     }  
     $files.='</ul>';  
   
     $result.=<<DONESCREEN;  
 <h2>$title</h2>  
 <p> Files submitted: $files </p>  
 <p> You are now done with this Bridge Task </p>  
 <hr />  
 <p> <a href="/adm/logout">Logout</a> </p>  
 <p> <a href="/adm/roles">Change to a different course</a> </p>  
 DONESCREEN  
  } elsif ($status ne 'NOT_YET_VIEWED') {   } elsif ($status ne 'NOT_YET_VIEWED') {
     $msg.='<h1>'.&mt('Not open to be viewed').'</h1>';      $msg.='<h1>'.&mt('Not open to be viewed').'</h1>';
  }   }

Removed from v.1.165  
changed lines
  Added in v.1.166


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