[LON-CAPA-cvs] cvs: loncom /auth londatecheck.pm /interface loncommon.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 13 Apr 2006 21:02:39 -0000
albertel Thu Apr 13 17:02:39 2006 EDT
Modified files:
/loncom/interface loncommon.pm
/loncom/auth londatecheck.pm
Log:
- adding discussion listing support to end_page
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.334 loncom/interface/loncommon.pm:1.335
--- loncom/interface/loncommon.pm:1.334 Thu Apr 13 15:12:48 2006
+++ loncom/interface/loncommon.pm Thu Apr 13 17:02:25 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.334 2006/04/13 19:12:48 albertel Exp $
+# $Id: loncommon.pm,v 1.335 2006/04/13 21:02:25 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3186,6 +3186,15 @@
#&Apache::lonnet::logthis("end_page ".join(':',caller(0)));
$env{'internal.end_page'}++;
my $result;
+ if ($args->{'discussion'}) {
+ my ($target,$parser);
+ if (ref($args->{'discussion'})) {
+ ($target,$parser) =($args->{'discussion'}{'target'},
+ $args->{'discussion'}{'parser'});
+ }
+ $result .= &Apache::lonxml::xmlend($target,$parser);
+ }
+
if ($args->{'frameset'}) {
$result .= '</frameset>';
} else {
@@ -3196,9 +3205,11 @@
if ($args->{'js_ready'}) {
$result = &js_ready($result);
}
+
if ($args->{'html_encode'}) {
$result = &html_encode($result);
}
+
return $result;
}
Index: loncom/auth/londatecheck.pm
diff -u loncom/auth/londatecheck.pm:1.11 loncom/auth/londatecheck.pm:1.12
--- loncom/auth/londatecheck.pm:1.11 Mon Apr 25 17:41:37 2005
+++ loncom/auth/londatecheck.pm Thu Apr 13 17:02:34 2006
@@ -1,5 +1,5 @@
# Checks contentopen/close settings disable subsequent PerlHandlers if not open
-# $Id: londatecheck.pm,v 1.11 2005/04/25 21:41:37 albertel Exp $
+# $Id: londatecheck.pm,v 1.12 2006/04/13 21:02:34 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -28,6 +28,7 @@
package Apache::londatecheck;
use Apache::lonnet;
use Apache::lonlocal;
+use Apache::loncommon();
use Apache::Constants qw(:common :http :methods);
sub content_date_check {
@@ -60,12 +61,14 @@
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
- my $html=&Apache::lonxml::xmlbegin();
- $r->print($html.'<head><title>'.&mt("Not Open").'</title>');
- $r->print(&Apache::lonmenu::registerurl(1));
- $r->print('</head>'.&Apache::structuretags::body_tag_start('web'));
- $r->print($msg);
- $r->print(&Apache::lonxml::xmlend().'</html>');
+ my $start_page =
+ &Apache::loncommon::start_page('Not Open',undef,
+ {'bgcolor' => '#FFFFFF',
+ 'force_register' => 1,});
+ my $end_page =
+ &Apache::loncommon::end_page({'discussion' => 1});
+ $r->print($start_page.$msg.$end_page);
+
return OK;
}
return DECLINED;