[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 11 Apr 2006 21:05:54 -0000
albertel Tue Apr 11 17:05:54 2006 EDT
Modified files:
/loncom/homework lonhomework.pm
Log:
- start_page
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.237 loncom/homework/lonhomework.pm:1.238
--- loncom/homework/lonhomework.pm:1.237 Fri Mar 24 12:34:11 2006
+++ loncom/homework/lonhomework.pm Tue Apr 11 17:05:54 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.237 2006/03/24 17:34:11 albertel Exp $
+# $Id: lonhomework.pm,v 1.238 2006/04/11 21:05:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -622,12 +622,11 @@
sub analyze_header {
my ($request) = @_;
- my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,
- ($env{'environment.remote'} ne 'off'));
- my $html=&Apache::lonxml::xmlbegin();
- my $result.=$html.'
- <head><title>'.&mt("Analyzing a problem").'</title></head>
- '.$bodytag.&Apache::lonxml::message_location().'
+ my $result =
+ &Apache::loncommon::start_page('Analyzing a problem',undef,
+ {'only_body' => ($env{'environment.remote'} ne 'off'),});
+ $result .=
+ &Apache::lonxml::message_location().'
<form name="lonhomework" method="POST" action="'.
&HTML::Entities::encode($env{'request.uri'},'<>&"').'">'.
&Apache::structuretags::remember_problem_state().'
@@ -755,13 +754,13 @@
if ($cols > 80) { $cols = 80; }
if ($cols < 70) { $cols = 70; }
if ($rows < 20) { $rows = 20; }
- my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,
- ($env{'environment.remote'} ne 'off'));
- my $html=&Apache::lonxml::xmlbegin();
- my $head="<head><title>EditXML $file</title>".
- &Apache::edit::js_change_detection()."</head>";
+ my $start_page =
+ &Apache::loncommon::start_page("EditXML $file",
+ &Apache::edit::js_change_detection(),
+ {'only_body' =>
+ ($env{'environment.remote'} ne 'off')});
- $result.=$html.$head.$bodytag.
+ $result.=$start_page.
&renderpage($request,$file,['no_output_web'],1).
&Apache::lonxml::message_location().'
<form '.&Apache::edit::form_change_detection().' name="lonhomework" method="POST" action="'.
@@ -780,7 +779,7 @@
&HTML::Entities::encode($problem,'<>&"').'</textarea><br />
<input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" />
<input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />
- </form></body></html>';
+ </form>'.&Apache::loncommon::end_page();
&Apache::lonxml::add_messages(\$result);
$request->print($result);
}
@@ -937,7 +936,7 @@
$request->print("<select name=\"template\">$templatelist</select>");
}
$request->print("<br /><input type=\"submit\" name=\"newfile\" value=\"".&mt('Create')." $extension\" />");
- $request->print("</form></p></body>");
+ $request->print("</form></p>".&Apache::loncommon::end_page());
}
return '';
}