Diff for /loncom/interface/portfolio.pm between versions 1.60 and 1.61

version 1.60, 2004/12/04 02:15:42 version 1.61, 2004/12/04 18:37:36
Line 112  sub display_directory { Line 112  sub display_directory {
     #$strip holds directory/file name      #$strip holds directory/file name
     #$dom       #$dom 
     my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);       my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); 
     if ($Apache::lonhomework::results{"resource.$ENV{'user.domain'}.$ENV{'user.name'}.$filename"}eq'true'){  
        &Apache::lonnet::logthis("found submitted file");  
        &Apache::lonnet::logthis("resource.$ENV{'user.domain'}.$ENV{'user.name'}.$filename");  
     } else {  
        &Apache::lonnet::logthis("$filename not found submitted file");  
        &Apache::lonnet::logthis("resource.$ENV{'user.domain'}.$ENV{'user.name'}.$filename");  
     }  
     if (($filename ne '.') && ($filename ne '..')) {      if (($filename ne '.') && ($filename ne '..')) {
             if ($dirptr&$testdir) {              if ($dirptr&$testdir) {
                 $r->print('<tr bgcolor="#FFAA99"><td><img src="'.$iconpath.'folder_closed.gif"></td>');                  $r->print('<tr bgcolor="#FFAA99"><td><img src="'.$iconpath.'folder_closed.gif"></td>');
Line 159  sub display_file_select { Line 152  sub display_file_select {
     my ($r,$current_path,$is_empty,$dir_list)=@_;      my ($r,$current_path,$is_empty,$dir_list)=@_;
     my $iconpath= $r->dir_config('lonIconsURL') . "/";      my $iconpath= $r->dir_config('lonIconsURL') . "/";
     my $display_out;      my $display_out;
     my %checked_files = &Apache::lonnet::files_in_path($ENV{'user.name'}, $ENV{'form.currentpath'});      my $checked_files = &Apache::lonnet::files_in_path($ENV{'user.name'}, $ENV{'form.currentpath'});
       foreach my $key (keys %$checked_files) {
           &Apache::lonnet::logthis("a key is $key $$checked_files{$key} is the value");
       }
     if ($is_empty && ($current_path ne '/')) {      if ($is_empty && ($current_path ne '/')) {
         $display_out = '<form method="post" action="/adm/portfolio">'.          $display_out = '<form method="post" action="/adm/portfolio">'.
         '<input type="hidden" name="action" value="deletedir" />'.          '<input type="hidden" name="action" value="deletedir" />'.
Line 185  sub display_file_select { Line 181  sub display_file_select {
     #$strip holds directory/file name      #$strip holds directory/file name
     #$dom       #$dom 
     my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);       my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); 
       $filename =~ s/\s+$//;
     if (($filename ne '.') && ($filename ne '..')) {      if (($filename ne '.') && ($filename ne '..')) {
             if ($dirptr&$testdir) {              if ($dirptr&$testdir) {
                 $r->print('<tr bgcolor="#FFAA99"><td><img src="'.$iconpath.'folder_closed.gif"></td>');                  $r->print('<tr bgcolor="#FFAA99"><td><img src="'.$iconpath.'folder_closed.gif"></td>');
Line 193  sub display_file_select { Line 190  sub display_file_select {
                 $r->print('</tr>');                   $r->print('</tr>'); 
             } else {              } else {
                 $r->print('<tr bgcolor="#CCCCFF">');                  $r->print('<tr bgcolor="#CCCCFF">');
                 $r->print('<td>                  $r->print('<td><input type="checkbox" name="selectedfile" value="'.$filename.'"'); 
                         <input type="checkbox" name="selectedfile" value="'.$filename.'" >                  if ($$checked_files{$filename} eq 'selected') {
                     </td>');                      $r->print("CHECKED");
                       &Apache::lonnet::logthis("checked");
                   } else {
                       &Apache::lonnet::logthis("not checked $$checked_files{$filename} $filename");
                   }
                   $r->print('></td>');
                 $r->print('<td><img src="'.$iconpath.'unknown.gif"></td>');                  $r->print('<td><img src="'.$iconpath.'unknown.gif"></td>');
                 $r->print('<td><a href="'.$href_location.$filename.'">'.                  $r->print('<td><a href="'.$href_location.$filename.'">'.
     $filename.'</a></td>');       $filename.'</a></td>'); 
Line 381  ENDSMP Line 383  ENDSMP
     $r->print($java_script);      $r->print($java_script);
     $r->print("<h1>Select portfolio files</h1>      $r->print("<h1>Select portfolio files</h1>
                 Check as many as you wish in response to the essay problem.<br />");                  Check as many as you wish in response to the essay problem.<br />");
     $r->print("<strong>Files selected:</strong><br />");      $r->print("<strong>Files selected from other directories:</strong><br />");
     foreach (&Apache::lonnet::files_not_in_path($ENV{'user.name'}, $ENV{'form.currentpath'})) {      foreach (&Apache::lonnet::files_not_in_path($ENV{'user.name'}, $ENV{'form.currentpath'})) {
         $r->print($_."<br />");          $r->print($_."<br />");
     }      }

Removed from v.1.60  
changed lines
  Added in v.1.61


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