--- loncom/interface/portfolio.pm	2024/09/07 03:48:34	1.254.2.6.2.4
+++ loncom/interface/portfolio.pm	2024/09/07 03:22:51	1.270
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.254.2.6.2.4 2024/09/07 03:48:34 raeburn Exp $
+# $Id: portfolio.pm,v 1.270 2024/09/07 03:22:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -237,7 +237,7 @@ sub display_directory_line {
 	if ($lock_info) {
 	    my %anchor_fields = ('lockinfo' => $fullpath);
 	    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|^/||;
 	        $anchor_fields{'showversions'} = $fname.'.'.$extension;
 	    }
@@ -385,7 +385,7 @@ sub display_directory {
 		          } (@{$dir_list})) {
     	    my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$dir_line,16); 
     	    $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) {
 	        my $fullpath = &prepend_group($current_path.$fname.'.'.$extension);
     	        push(@{ $versioned{$fullpath} },
@@ -398,7 +398,7 @@ sub display_directory {
     my $zerobyte;
     foreach my $dir_line (@dir_lines) {
         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+)\.([^\.]*)$/)) {
     	    my $version_flag;
     	    my $show_versions;
@@ -502,7 +502,7 @@ sub display_directory {
 		    my $cond_access = 0;
 		    foreach my $key (sort(keys(%{$access_controls{$fullpath}}))) {
 			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 ($scope eq 'public')  {
 				$pub_access = 1;
@@ -2780,7 +2780,7 @@ sub handler {
 
     my $js = '<script type="text/javascript"
                 src="/res/adm/includes/file_upload.js"></script>';
-
+    
     if ($env{"form.mode"} eq 'selectfile'){
         $r->print(&Apache::loncommon::start_page($title, $js,
 						 {'only_body' => 1}));
@@ -3031,7 +3031,7 @@ sub handler {
 			$can_upload,$group);
         &display_directory($r,$url,$current_path,$is_empty,$dirlistref,$group,
                            $can_upload,$can_modify,$can_delete,$can_setacl,
-                           $can_viewacl,$caller); 
+                           $can_viewacl,$caller);
     }
     $r->print(&Apache::loncommon::end_page());
     return OK;