--- loncom/interface/Attic/lonspreadsheet.pm 2002/07/15 12:26:51 1.97 +++ loncom/interface/Attic/lonspreadsheet.pm 2002/08/28 19:50:29 1.102 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.97 2002/07/15 12:26:51 www Exp $ +# $Id: lonspreadsheet.pm,v 1.102 2002/08/28 19:50:29 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -71,7 +71,7 @@ use Apache::lonnet; use Apache::Constants qw(:common :http); use GDBM_File; use HTML::TokeParser; - +use Apache::lonhtmlcommon; # # Caches for previously calculated spreadsheets # @@ -146,7 +146,7 @@ undef %v; undef %t; undef %f; undef %c; -undef %rl; +undef %rowlabel; undef @os; $maxrow=0; @@ -768,6 +768,14 @@ sub expandnamed { } if ($#matches == 0) { $returnvalue = '$c{\''.$matches[0].'\'}'; + } elsif ($#matches > 0) { + # more than one match. Look for a concise one + $returnvalue = "'non-unique parameter name : $expression'"; + foreach (@matches) { + if (/^$expression$/) { + $returnvalue = '$c{\''.$_.'\'}'; + } + } } else { $returnvalue = "'bad parameter name : $expression'"; } @@ -896,8 +904,8 @@ sub outrowassess { my @cols=(); if ($n) { my ($usy,$ufn)=split(/\_\_\&\&\&\_\_/,$f{'A'.$n}); - if ($rl{$usy}) { - $cols[0]=$rl{$usy}.'
'. + if ($rowlabel{$usy}) { + $cols[0]=$rowlabel{$usy}.'
'. '