[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 10 Sep 2004 21:33:49 -0000


albertel		Fri Sep 10 17:33:49 2004 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  - really fix the style
  
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.45 loncom/interface/portfolio.pm:1.46
--- loncom/interface/portfolio.pm:1.45	Fri Sep 10 16:48:33 2004
+++ loncom/interface/portfolio.pm	Fri Sep 10 17:33:48 2004
@@ -379,28 +379,30 @@
 	my @dir_list=&Apache::lonnet::dirlist($current_path,
 					    $ENV{'user.domain'},
 					    $ENV{'user.name'},$portfolio_root);
-    if ($dir_list[0] eq 'no_such_dir'){
-        # two main reasons for this: 1) never been here, so directory structure not created
-        #                            2) back-button navigation after deleting a directory
-        if ($current_path eq '/'){
+	if ($dir_list[0] eq 'no_such_dir'){
+	    # two main reasons for this:
+            #    1) never been here, so directory structure not created
+	    #    2) back-button navigation after deleting a directory
+	    if ($current_path eq '/'){
 	        &Apache::lonnet::mkdiruserfile($ENV{'user.name'},
-	        $ENV{'user.domain'},'portfolio');
-        } else { # some directory that snuck in
-            # get rid of the directory from the recent pulldown, just in case
-            &Apache::lonhtmlcommon::remove_recent('portfolio',[$current_path]);
-            $current_path = '/'; # force it back to the root        
+					       $ENV{'user.domain'},'portfolio');
+	    } else {
+                # some directory that snuck in get rid of the directory
+                # from the recent pulldown, just in case
+		&Apache::lonhtmlcommon::remove_recent('portfolio',
+						      [$current_path]);
+		$current_path = '/'; # force it back to the root        
+	    }
+	    # now grab the directory list again, for the first time
+	    @dir_list=&Apache::lonnet::dirlist($current_path,
+					    $ENV{'user.domain'},
+					    $ENV{'user.name'},$portfolio_root);
         }
-        # now grab the directory list again, for the first time
-        @dir_list=&Apache::lonnet::dirlist($current_path,
-				    $ENV{'user.domain'},
-				    $ENV{'user.name'},$portfolio_root);
-        
-        }
-	    # need to know if directory is empty so it can be removed if desired
-	    my $is_empty=(@dir_list == 2);
-	    &display_directory($r,$current_path,$is_empty,\@dir_list);
-	    $r->print("</body>\n</html>\n");
-	    return OK;
+	# need to know if directory is empty so it can be removed if desired
+	my $is_empty=(@dir_list == 2);
+	&display_directory($r,$current_path,$is_empty,\@dir_list);
+	$r->print("</body>\n</html>\n");
+	return OK;
     }
 }
 1;