Diff for /loncom/interface/portfolio.pm between versions 1.141 and 1.144

version 1.141, 2006/08/02 02:34:54 version 1.144, 2006/08/04 20:41:32
Line 339  sub display_directory { Line 339  sub display_directory {
     foreach my $dir_line (@version_lines) {      foreach my $dir_line (@version_lines) {
         my ($v_filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line;          my ($v_filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line;
                         my ($v_fname,$version,$v_extension) = &Apache::grades::file_name_version_ext($v_filename);                          my ($v_fname,$version,$v_extension) = &Apache::grades::file_name_version_ext($v_filename);
                           $line = '<td colspan="2">&nbsp;</td>';
                         if (($v_fname eq $fname)&&($v_extension eq $extension)) {                          if (($v_fname eq $fname)&&($v_extension eq $extension)) {
             &display_directory_line($r,$select_mode,$fullpath, $v_filename, $mtime, $size,               &display_directory_line($r,$select_mode,$fullpath, $v_filename, $mtime, $size, 
                             $css_class, $line, \%access_controls, $curr_access, $now,                              $css_class, $line, \%access_controls, $curr_access, $now,
Line 571  sub display_access { Line 572  sub display_access {
                                                                         $uname);                                                                          $uname);
     my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name);      my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name);
     my $aclcount = keys(%access_controls);      my $aclcount = keys(%access_controls);
     my $header = '<h3>'.&mt('Allowing others to retrieve portfolio file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>';      my $header = '<h3>'.&mt('Allowing others to retrieve file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>';
     my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.').'<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.').'</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.').'</li><li>'.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').'<br />'.&mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').'<br />'.&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').'</li></ul>';      my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.').'<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.').'</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.').'</li><li>'.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').'<br />'.&mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').'<br />'.&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').'</li></ul>';
   
       if ($group eq '') {
           $info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a>"));
       }
       
     if ($can_setacl) {      if ($can_setacl) {
         &open_form($r,$url);          &open_form($r,$url);
         $r->print($header.$info);          $r->print($header.$info);
Line 747  sub update_access { Line 753  sub update_access {
         }          }
     }      }
     my $file_name = $env{'form.currentpath'}.$env{'form.selectfile'};      my $file_name = $env{'form.currentpath'}.$env{'form.selectfile'};
     $r->print('<h3>'.&mt('Allowing others to retrieve portfolio file: [_1]',      $r->print('<h3>'.&mt('Allowing others to retrieve file: [_1]',
               $port_path.$file_name).'</h3>'."\n");                $port_path.$file_name).'</h3>'."\n");
     $file_name = &prepend_group($file_name);      $file_name = &prepend_group($file_name);
     my ($uname,$udom) = &get_name_dom();      my ($uname,$udom) = &get_name_dom();
Line 1470  sub upload { Line 1476  sub upload {
         }          }
     }      }
     $fname=&Apache::lonnet::clean_filename($fname);      $fname=&Apache::lonnet::clean_filename($fname);
   
     my $portfolio_root=&get_portfolio_root();      my $portfolio_root=&get_portfolio_root();
     my ($uname,$udom) = &get_name_dom();      my ($uname,$udom) = &get_name_dom();
     my $port_path = &get_port_path();      my $port_path = &get_port_path();
Line 1590  sub createdir { Line 1595  sub createdir {
 }  }
   
 sub get_portfolio_root {  sub get_portfolio_root {
     my ($uname,$udom) = &get_name_dom();      my ($udom,$uname) = @_;
       if (!defined($uname) || !defined($udom)) {
    ($uname,$udom) = &get_name_dom();
       }
     my $path;      my $path;
     if (defined($env{'form.group'})) {      if (defined($env{'form.group'})) {
         $path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';          $path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';

Removed from v.1.141  
changed lines
  Added in v.1.144


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