[LON-CAPA-cvs] cvs: loncom /interface loncommunicate.pm lonevaluate.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 19 Mar 2006 22:22:49 -0000
albertel Sun Mar 19 17:22:49 2006 EDT
Modified files:
/loncom/interface lonevaluate.pm loncommunicate.pm
Log:
- switch to start_page
Index: loncom/interface/lonevaluate.pm
diff -u loncom/interface/lonevaluate.pm:1.18 loncom/interface/lonevaluate.pm:1.19
--- loncom/interface/lonevaluate.pm:1.18 Thu Mar 2 16:11:00 2006
+++ loncom/interface/lonevaluate.pm Sun Mar 19 17:22:49 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Evaluate
#
-# $Id: lonevaluate.pm,v 1.18 2006/03/02 21:11:00 albertel Exp $
+# $Id: lonevaluate.pm,v 1.19 2006/03/19 22:22:49 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -37,6 +37,8 @@
sub handler {
my $r = shift;
&Apache::loncommon::content_type($r,'text/html');
+ &Apache::loncommon::no_cache($r);
+
$r->send_http_header;
return OK if $r->header_only;
@@ -70,8 +72,6 @@
my $warning='';
- my $bodytag=&Apache::loncommon::bodytag('Evaluate Resource');
-
if ($env{'form.submiteval'} eq 'true') {
# ------------------------------------------------ User is submitting something
my $complete=1;
@@ -84,11 +84,7 @@
}
if ($complete) {
my $showurl=&Apache::lonenc::check_encrypt(&Apache::lonnet::clutter($feedurl));
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<<ENDHEADER);
-$html
-<head>
-<title>Evaluation submitted</title>
+ my $js =<<ENDJS;
<script type="text/javascript">
function goback() {
if ((window.name=='loncapaclient')) {
@@ -98,9 +94,12 @@
}
}
</script>
-<meta http-equiv="pragma" content="no-cache"></meta>
-</head>
-$bodytag
+ENDJS
+
+ my $start_page =
+ &Apache::loncommon::start_page('Evaluate Resource',$js);
+ $r->print(<<ENDHEADER);
+$start_page
<h1>Thank you for your input!</h1>
ENDHEADER
$r->print('Storing feedback: '.
@@ -109,7 +108,7 @@
$r->print('<br />Logging first evaluation');
}
$r->print(
- '<script type="text/javascript">setTimeout("goback()",2000);</script></body></html>');
+ '<script type="text/javascript">setTimeout("goback()",2000);</script>'.&Apache::loncommon::end_page());
return OK;
} else {
$warning='Please fill out all fields below';
@@ -143,13 +142,10 @@
<option value="5">Strongly Agree</option>
ENDOPTIONS
- my $html=&Apache::lonxml::xmlbegin();
+ my $start_page = &Apache::loncommon::start_page('Evaluate Resource');
+ my $end_page = &Apache::loncommon::end_page();
$r->print(<<ENDDOCUMENT);
-$html
-<head>
-<title>The LearningOnline Network with CAPA</title>
-</head>
-$bodytag
+$start_page
<tt>$title</tt><br /><br />
<h3><font color="red">$warning</font></h3>
Please rank the following criteria:
@@ -187,8 +183,7 @@
<script type="text/javascript">$dialold</script>
<br /><input type="submit" value="Submit Evaluation" />
</form>
-</body>
-</html>
+$end_page
ENDDOCUMENT
return OK;
}
Index: loncom/interface/loncommunicate.pm
diff -u loncom/interface/loncommunicate.pm:1.29 loncom/interface/loncommunicate.pm:1.30
--- loncom/interface/loncommunicate.pm:1.29 Fri May 20 13:00:40 2005
+++ loncom/interface/loncommunicate.pm Sun Mar 19 17:22:49 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Communicate
#
-# $Id: loncommunicate.pm,v 1.29 2005/05/20 17:00:40 albertel Exp $
+# $Id: loncommunicate.pm,v 1.30 2006/03/19 22:22:49 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -97,13 +97,6 @@
#
# Start document
#
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<<END);
-$html
-<head>
-<title>The LearningOnline Network with CAPA</title>
-</head>
-END
# ----------------------------------------------------------------- Breadcrumbs
&Apache::lonhtmlcommon::clear_breadcrumbs();
@@ -116,6 +109,7 @@
&Apache::lonmsg::header($r);
&menu($r);
&Apache::lonmsg::disall($r,'new');
+ $r->print(&Apache::loncommon::end_page());
return OK;
}