--- loncom/interface/portfolio.pm	2020/09/09 01:11:48	1.254.2.5
+++ loncom/interface/portfolio.pm	2021/04/29 16:18:58	1.264
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.254.2.5 2020/09/09 01:11:48 raeburn Exp $
+# $Id: portfolio.pm,v 1.264 2021/04/29 16:18:58 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;
 	    }
@@ -370,7 +370,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} },
@@ -383,7 +383,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;
@@ -909,13 +909,13 @@ sub display_access {
         $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></ul>'.
-                  &mt('A listing of files viewable without log-in is available at: ')."<a href=\"/adm/$udom/$uname/aboutme/portfolio\">".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme/portfolio</a>.<br />";
+                  &mt('A listing of files viewable without log-in is available at: ')."<a href=\"/adm/$udom/$uname/aboutme/portfolio\">".&Apache::lonnet::absolute_url()."/adm/$udom/$uname/aboutme/portfolio</a>.<br />";
         if ($group eq '') {
             $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\">".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme</a><br />";
+        $info .= "<br /><a href=\"/adm/$udom/$uname/aboutme\">".&Apache::lonnet::absolute_url()."/adm/$udom/$uname/aboutme</a><br />";
         if ($group ne '') {
             $info .= &mt("Users with course editing rights may add a 'Group Portfolio' item using the Course Editor (Collaboration tab), to provide access to viewable group portfolio files.").'<br />';
         }
@@ -2745,7 +2745,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}));