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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 28 Mar 2006 20:45:59 -0000


albertel		Tue Mar 28 15:45:59 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - add titles to both web and webgrade
  - add missing </p>
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.122 loncom/homework/bridgetask.pm:1.123
--- loncom/homework/bridgetask.pm:1.122	Tue Mar 28 14:55:43 2006
+++ loncom/homework/bridgetask.pm	Tue Mar 28 15:45:58 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.122 2006/03/28 19:55:43 albertel Exp $
+# $Id: bridgetask.pm,v 1.123 2006/03/28 20:45:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -213,6 +213,7 @@
 						   'gradinguser',
 						   'gradingdomain');
 	$result.=&Apache::loncommon::studentbrowser_javascript();
+	$result.= '</p>';
   }
     return $result;
 }
@@ -429,6 +430,13 @@
 	&Apache::structuretags::page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);
     
     $body_tag_start .= '<div class="LC_task">'."\n";
+
+    if ($target eq 'web' || $target eq 'webgrade') {
+	$head_tag_start.='<title>'.
+	    &Apache::structuretags::get_resource_name($parstack,$safeeval).
+	    '</title>';
+    }
+
     if ($target eq 'web' && $env{'request.state'} ne 'construct') {
 	if ($Apache::lonhomework::modifygrades) {
 	    $body_tag_start.='<form name="gradesubmission" method="post" action="';
@@ -538,8 +546,7 @@
 		}
 	    }
 	} elsif ($target eq 'web') {
-	    my $name= &Apache::structuretags::get_resource_name($parstack,$safeeval);
-	    $result.="$head_tag_start<title>$name</title></head>
+	    $result.="$head_tag_start</head>
               $body_tag_start \n".&style();
 	    
 	    $result.=&preserve_grade_info();