--- loncom/interface/loncommon.pm 2003/10/29 15:47:52 1.138 +++ loncom/interface/loncommon.pm 2003/11/04 21:21:35 1.143 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.138 2003/10/29 15:47:52 matthew Exp $ +# $Id: loncommon.pm,v 1.143 2003/11/04 21:21:35 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,6 +69,7 @@ use Apache::Constants qw(:common :http : use Apache::lonmsg(); use Apache::lonmenu(); use Apache::lonlocal; +use HTML::Entities; my $readit; @@ -520,6 +521,7 @@ function select1_changed() { // in with the nuclear for (i=0;i'; + $prevattempts.=''.&Apache::lonnet::unescape($value).' '; } } } @@ -1782,6 +1784,7 @@ sub get_previous_attempt { } else { $value=$lasthash{$_}; } + $value=&Apache::lonnet::unescape($value); if ($_ =~/$regexp$/ && (defined &$gradesub)) {$value = &$gradesub($value)} $prevattempts.=''.$value.' '; } @@ -2671,11 +2674,14 @@ sub check_if_partid_hidden { my ($id,$symb,$udom,$uname) = @_; my $hiddenparts=&Apache::lonnet::EXT('resource.0.hiddenparts', $symb,$udom,$uname); + my $truth=1; + #if the string starts with !, then the list is the list to show not hide + if ($hiddenparts=~s/^\s*!//) { $truth=undef; } my @hiddenlist=split(/,/,$hiddenparts); foreach my $checkid (@hiddenlist) { - if ($checkid =~ /^\s*\Q$id\E\s*$/) { return 1; } + if ($checkid =~ /^\s*\Q$id\E\s*$/) { return $truth; } } - return undef; + return !$truth; } @@ -2729,7 +2735,7 @@ Inputs: =item $Max: scalar, the maximum Y value to use in the plot If $Max is < any data point, the graph will not be rendered. -=teim $colors: array ref holding the colors to be used for the data sets when +=item $colors: array ref holding the colors to be used for the data sets when they are plotted. If undefined, default values will be used. =item @Values: An array of array references. Each array reference holds data @@ -3013,6 +3019,43 @@ sub DrawXYYGraph { } ############################################################ +############################################################ + +=pod + +=head1 Statistics helper routines? + +Bad place for them but what the hell. + +=item &chartlink + +Returns a link to the chart for a specific student. + +Inputs: + +=over 4 + +=item $linktext: The text of the link + +=item $sname: The students username + +=item $sdomain: The students domain + +=back + +=cut + +############################################################ +############################################################ +sub chartlink { + my ($linktext, $sname, $sdomain) = @_; + my $link = ''.$linktext.''; +} + +############################################################ ############################################################ =pod