Diff for /loncom/interface/portfolio.pm between versions 1.123 and 1.125

version 1.123, 2006/06/27 15:38:54 version 1.125, 2006/06/28 19:56:59
Line 1 Line 1
   # The LearningOnline Network
   # portfolio browser
   #
   # $Id$
   #
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).  # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
Line 219  sub display_directory { Line 224  sub display_directory {
                 }                  }
                my $fullpath = $current_path.$filename;                 my $fullpath = $current_path.$filename;
                 $fullpath = &prepend_group($fullpath,$group);                  $fullpath = &prepend_group($fullpath,$group);
                 if ($select_mode eq 'true'){                  if ($select_mode eq 'true') {
                     $line='<td><input type="checkbox" name="checkfile" value="'.$filename.'"';                      $line='<td><input type="checkbox" name="checkfile" value="'.$filename.'"';
     if ($$checked_files{$filename} eq 'selected') {      if ($$checked_files{$filename} eq 'selected') {
                         $line.=" checked ";                          $line.=" checked ";
Line 246  sub display_directory { Line 251  sub display_directory {
                         }                          }
                         $line .= '</td>';                          $line .= '</td>';
                     }                      }
     $r->print('<tr class="'.$css_class.'">');  
     $r->print($line);  
                 }  
                 my $curr_access;  
                 my $pub_access = 0;  
                 my $guest_access = 0;  
                 my $cond_access = 0;  
                 foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {  
                     my ($num,$scope,$end,$start) = &unpack_acc_key($key);  
                     if (($now > $start) && (!$end || $end > $now)) {  
                         if ($scope eq 'public')  {  
                             $pub_access = 1;  
                         } elsif ($scope eq 'guest') {  
                             $guest_access = 1;  
                         } else {  
                             $cond_access = 1;  
                         }  
                     }  
                 }  
                 if (!$pub_access && !$guest_access && !$cond_access) {  
                     $curr_access = &mt('Private');  
                 } else {  
                     my @allaccesses;   
                     if ($pub_access) {  
                         push(@allaccesses,&mt('Public'));  
                     }  
                     if ($guest_access) {  
                         push(@allaccesses,&mt('Passphrase-protected'));  
                     }  
                     if ($cond_access) {  
                         push(@allaccesses,&mt('Conditional'));  
                     }  
                     $curr_access = join('+ ',@allaccesses);  
                 }                  }
                 $r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>');   $r->print('<tr class="'.$css_class.'">');
                 $r->print('<td><a href="'.$href_location.$filename.'">'.   $r->print($line);
     $filename.'</a></td>');    my $curr_access;
                 $r->print('<td>'.$size.'</td>');   if ($select_mode ne 'true') {
                 $r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>');      my $pub_access = 0;
                 $r->print('<td><span style="white-space: nowrap">'.      my $guest_access = 0;
                           &mt($curr_access).'&nbsp;&nbsp;&nbsp;');      my $cond_access = 0;
                 $r->print('<a href="'.$url.'?access='.$filename.      foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {
                               '&amp;currentpath='.$current_path.$groupecho.   my ($num,$scope,$end,$start) = &unpack_acc_key($key);
                               '">'.$access_admin_text.'</a>');   if (($now > $start) && (!$end || $end > $now)) {
                 $r->print('</span></td></tr>');      if ($scope eq 'public')  {
    $pub_access = 1;
       } elsif ($scope eq 'guest') {
    $guest_access = 1;
       } else {
    $cond_access = 1;
       }
    }
       }
       if (!$pub_access && !$guest_access && !$cond_access) {
    $curr_access = &mt('Private');
       } else {
    my @allaccesses; 
    if ($pub_access) {
       push(@allaccesses,&mt('Public'));
    }
    if ($guest_access) {
       push(@allaccesses,&mt('Passphrase-protected'));
    }
    if ($cond_access) {
       push(@allaccesses,&mt('Conditional'));
    }
    $curr_access = join('+ ',@allaccesses);
       }
    }
    $r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>');
    $r->print('<td><a href="'.$href_location.$filename.'">'.
     $filename.'</a></td>'); 
    $r->print('<td>'.$size.'</td>');
    $r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>');
    if ($select_mode ne 'true') {
       $r->print('<td><span style="white-space: nowrap">'.
         &mt($curr_access).'&nbsp;&nbsp;&nbsp;');
       $r->print('<a href="'.$url.'?access='.$filename.
         '&amp;currentpath='.$current_path.$groupecho.
         '">'.$access_admin_text.'</a></span>');
    }
    $r->print('</td></tr>'.$/);
             }              }
         }          }
     }      }

Removed from v.1.123  
changed lines
  Added in v.1.125


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