--- loncom/interface/lonhtmlcommon.pm 2011/10/23 00:50:58 1.285.2.3
+++ loncom/interface/lonhtmlcommon.pm 2011/01/13 17:44:30 1.286
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.285.2.3 2011/10/23 00:50:58 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.286 2011/01/13 17:44:30 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -89,6 +89,17 @@ sub entity_encode {
return &HTML::Entities::encode($text, '<>&"');
}
+sub direct_parm_link {
+ my ($linktext,$symb,$filter,$part,$target)=@_;
+ $symb=&entity_encode($symb);
+ $filter=&entity_encode($filter);
+ $part=&entity_encode($part);
+ if (($symb) && (&Apache::lonnet::allowed('opa')) && ($target ne 'tex')) {
+ return "$linktext";
+ } else {
+ return $linktext;
+ }
+}
##############################################
##############################################
@@ -1233,9 +1244,9 @@ sub htmlareaheaders {
ENDEDITOR
}
$s.=(<
-
-
+
+
+
ENDJQUERY
return $s;
}
@@ -1617,9 +1628,7 @@ returns: nothing
@html = grep {defined $_ && $_ ne ''} @html;
for (@html) {
s/align="(right|left)"//;
- if (($category ne 'advtools') && ($category ne 'tools')) {
- s///;
- }
+ s/// if $category ne 'advtools';
}
push @{$tools{$category}}, @html;