[LON-CAPA-cvs] cvs: rat / lonwrapper.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 11 Apr 2006 19:42:32 -0000
albertel Tue Apr 11 15:42:32 2006 EDT
Modified files:
/rat lonwrapper.pm
Log:
- start_page + frameset
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.22 rat/lonwrapper.pm:1.23
--- rat/lonwrapper.pm:1.22 Tue Apr 4 11:11:48 2006
+++ rat/lonwrapper.pm Tue Apr 11 15:42:32 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Wrapper for external and binary files as standalone resources
#
-# $Id: lonwrapper.pm,v 1.22 2006/04/04 15:11:48 albertel Exp $
+# $Id: lonwrapper.pm,v 1.23 2006/04/11 19:42:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -64,36 +64,37 @@
&Apache::loncommon::end_page();
}
- my $events='onLoad="'.&Apache::lonmenu::loadevents.
- '" onUnload="'.&Apache::lonmenu::unloadevents.'"';
-
- my $result = &Apache::lonxml::xmlbegin().
- &Apache::loncommon::head(undef,undef,
- {'force_register' => 1});
-
+
+ my %layout = ('border' => 0);
if ($env{'environment.remote'} eq 'off') {
-#
-# This is inline remote
-#
- $result .= <<ENDDOCUMENTINL;
-<frameset rows="180,*" border="0" $events>
-<frame src="$topurl">
-<frame src="$bottomurl">
-</frameset>
-ENDDOCUMENTINL
+ $layout{'rows'} = "180,*";
} else {
+ $layout{'rows'} = "1,*";
+ $topurl = "/adm/rat/empty.html";
+ }
+
+ my $start_page =
+ &Apache::loncommon::start_page(undef,undef,
+ {'force_register' => 1,
+ 'frameset' => 1,
+ 'add_entries' => \%layout, });
+
+ my $end_page =
+ &Apache::loncommon::end_page({'frameset' => 1});
+
+
#
# frame-based rendering for graphical interface
#
- $result .=<<ENDDOCUMENT;
-<frameset rows="1,*" border="0" $events>
-<frame src="/adm/rat/empty.html">
-<frame src="$bottomurl">
-</frameset>
+ my $result =<<ENDDOCUMENT;
+$start_page
+test
+<frame src="$topurl" />
+<frame src="$bottomurl" />
+$end_page
ENDDOCUMENT
- }
- $result .= "\n</html>\n";
+ return $result;
}
sub handler {