[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 20 Apr 2006 02:08:15 -0000


albertel		Wed Apr 19 22:08:15 2006 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - start_page .html files with <frameset>
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.327 loncom/xml/londefdef.pm:1.328
--- loncom/xml/londefdef.pm:1.327	Tue Apr 18 16:45:40 2006
+++ loncom/xml/londefdef.pm	Wed Apr 19 22:08:15 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.327 2006/04/18 20:45:40 albertel Exp $
+# $Id: londefdef.pm,v 1.328 2006/04/20 02:08:15 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -3088,34 +3088,14 @@
     my ($target,$token) = @_;
     my $currentstring = '';	# Close any pending para.
     if ($target eq 'web' || $target eq 'webgrade') { 
-	if (!$Apache::lonxml::registered &&
-	    $env{'request.state'} eq 'published') {
-	    $currentstring.='<head>'.
-		&Apache::lonmenu::registerurl(undef,$target).'</head>';
-	}
-	my $onLoad='';
-	foreach my $key (keys(%{$token->[2]})) {
-	    if ($key =~ /^onload$/i) {
-		$onLoad.=$token->[2]->{$key}.';';
-		delete($token->[2]->{$key});
-	    }
-	}
-	$token->[2]->{'onload'}=&Apache::lonmenu::loadevents().';'.$onLoad;
-	my $onUnload='';
-	foreach my $key (keys(%{$token->[2]})) {
-	    if ($key =~ /^onunload$/i) {
-		$onUnload.=$token->[2]->{$key}.';';
-		delete($token->[2]->{$key});
-	    }
-	}
-	$token->[2]->{'onunload'}=&Apache::lonmenu::unloadevents().
-	    ';'.$onUnload;
-	
-	$currentstring .= '<'.$token->[1];
-	foreach (keys %{$token->[2]}) {
-	    $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"';
-	}
-	$currentstring.='>';
+	$currentstring = 
+	    &Apache::loncommon::start_page($Apache::londefdef::title,
+					   $Apache::londefdef::head,
+					   {'add_entries'    => $token->[2],
+					    'no_title'       => 1,
+					    'force_register' => 1,
+					    'frameset'       => 1,});
+
     }
     return $currentstring;
 }