[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 13 Aug 2003 18:49:42 -0000


albertel		Wed Aug 13 14:49:42 2003 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - fix my breakage of Alex's regexp
  - remove extra code that was badly replicating get_resource_name
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.204 loncom/homework/structuretags.pm:1.205
--- loncom/homework/structuretags.pm:1.204	Wed Aug 13 14:19:59 2003
+++ loncom/homework/structuretags.pm	Wed Aug 13 14:49:41 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.204 2003/08/13 18:19:59 albertel Exp $
+# $Id: structuretags.pm,v 1.205 2003/08/13 18:49:41 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -140,7 +140,7 @@
     }
     if ($name!~/\S+/) {
 	$name=$ENV{'request.uri'};
-	$name=~s-/([^/]+)$-$1-;
+	$name=~s-.*/([^/]+)$-$1-;
     }
     $Apache::lonhomework::name=$name;
     return $name;
@@ -443,12 +443,6 @@
 	    if (not $ENV{'form.problem_split'}=~/yes/) {
 		$startminipage = '\begin{minipage}{\textwidth}';
 	    }
-	    my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval);
-	    if ($name eq '') {
-		$name=&Apache::lonnet::EXT('resource.title');
-		if ($name eq 'con_lost') { $name = ''; }
-	    }
-	    $Apache::lonhomework::name=$name;
 	    my $id = $Apache::inputtags::part;
 	    my $weight = &Apache::lonnet::EXT("resource.$id.weight");
 	    my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys');