Diff for /loncom/interface/portfolio.pm between versions 1.254.2.6.2.4 and 1.271

version 1.254.2.6.2.4, 2024/09/07 03:48:34 version 1.271, 2024/09/07 19:13:00
Line 237  sub display_directory_line { Line 237  sub display_directory_line {
  if ($lock_info) {   if ($lock_info) {
     my %anchor_fields = ('lockinfo' => $fullpath);      my %anchor_fields = ('lockinfo' => $fullpath);
     if ($versions) { # hold the folder open      if ($versions) { # hold the folder open
         my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($fullpath);          my ($fname,$version,$extension) = &Apache::lonnet::file_name_version_ext($fullpath);
         $fname =~ s|^/||;          $fname =~ s|^/||;
         $anchor_fields{'showversions'} = $fname.'.'.$extension;          $anchor_fields{'showversions'} = $fname.'.'.$extension;
     }      }
Line 315  sub display_directory { Line 315  sub display_directory {
            .'</p>'             .'</p>'
         );          );
         my ($acl_helpfile,$acl_helplink);          my ($acl_helpfile,$acl_helplink);
         if ($can_setacl) {          if ($caller eq 'coursegrp_portfolio') {
             $acl_helpfile = 'Portfolio ShareFile';  
         } elsif ($caller eq 'coursegrp_portfolio') {  
             $acl_helpfile = 'Portfolio ShareFile Group';              $acl_helpfile = 'Portfolio ShareFile Group';
           } elsif ($can_setacl) {
               $acl_helpfile = 'Portfolio ShareFile';
         }          }
         unless ($can_setacl || $can_viewacl) {          unless ($can_setacl || $can_viewacl) {
             $acl_helpfile = 'Portfolio ShareFile Off';              $acl_helpfile = 'Portfolio ShareFile Off';
Line 385  sub display_directory { Line 385  sub display_directory {
           } (@{$dir_list})) {            } (@{$dir_list})) {
        my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$dir_line,16);          my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$dir_line,16); 
        $filename =~ s/\s+$//;         $filename =~ s/\s+$//;
        my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename);         my ($fname,$version,$extension) = &Apache::lonnet::file_name_version_ext($filename);
        if ($version) {         if ($version) {
         my $fullpath = &prepend_group($current_path.$fname.'.'.$extension);          my $fullpath = &prepend_group($current_path.$fname.'.'.$extension);
            push(@{ $versioned{$fullpath} },             push(@{ $versioned{$fullpath} },
Line 398  sub display_directory { Line 398  sub display_directory {
     my $zerobyte;      my $zerobyte;
     foreach my $dir_line (@dir_lines) {      foreach my $dir_line (@dir_lines) {
         my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line;          my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line;
         my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename);          my ($fname,$version,$extension) = &Apache::lonnet::file_name_version_ext($filename);
     if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) {      if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) {
        my $version_flag;         my $version_flag;
        my $show_versions;         my $show_versions;
Line 502  sub display_directory { Line 502  sub display_directory {
     my $cond_access = 0;      my $cond_access = 0;
     foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {      foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {
  my ($num,$scope,$end,$start) = &unpack_acc_key($key);   my ($num,$scope,$end,$start) = &unpack_acc_key($key);
                         next if ($scope eq 'ip');                            next if ($scope eq 'ip');   
  if (($now > $start) && (!$end || $end > $now)) {   if (($now > $start) && (!$end || $end > $now)) {
     if ($scope eq 'public')  {      if ($scope eq 'public')  {
  $pub_access = 1;   $pub_access = 1;
Line 2764  sub handler { Line 2764  sub handler {
         $can_modify = 1;          $can_modify = 1;
         $can_delete = 1;          $can_delete = 1;
         $can_upload = 1;          $can_upload = 1;
         if (&Apache::lonnet::usertools_access('','','portaccess',          if (&Apache::lonnet::usertools_access($uname,$udom,'portaccess',
                                               undef,'tools')) {                                                undef,'tools')) {
             $can_viewacl = 1;              $can_viewacl = 1;
             $can_setacl = 1;              $can_setacl = 1;
Line 2780  sub handler { Line 2780  sub handler {
   
     my $js = '<script type="text/javascript"      my $js = '<script type="text/javascript"
                 src="/res/adm/includes/file_upload.js"></script>';                  src="/res/adm/includes/file_upload.js"></script>';
       
     if ($env{"form.mode"} eq 'selectfile'){      if ($env{"form.mode"} eq 'selectfile'){
         $r->print(&Apache::loncommon::start_page($title, $js,          $r->print(&Apache::loncommon::start_page($title, $js,
  {'only_body' => 1}));   {'only_body' => 1}));
Line 3031  sub handler { Line 3031  sub handler {
  $can_upload,$group);   $can_upload,$group);
         &display_directory($r,$url,$current_path,$is_empty,$dirlistref,$group,          &display_directory($r,$url,$current_path,$is_empty,$dirlistref,$group,
                            $can_upload,$can_modify,$can_delete,$can_setacl,                             $can_upload,$can_modify,$can_delete,$can_setacl,
                            $can_viewacl,$caller);                              $can_viewacl,$caller);
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;

Removed from v.1.254.2.6.2.4  
changed lines
  Added in v.1.271


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