Diff for /loncom/interface/portfolio.pm between versions 1.173 and 1.175

version 1.173, 2006/11/21 21:38:44 version 1.175, 2006/12/11 03:43:15
Line 101  sub display_common { Line 101  sub display_common {
  # FIXME: This line should be deleted once Portfolio uses breadcrumbs   # FIXME: This line should be deleted once Portfolio uses breadcrumbs
  $r->print(&Apache::loncommon::help_open_topic('Portfolio About', 'Help on the portfolio'));   $r->print(&Apache::loncommon::help_open_topic('Portfolio About', 'Help on the portfolio'));
   
   
         $r->print(<<"TABLE");           $r->print(<<"TABLE"); 
 <table id="LC_portfolio_actions">  <table id="LC_portfolio_actions">
   <tr id="LC_portfolio_upload">    <tr id="LC_portfolio_upload">
Line 762  sub display_access { Line 761  sub display_access {
         $info .= '<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.');          $info .= '<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.');
         $info .= '</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');          $info .= '</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
         $info .= '</li><li>'.&explain_conditionals();          $info .= '</li><li>'.&explain_conditionals();
         $info .= '</li></ul>';          $info .= '</li></ul>'.
                     &mt('A listing of files viewable without log-in is available at: ')."<a href=\"/adm/$udom/$uname/aboutme/portfolio\">http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />";
         if ($group eq '') {          if ($group eq '') {
             $info .= (&mt("A listing of files viewable without log-in is available at: <a href='/adm/$udom/$uname/aboutme/portfolio'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />For logged in users a 'Display file listing' link will also appear (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><br />"));              $info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:");
           } else {
               $info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on the course information page:");
           }
           $info .= "<br /><a href=\"/adm/$udom/$uname/aboutme\">http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />";
           if ($group ne '') {
               $info .= &mt("Users with privileges to edit course contents may add a course information page to a course using the 'Course Info' button in DOCS").'<br />';
         }          }
     } else {      } else {
         $header = '<h3>'.&mt('Conditional access controls for file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>'.          $header = '<h3>'.&mt('Conditional access controls for file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>'.
Line 1748  sub upload { Line 1754  sub upload {
     my ($r,$url,$group)=@_;      my ($r,$url,$group)=@_;
     my $fname=$env{'form.uploaddoc.filename'};      my $fname=$env{'form.uploaddoc.filename'};
     my $filesize = (length($env{'form.uploaddoc'})) / 1000; #express in k (1024?)      my $filesize = (length($env{'form.uploaddoc'})) / 1000; #express in k (1024?)
     my $disk_quota;      my $disk_quota = &get_quota($group);
     if (defined($group)) {  
         my $grp_quota = &get_group_quota($group); # quota expressed in k   
         if ($grp_quota ne '') {  
             $disk_quota = $grp_quota;  
         } else {  
             $disk_quota = 0;  
         }  
     } else {  
         $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'},  
                                     $env{'user.domain'}); #expressed in Mb  
         $disk_quota = 1000 * $disk_quota; # convert from Mb to kb  
     }  
     $fname=&Apache::lonnet::clean_filename($fname);      $fname=&Apache::lonnet::clean_filename($fname);
   
     my $portfolio_root=&get_portfolio_root();      my $portfolio_root=&get_portfolio_root();
Line 2026  sub coursegrp_portfolio_header { Line 2020  sub coursegrp_portfolio_header {
     return $output;      return $output;
 }  }
   
   sub get_quota {
       my ($group) = @_;
       my $disk_quota;
       if (defined($group)) {
           my $grp_quota = &get_group_quota($group); # quota expressed in k
           if ($grp_quota ne '') {
               $disk_quota = $grp_quota;
           } else {
               $disk_quota = 0;
           }
       } else {
           $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'},
                                       $env{'user.domain'}); #expressed in Mb
           $disk_quota = 1000 * $disk_quota; # convert from Mb to kb
       }
       return $disk_quota;
   }
   
 sub handler {  sub handler {
     # this handles file management      # this handles file management
Line 2122  sub handler { Line 2133  sub handler {
         $r->print(&Apache::loncommon::start_page($title));          $r->print(&Apache::loncommon::start_page($title));
     }      }
     $r->rflush();      $r->rflush();
       my ($blocked,$blocktext) = 
           &Apache::loncommon::blocking_status('port',$uname,$udom);
       if ($blocked) {
            $r->print($blocktext);
            $r->print(&Apache::loncommon::end_page());
            return OK;
       }
  if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){   if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
        $r->print('<span class="LC_error">'.         $r->print('<span class="LC_error">'.
       'No file was selected to upload.'.        'No file was selected to upload.'.

Removed from v.1.173  
changed lines
  Added in v.1.175


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