--- loncom/interface/lonhtmlcommon.pm 2010/01/19 19:00:02 1.261 +++ loncom/interface/lonhtmlcommon.pm 2010/03/15 05:37:47 1.269 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.261 2010/01/19 19:00:02 droeschl Exp $ +# $Id: lonhtmlcommon.pm,v 1.269 2010/03/15 05:37:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,7 +66,7 @@ use LONCAPA; sub coursepreflink { my ($text,$category)=@_; if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) { - return ''.$text.''; + return '&"').'">'.$text.''; } else { return ''; } @@ -74,7 +74,7 @@ sub coursepreflink { sub raw_href_to_link { my ($message)=@_; - $message=~s/(https?\:\/\/[^\s\'\"]+)(\s|$)/$1<\/tt><\/a>$2/gi; + $message=~s/(https?\:\/\/[^\s\'\"\<]+)([\s\<]|$)/$1<\/tt><\/a>$2/gi; return $message; } @@ -90,7 +90,7 @@ Successful completion of an operation me sub confirm_success { my ($message,$failure)=@_; if ($failure) { - return ''."\n" + return ''."\n" .''.&mt('Error').' '."\n" .$message."\n" .''."\n"; @@ -1061,7 +1061,7 @@ sub Increment_PrgWin { # my $str; if ($min == 0 && $sec > 1) { - $str = '[_2] seconds'; + $str = '[_1] seconds'; } elsif ($min == 1 && $sec > 1) { $str = '1 minute [_2] seconds'; } elsif ($min == 1 && $sec < 2) { @@ -1240,7 +1240,6 @@ sub htmlareaheaders { my $s=""; if (&htmlareabrowser()) { $s.=(< ENDEDITOR } @@ -1284,8 +1283,7 @@ sub htmlarea_lang { sub htmlareaselectactive { my @fields=@_; unless (&htmlareabrowser()) { return ''; } - #if (&htmlareablocked()) { return '
'.&enablelink(@fields); } - my $output='
'. - &disablelink(@fields); + .'
'; return $output; } @@ -1466,8 +1438,9 @@ returns: nothing if ($menulink) { my $description = 'Menu'; my $no_mt_descr = 0; - if (exists($env{'request.course.id'}) && - $env{'request.course.id'} ne '') { + if ((exists($env{'request.course.id'})) && + ($env{'request.course.id'} ne '') && + ($env{'course.'.$env{'request.course.id'}.'.description'} ne '')) { $description = $env{'course.'.$env{'request.course.id'}.'.description'}; $no_mt_descr = 1;