[LON-CAPA-cvs] cvs: loncom /interface lonchat.pm lonchatfetch.pm loncommon.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 19 Mar 2006 22:48:55 -0000
albertel Sun Mar 19 17:48:55 2006 EDT
Modified files:
/loncom/interface loncommon.pm lonchat.pm lonchatfetch.pm
Log:
- redirect typso fixes
- chat -> start_page
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.313 loncom/interface/loncommon.pm:1.314
--- loncom/interface/loncommon.pm:1.313 Sun Mar 19 16:43:20 2006
+++ loncom/interface/loncommon.pm Sun Mar 19 17:48:53 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.313 2006/03/19 21:43:20 albertel Exp $
+# $Id: loncommon.pm,v 1.314 2006/03/19 22:48:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2979,8 +2979,8 @@
&Apache::lonxml::fontsettings().
&Apache::lonhtmlcommon::htmlareaheaders();
- if (ref($args->{'redir'})) {
- my ($time,$url) = @{$args->{'redir'}};
+ if (ref($args->{'redirect'})) {
+ my ($time,$url) = @{$args->{'redirect'}};
$result.=<<ADDMETA
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$url" />
Index: loncom/interface/lonchat.pm
diff -u loncom/interface/lonchat.pm:1.10 loncom/interface/lonchat.pm:1.11
--- loncom/interface/lonchat.pm:1.10 Thu Apr 7 02:56:22 2005
+++ loncom/interface/lonchat.pm Sun Mar 19 17:48:53 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Chat
#
-# $Id: lonchat.pm,v 1.10 2005/04/07 06:56:22 albertel Exp $
+# $Id: lonchat.pm,v 1.11 2006/03/19 22:48:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -49,21 +49,21 @@
}
# --------------------------------------------------- Print login screen header
my $latexHelp = Apache::loncommon::helpLatexCheatsheet();
- my $html=&Apache::lonxml::xmlbegin();
+ my $loaditems = 'onLoad="this.document.chatentry.newchat.focus();"';
+ my $start_page =
+ &Apache::loncommon::start_page('Chat',undef,
+ {'only_body' => 1,
+ 'add_entries' => $loaditems,});
+ my $end_page = &Apache::loncommon::end_page();
$r->print(<<ENDDOCUMENT);
-$html
-<head>
-<title>The LearningOnline Network with CAPA</title>
-</head>
-<body bgcolor="#FFFFFF" onLoad="this.document.chatentry.newchat.focus();">
+$start_page
<form method="post" name="chatentry">
$latexHelp
<input type="text" size="60" name="newchat">
<input value="Post Anonymous" name="anonymous" type="submit">
<input value="Post" name="newentry" type="submit">
</form>
-</body>
-</html>
+$end_page
ENDDOCUMENT
return OK;
}
Index: loncom/interface/lonchatfetch.pm
diff -u loncom/interface/lonchatfetch.pm:1.18 loncom/interface/lonchatfetch.pm:1.19
--- loncom/interface/lonchatfetch.pm:1.18 Sun Jun 5 22:29:46 2005
+++ loncom/interface/lonchatfetch.pm Sun Mar 19 17:48:53 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Chat Fetching
#
-# $Id: lonchatfetch.pm,v 1.18 2005/06/06 02:29:46 albertel Exp $
+# $Id: lonchatfetch.pm,v 1.19 2006/03/19 22:48:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -150,21 +150,19 @@
}
}
my $participant_output=join('<br />',sort @participants);
- my $html=&Apache::lonxml::xmlbegin();
+ my $start_page =
+ &Apache::loncommon::start_page('Chat',undef,
+ {'redirect' => [5,"/adm/chatfetch?lastid=$lastid"],
+ 'only_body' => 1,});
+ my $end_page = &Apache::loncommon::end_page();
$r->print(<<ENDDOCUMENT);
-$html
-<head>
-<title>The LearningOnline Network with CAPA</title>
- <meta HTTP-EQUIV="Refresh" CONTENT="5; url=/adm/chatfetch?lastid=$lastid">
-</head>
-<body bgcolor="#FFFFFF">
-<script>
+$start_page
+<script type="text/javascript">
parent.chatout.document.writeln('$newstuff');
parent.chatout.scroll(0,10000000);
</script>
$participant_output
-</body>
-</html>
+$end_page
ENDDOCUMENT
return OK;
}