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

version 1.254.2.6.2.4, 2024/09/07 03:48:34 version 1.269, 2024/09/07 01:07:21
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 267  sub display_directory_line { Line 267  sub display_directory_line {
   
 sub display_directory {  sub display_directory {
     my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,      my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,
         $can_modify,$can_delete,$can_setacl,$can_viewacl,$caller)=@_;          $can_modify,$can_delete,$can_setacl,$can_viewacl)=@_;
     my $iconpath= $r->dir_config('lonIconsURL') . "/";      my $iconpath= $r->dir_config('lonIconsURL') . "/";
     my $select_mode;      my $select_mode;
     my $checked_files;      my $checked_files;
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 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);
     }      }
     $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.269


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