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

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 13 Aug 2003 17:54:12 -0000


sakharuk		Wed Aug 13 13:54:12 2003 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  Prints the file's name table of contents if any other name is absent (in lonnavmap). 
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.202 loncom/homework/structuretags.pm:1.203
--- loncom/homework/structuretags.pm:1.202	Wed Aug 13 11:25:59 2003
+++ loncom/homework/structuretags.pm	Wed Aug 13 13:54:12 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.202 2003/08/13 15:25:59 sakharuk Exp $
+# $Id: structuretags.pm,v 1.203 2003/08/13 17:54:12 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -443,6 +443,11 @@
 	    my $due_file_content = $due_file_content[$#due_file_content];
 	    chomp $due_file_content;
 	    my $name_of_resourse= &get_resource_name($parstack,$safeeval);
+	    if (not $name_of_resourse=~/\S+/) {
+		$name_of_resourse=$ENV{'request.uri'};
+		$name_of_resourse=~/\/([^\/]+)$/;
+		$name_of_resourse=$1;
+	    }
 	    if ($due_file_content ne $duedate) {
 		$temp_file = Apache::File->new('>'.$filename);
 		print $temp_file "$duedate\n";