--- loncom/xml/lonxml.pm 2002/10/03 13:34:10 1.197 +++ loncom/xml/lonxml.pm 2002/10/14 20:44:16 1.202 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.197 2002/10/03 13:34:10 sakharuk Exp $ +# $Id: lonxml.pm,v 1.202 2002/10/14 20:44:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,6 +99,8 @@ use Apache::edit(); use Apache::lonnet(); use Apache::File(); use Apache::loncommon(); +use Apache::lonfeedback(); +use Apache::lonmsg(); #================================================== Main subroutine: xmlparse #debugging control, to turn on debugging modify the correct handler @@ -232,7 +234,7 @@ sub xmlend { } if ($discussiononly) { $discussion.=(< +
@@ -243,6 +245,7 @@ course faculty
ENDDISCUSS + $discussion.=&Apache::lonfeedback::generate_preview_button(); } } } @@ -380,6 +383,10 @@ sub registerurl { $Apache::lonxml::registered=1; my $nothing=''; if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; } + my $newmail=''; + if (&Apache::lonmsg::newmail()) { + $newmail='menu.setstatus("you have","messages");'; + } my $timesync='menu.syncclock(1000*'.time.');'; if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) { my $hwkadd=''; @@ -409,6 +416,7 @@ ENDPARM menu=window.open("$nothing","LONCAPAmenu","",false); menu.clearTimeout(menu.menucltim); $timesync + $newmail menu.currentURL=window.location.pathname; menu.reloadURL=window.location.pathname; menu.currentStale=0; @@ -580,7 +588,7 @@ sub latex_special_symbols { if ($current_token=~/ \#\w/) { $current_token=~s/ \#(\w)/ \\#$1/; } else { - $current_token=~s/([^&]\#)/\\$1/g; + $current_token=~s/([^&])(\#)/$1\\$2/g; } $current_token=~s/(\$|_|{|})/\\$1/g; $current_token=~s/\\char92 /\\texttt{\\char92}/g; @@ -1317,7 +1325,7 @@ ENDNOTFOUND sub debug { if ($Apache::lonxml::debug eq 1) { $|=1; - print("DEBUG:".&HTML::Entities::encode($_[0])."
\n"); + print('DEBUG:'.&HTML::Entities::encode($_[0])."\n"); } }