[LON-CAPA-cvs] cvs: rat / lonuserstate.pm loncom/html/res/adm/pages menu.html loncom/interface londocs.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 06 Sep 2002 15:18:23 -0000
www Fri Sep 6 11:18:23 2002 EDT
Modified files:
/loncom/html/res/adm/pages menu.html
/loncom/interface londocs.pm
/rat lonuserstate.pm
Log:
"showdoc" needs to be URL-encode like all the other functionality in order to
properly register with the remote. Remote has now additional fields to store symb, but
nothing is done with them yet. Eventually, this should improve navigation and contents
display for resources showing up multiple times.
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.67 loncom/html/res/adm/pages/menu.html:1.68
--- loncom/html/res/adm/pages/menu.html:1.67 Mon Sep 2 15:58:51 2002
+++ loncom/html/res/adm/pages/menu.html Fri Sep 6 11:18:23 2002
@@ -4,7 +4,7 @@
Remote Control
//
-// $Id: menu.html,v 1.67 2002/09/02 19:58:51 bowersj2 Exp $
+// $Id: menu.html,v 1.68 2002/09/06 15:18:23 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -50,6 +50,8 @@
var fontpath='/adm/lonLCDfont/';
var currentURL='';
var reloadURL='';
+var currentSymb='';
+var reloadSymb='';
var currentStale=1;
var menucltim;
@@ -269,6 +271,7 @@
this.document['led'].src="ledsend.gif";
if (url!='' && url!= null) {
currentURL = null;
+ currentSymb= null;
clientwindow.window.location.href="http://"+clienthost+url;
}
}
@@ -281,6 +284,7 @@
this.document.server.postdata.value=postdata;
this.document.server.command.value='';
this.document.server.url.value='';
+ this.document.server.symb.value='';
this.document.server.submit();
}
}
@@ -293,6 +297,7 @@
this.document.server.postdata.value='';
this.document.server.command.value=cmd;
this.document.server.url.value=currentURL;
+ this.document.server.symb.value=currentSymb;
this.document.server.submit();
}
}
@@ -474,6 +479,7 @@
<input type="hidden" name="postdata" value="none" />
<input type="hidden" name="command" value="none" />
<input type="hidden" name="url" value="none" />
+<input type="hidden" name="symb" value="none" />
</form>
<script>
activate();
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.20 loncom/interface/londocs.pm:1.21
--- loncom/interface/londocs.pm:1.20 Thu Sep 5 15:37:00 2002
+++ loncom/interface/londocs.pm Fri Sep 6 11:18:23 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.20 2002/09/05 19:37:00 www Exp $
+# $Id: londocs.pm,v 1.21 2002/09/06 15:18:23 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -234,8 +234,11 @@
my $events='';
my $showdoc=0;
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['folder','foldername','showdoc']);
- unless ($ENV{'form.showdoc'}) { # got called from remote
+ ['folder','foldername']);
+ if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {
+ $showdoc=$1;
+ }
+ unless ($showdoc) { # got called from remote
$forcestandard=($ENV{'form.folder'}=~/^default_/);
$forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);
@@ -247,8 +250,7 @@
}
} else { # got called in sequence from course
$allowed=0;
- $showdoc=1;
- $script=&Apache::lonxml::registerurl(1,undef);
+ $script='</script>'.&Apache::lonxml::registerurl(1,undef).'<script>';
$events='onLoad="'.&Apache::lonxml::loadevents.
'" onUnload="'.&Apache::lonxml::unloadevents.'"';
}
@@ -466,7 +468,7 @@
} else {
# -------------------------------------------------------- This is showdoc mode
$r->print("<h1>Uploaded Document</h1><p>It is recommended that you use an up-to-date virus scanner before handling this file.</p><p><table>".
- &entryline(0,"Click to download or use your browser's Save Link function",$ENV{'form.showdoc'}).'</table></p>');
+ &entryline(0,"Click to download or use your browser's Save Link function",$showdoc).'</table></p>');
}
$r->print('</body></html>');
return OK;
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.41 rat/lonuserstate.pm:1.42
--- rat/lonuserstate.pm:1.41 Wed Sep 4 15:37:32 2002
+++ rat/lonuserstate.pm Fri Sep 6 11:18:23 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construct and maintain state and binary representation of course for user
#
-# $Id: lonuserstate.pm,v 1.41 2002/09/04 19:37:32 www Exp $
+# $Id: lonuserstate.pm,v 1.42 2002/09/06 15:18:23 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -125,7 +125,7 @@
|| ($embstyle eq 'ssi')) {
$turi='/adm/wrapper'.$turi;
} elsif ($turi!~/\.(sequence|page)$/) {
- $turi='/adm/coursedocs?showdoc='.$turi;
+ $turi='/adm/coursedocs/showdoc'.$turi;
}
} else { # normal internal resource
if (($embstyle eq 'img') || ($embstyle eq 'emb')