--- loncom/xml/lonxml.pm 2002/12/03 22:04:43 1.216
+++ loncom/xml/lonxml.pm 2002/12/13 21:39:19 1.221
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.216 2002/12/03 22:04:43 sakharuk Exp $
+# $Id: lonxml.pm,v 1.221 2002/12/13 21:39:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,6 +101,7 @@ use Apache::File();
use Apache::loncommon();
use Apache::lonfeedback();
use Apache::lonmsg();
+use Apache::loncacc();
#================================================== Main subroutine: xmlparse
#debugging control, to turn on debugging modify the correct handler
@@ -351,7 +352,7 @@ sub printtokenheader {
if ($target eq 'web') {
my %idhash=&Apache::lonnet::idrget($tudom,($tuname));
return
- ''.
+ ''.
'Checked out for '.$plainname.
'
User: '.$tuname.' at '.$tudom.
'
ID: '.$idhash{$tuname}.
@@ -373,6 +374,18 @@ sub fontsettings() {
return $headerstring;
}
+
+##
+## switchmenu - modeled on lonmenu::switchmenu, but better.
+## Helper function for registerurl
+##
+sub switchmenu {
+ my ($row,$col,$imgsrc,$texttop,$textbot,$action,$description)=@_;
+ return(<
@@ -456,6 +525,7 @@ ENDPARM
menu.switchbutton
(9,3,'anot.gif','anno-','tations','annotate()','Make notes and annotations about this resource');
$hwkadd
+ $editbutton
}
function LONCAPAstale() {
@@ -470,7 +540,7 @@ ENDPARM
menu.clearbut(7,3);
menu.menucltim=menu.setTimeout(
'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(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',
2000);
}
@@ -743,13 +813,13 @@ sub callsub {
}
if (!$deleted) {
if ($space) {
- &Apache::lonxml::debug("Calling sub $sub in $space $metamode");
+ #&Apache::lonxml::debug("Calling sub $sub in $space $metamode");
$sub1="$space\:\:$sub";
($currentstring,$nodefault) = &$sub1($target,$token,$tagstack,
$parstack,$parser,$safeeval,
$style);
} else {
- &Apache::lonxml::debug("NOT Calling sub $sub in $space $metamode");
+ #&Apache::lonxml::debug("NOT Calling sub $sub in $space $metamode");
if ($metamode <1) {
if (defined($token->[4]) && ($metamode < 1)) {
$currentstring = $token->[4];
@@ -761,7 +831,7 @@ sub callsub {
# &Apache::lonxml::debug("nodefalt:$nodefault:");
if ($currentstring eq '' && $nodefault eq '') {
if ($target eq 'edit') {
- &Apache::lonxml::debug("doing default edit for $token->[1]");
+ #&Apache::lonxml::debug("doing default edit for $token->[1]");
if ($token->[0] eq 'S') {
$currentstring = &Apache::edit::tag_start($target,$token);
} elsif ($token->[0] eq 'E') {