--- loncom/interface/Attic/lonspreadsheet.pm 2002/07/30 21:23:44 1.98 +++ loncom/interface/Attic/lonspreadsheet.pm 2002/08/16 18:25:24 1.100 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.98 2002/07/30 21:23:44 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.100 2002/08/16 18:25:24 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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'"; } @@ -1746,7 +1754,7 @@ sub updatestudentassesssheet { unless ($updatedata{$ENV{'request.course.fn'}.'_'.$stype}) { # -------------------------------------------------------------------- Tie hash if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db', - &GDBM_READER,0640)) { + &GDBM_READER(),0640)) { # --------------------------------------------------------- Get all assessments my %allkeys=('timestamp' => @@ -2122,7 +2130,7 @@ sub loadassessment { my %c=(); if (tie(%parmhash,'GDBM_File', - &getcfn($safeeval).'_parms.db',&GDBM_READER,0640)) { + &getcfn($safeeval).'_parms.db',&GDBM_READER(),0640)) { my %f=&getformulas($safeeval); foreach (keys(%f)) { if ($_=~/^A/) {