[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm lonlogout.pm /html/res/adm/pages menu.html /interface loncommon.pm lonfeedback.pm lonmenu.pm lonparmset.pm lonremote.pm lonsearchcat.pm printout.pl /publisher lonconstruct.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 06 Jun 2003 02:24:49 -0000
This is a MIME encoded message
--www1054866289
Content-Type: text/plain
www Thu Jun 5 22:24:49 2003 EDT
Modified files:
/loncom/auth lonauth.pm lonlogout.pm
/loncom/html/res/adm/pages menu.html
/loncom/interface loncommon.pm lonfeedback.pm lonmenu.pm
lonparmset.pm lonremote.pm lonsearchcat.pm
printout.pl
/loncom/publisher lonconstruct.pm
Log:
Rewinding changes on window registration.
Attempting to overcome JavaScript security by using POST to change window
location.
--www1054866289
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030605222449.txt"
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.51 loncom/auth/lonauth.pm:1.52
--- loncom/auth/lonauth.pm:1.51 Sat May 24 08:43:54 2003
+++ loncom/auth/lonauth.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.51 2003/05/24 12:43:54 www Exp $
+# $Id: lonauth.pm,v 1.52 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -172,7 +172,7 @@
my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
my $setflags=&Apache::lonmenu::setflags();
my $maincall=&Apache::lonmenu::maincall();
- my $bodytag=&Apache::loncommon::bodytag('Successful Login',undef,' ');
+ my $bodytag=&Apache::loncommon::bodytag('Successful Login');
# ------------------------------------------------- Output for successful login
$r->send_cgi_header(<<ENDHEADER);
@@ -204,7 +204,7 @@
sub failed {
my ($r,$message) = @_;
- my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login',undef,' ');
+ my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login');
$r->send_cgi_header(<<ENDFHEADER);
Content-type: text/html
Index: loncom/auth/lonlogout.pm
diff -u loncom/auth/lonlogout.pm:1.9 loncom/auth/lonlogout.pm:1.10
--- loncom/auth/lonlogout.pm:1.9 Fri May 23 17:18:56 2003
+++ loncom/auth/lonlogout.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Logout Handler
#
-# $Id: lonlogout.pm,v 1.9 2003/05/23 21:18:56 www Exp $
+# $Id: lonlogout.pm,v 1.10 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -86,7 +86,7 @@
$ENV{'form.handover'}.'">';
$bodytag=&Apache::loncommon::bodytag('Switching Server ...');
} else {
- $bodytag=&Apache::loncommon::bodytag('Logged Out',undef,' ');
+ $bodytag=&Apache::loncommon::bodytag('Logged Out');
$relogmessage=(<<ENDRELOG);
<h1>Goodbye!</h1>
Please either <a href="javascript:self.close();">close this window</a> or
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.101 loncom/html/res/adm/pages/menu.html:1.102
--- loncom/html/res/adm/pages/menu.html:1.101 Thu Jun 5 20:42:14 2003
+++ loncom/html/res/adm/pages/menu.html Thu Jun 5 22:24:49 2003
@@ -4,7 +4,7 @@
Remote Control
//
-// $Id: menu.html,v 1.101 2003/06/06 00:42:14 www Exp $
+// $Id: menu.html,v 1.102 2003/06/06 02:24:49 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -59,7 +59,6 @@
var reloadSymb='';
var currentStale=1;
var menucltim;
-var noclient=0;
var clockdelta=0;
@@ -138,24 +137,14 @@
setTimeout('advanceclock();',1000);
}
-function windowloaded(wname) {
- if (wname=='loncapaclient') { noclient=0; }
-}
-
-function windowunloaded(wname) {
- if (wname=='loncapaclient') { noclient=1;}
-}
-
function windowcheck() {
- if (noclient || (clientwindow==null || clientwindow.closed)) {
+ if (clientwindow==null || clientwindow.closed) {
clientwindow=window.open("http://"+clienthost+"/",'',
"height=400,width=440,"+
"scrollbars=1,toolbar=1,status=1,resizable=1,location=1,menubar=1,"+
"left=190,top=15,screenX=190,screenY=15");
+ clientwindow.name='loncapaclient';
}
- clientwindow.name='loncapaclient';
- clientwindow.menuwindow=self;
- noclient=0;
extenddispclose();
}
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.102 loncom/interface/loncommon.pm:1.103
--- loncom/interface/loncommon.pm:1.102 Thu May 29 13:49:22 2003
+++ loncom/interface/loncommon.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.102 2003/05/29 17:49:22 www Exp $
+# $Id: loncommon.pm,v 1.103 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1731,20 +1731,11 @@
unless ($realm) { $realm=' '; }
# Set messages
my $messages=&domainlogo($domain);
-# Signal existance to Remote unless already done so
- my $addscript='';
- unless (($ENV{'browser.interface'} eq 'textual') ||
- ($ENV{'environment.remote'} eq 'off') || ($addentries)) {
- $addentries=' onLoad="'.&Apache::lonmenu::loadevents().
- '" onUnload="'.&Apache::lonmenu::unloadevents().'"';
- $addscript=&Apache::lonmenu::registerurl();
- }
# Port for miniserver
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
# construct main body tag
my $bodytag = <<END;
-$addscript
<body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link"
$addentries>
END
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.44 loncom/interface/lonfeedback.pm:1.45
--- loncom/interface/lonfeedback.pm:1.44 Wed Jun 4 18:05:22 2003
+++ loncom/interface/lonfeedback.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.44 2003/06/04 22:05:22 www Exp $
+# $Id: lonfeedback.pm,v 1.45 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -54,7 +54,8 @@
sub mail_screen {
my ($r,$feedurl,$options) = @_;
- my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion');
+ my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion',
+ '','onLoad="window.focus();"');
$r->print(<<ENDDOCUMENT);
<html>
<head>
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.75 loncom/interface/lonmenu.pm:1.76
--- loncom/interface/lonmenu.pm:1.75 Wed Jun 4 20:01:45 2003
+++ loncom/interface/lonmenu.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.75 2003/06/05 00:01:45 www Exp $
+# $Id: lonmenu.pm,v 1.76 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -158,13 +158,6 @@
}
}
-# ===== Early call to LONCAPAreg for long-running pages, preferably used right
-# ===== before $r->rflush()
-
-sub regflush {
- return '<script type="text/javascript">'.&loadevents.'</script>';
-}
-
# ====================================== This gets called in the header section
sub registerurl {
@@ -187,30 +180,8 @@
((($ENV{'request.publicaccess'}) ||
(!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) &&
(!$forcereg))) {
- my $loadfunction='';
- my $inlineloadfunction='';
- my $unloadfunction='';
- unless (($ENV{'browser.interface'} eq 'textual') ||
- ($ENV{'environment.remote'} eq 'off') ||
- ($ENV{'request.publicaccess'})) {
- my $reopen=&Apache::lonmenu::reopenmenu();
- $loadfunction='swmenu='.$reopen.'swmenu.windowloaded(self.name);window.focus();';
- $inlineloadfunction=®flush();
- $unloadfunction='swmenu='.$reopen.'swmenu.windowunloaded(self.name);';
- }
- return $result.(<<ENDFUNCTIONS);
-<script type="text/javascript">
-function LONCAPAreg() {
- $loadfunction
-}
-
-function LONCAPAstale() {
- $unloadfunction
-}
-</script>
-$inlineloadfunction
-$force_title
-ENDFUNCTIONS
+ return $result.
+ '<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>'.$force_title;
}
# Graphical display after login only
if ($Apache::lonxml::registered && !$forcereg) { return ''; }
@@ -398,12 +369,9 @@
<script language="JavaScript">
// BEGIN LON-CAPA Internal
var swmenu=null;
-swmenu=$reopen;
-swmenu.windowloaded(self.name);
function LONCAPAreg() {
swmenu=$reopen;
- swmenu.windowloaded(self.name);
swmenu.clearTimeout(swmenu.menucltim);
$timesync
$newmail
@@ -431,7 +399,6 @@
'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+
'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',
2000);
- swmenu.windowunloaded(self.name);
}
// END LON-CAPA Internal
@@ -455,7 +422,6 @@
function LONCAPAreg() {
swmenu=$reopen
- swmenu.windowloaded(self.name);
$timesync
swmenu.currentStale=1;
swmenu.clearbut(2,1);
@@ -472,8 +438,6 @@
}
function LONCAPAstale() {
- swmenu=$reopen
- swmenu.windowunloaded(self.name);
}
// END LON-CAPA Internal
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.97 loncom/interface/lonparmset.pm:1.98
--- loncom/interface/lonparmset.pm:1.97 Wed Jun 4 14:24:33 2003
+++ loncom/interface/lonparmset.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.97 2003/06/04 18:24:33 albertel Exp $
+# $Id: lonparmset.pm,v 1.98 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,7 +58,6 @@
use Apache::Constants qw(:common :http REDIRECT);
use Apache::lonhtmlcommon();
use Apache::loncommon;
-use Apache::lonmenu;
use GDBM_File;
use Apache::lonhomework;
use Apache::lonxml;
@@ -288,12 +287,8 @@
sub startpage {
my ($r,$id,$udom,$csec,$uname)=@_;
- my $bodytag=&Apache::lonmenu::registerurl().
- &Apache::loncommon::bodytag('Set Course Parameters','',
- 'onUnload="'.
- &Apache::lonmenu::unloadevents().';pclose();" onLoad="'.
- &Apache::lonmenu::loadevents().'"').
- &Apache::lonmenu::regflush();
+ my $bodytag=&Apache::loncommon::bodytag('Set Course Parameters','',
+ 'onUnload="pclose()"');
my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '.
&Apache::loncommon::selectstudent_link('parmform','uname','udom');
my $selscript=&Apache::loncommon::studentbrowser_javascript();
Index: loncom/interface/lonremote.pm
diff -u loncom/interface/lonremote.pm:1.7 loncom/interface/lonremote.pm:1.8
--- loncom/interface/lonremote.pm:1.7 Fri May 23 17:18:56 2003
+++ loncom/interface/lonremote.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonremote.pm,v 1.7 2003/05/23 21:18:56 www Exp $
+# $Id: lonremote.pm,v 1.8 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -50,7 +50,7 @@
my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
my $setflags=&Apache::lonmenu::setflags();
my $maincall=&Apache::lonmenu::maincall();
- my $bodytag=&Apache::loncommon::bodytag('Launch Remote Control',undef,' ');
+ my $bodytag=&Apache::loncommon::bodytag('Launch Remote Control');
$r->print(<<ENDLAUNCH);
<html>
<head>
@@ -69,8 +69,7 @@
sub collapseremote {
my ($r,$lowerurl)=@_;
# -------------------------------------------------------- Menu script and info
- my $bodytag=&Apache::loncommon::bodytag('Collapse Remote Control',undef,
- ' ');
+ my $bodytag=&Apache::loncommon::bodytag('Collapse Remote Control');
my $windowinfo=&Apache::lonmenu::close();
my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'">';
$r->print(<<ENDCOLLAPSE);
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.175 loncom/interface/lonsearchcat.pm:1.176
--- loncom/interface/lonsearchcat.pm:1.175 Fri May 30 16:54:28 2003
+++ loncom/interface/lonsearchcat.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.175 2003/05/30 20:54:28 www Exp $
+# $Id: lonsearchcat.pm,v 1.176 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -82,7 +82,6 @@
use GDBM_File;
use Apache::loncommon();
use Apache::lonmysql();
-use Apache::lonmenu();
# ---------------------------------------- variables used throughout the module
@@ -2755,9 +2754,6 @@
"&persistent_db_id=".$ENV{'form.persistent_db_id'};
my $run_search_link = $basic_link."&phase=run_search";
my $results_link = &results_link();
- my $loadevents=&Apache::lonmenu::loadevents();
- my $unloadevents=&Apache::lonmenu::unloadevents();
- my $addscript=&Apache::lonmenu::registerurl();
my $result = <<"ENDFRAMES";
<html>
<head>
@@ -2765,10 +2761,9 @@
var targetwin = opener;
var queue = '';
</script>
-$addscript
<title>LON-CAPA Digital Library Search Results</title>
</head>
-<frameset rows="150,*" onLoad="$loadevents" onUnload="$unloadevents">
+<frameset rows="150,*">
<frame name="statusframe" src="$run_search_link">
<frame name="resultsframe" src="$results_link">
</frameset>
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.26 loncom/interface/printout.pl:1.27
--- loncom/interface/printout.pl:1.26 Wed Jun 4 19:38:14 2003
+++ loncom/interface/printout.pl Thu Jun 5 22:24:49 2003
@@ -2,18 +2,7 @@
use IO::File;
use Image::Magick;
print "Content-type: text/html\n\n";
-print (<<ENDSCRIPT);
- <script type="text/javascript">
-function LONCAPAreg() {
- swmenu=window.open('',"LCmenumsul1","",false);swmenu.windowloaded(self.name);
-}
-
-function LONCAPAstale() {
- swmenu=window.open('',"LCmenumsul1","",false);swmenu.windowunloaded(self.name);
-}
-</script>
-ENDSCRIPT
- print "<body bgcolor='#FFFFFF' onLoad='LONCAPAreg();' onUnload='LONCAPAstale()'>\n";
+ print "<body bgcolor=\"#FFFFFF\">\n";
my ($texfile,$laystyle,$numberofcolumns,$selectionmade) = split(/&/,$ENV{'QUERY_STRING'});
my $figfile = $texfile;
$figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/;
@@ -96,7 +85,7 @@
my $comma = "dvips -Ppdf -G0 -o $new_name_file";
system("$comma $name_file 1>/dev/null 2>/dev/null");
if (-e $new_name_file) {
- print "<h1>Successfully created PDF output file (click on link below)</h1>\n";
+ print "<h1><h1>Successfully created PDF output file (see link below)</h1>\n";
$new_name_file =~ m/^(.*)\./;
my $tempo_file = $1.'temporar.ps';
my $name_file = $1.'.pdf';
Index: loncom/publisher/lonconstruct.pm
diff -u loncom/publisher/lonconstruct.pm:1.10 loncom/publisher/lonconstruct.pm:1.11
--- loncom/publisher/lonconstruct.pm:1.10 Wed May 28 17:07:19 2003
+++ loncom/publisher/lonconstruct.pm Thu Jun 5 22:24:49 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Page Wrapper for Construction
#
-# $Id: lonconstruct.pm,v 1.10 2003/05/28 21:07:19 www Exp $
+# $Id: lonconstruct.pm,v 1.11 2003/06/06 02:24:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,8 +44,6 @@
use Apache::lonnet;
use Apache::Log ();
use HTML::Entities();
-use Apache::loncommon;
-use Apache::lonmenu;
my $DEBUG = 0;
=pod
@@ -107,17 +105,11 @@
&Debug($r, "Lower frame URL afer ~ subst: ".$lowerframe);
$lowerframe= &HTML::Entities::encode($lowerframe);
&Debug($r, "LOwer frame URL after quote subst: ".$lowerframe);
- my $loadevents=&Apache::lonmenu::loadevents();
- my $unloadevents=&Apache::lonmenu::unloadevents();
- my $script=&Apache::lonmenu::registerurl();
+
$r->print(<<ENDPAGE);
<html>
-<head><title>LON-CAPA Construction Space</title>
-$script
-</head>
-<frameset rows="110,*" border="0"
-onLoad="$loadevents"
-onUnload="$unloadevents">
+<head><title>LON-CAPA Construction Space</title></head>
+<frameset rows="110,*" border="0">
<frame src='/adm/publisher.html'>
<frame src="$lowerframe" name="LONCAPAToBePublished">
</frameset>
--www1054866289--