--- loncom/interface/Attic/lonspreadsheet.pm 2002/07/30 21:23:44 1.98 +++ loncom/interface/Attic/lonspreadsheet.pm 2002/08/21 17:18:08 1.101 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.98 2002/07/30 21:23:44 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.101 2002/08/21 17:18:08 www 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/) { @@ -2521,9 +2529,7 @@ $tmpdir=$r->dir_config('lonDaemons').'/t ENDSCRIPT - $r->print(''. - ''. - '

LON-CAPA Spreadsheet

'. + $r->print(''.&Apache::loncommon::bodytag('Grades Spreadsheet'). '
'. &hiddenfield('uname',$ENV{'form.uname'}). &hiddenfield('udom',$ENV{'form.udom'}). @@ -2587,12 +2593,6 @@ ENDSCRIPT } } -# ---------------------------------------------------------------- Course title - - $r->print('

'. - $ENV{'course.'.$ENV{'request.course.id'}.'.description'}. - '

'.localtime().'

'); - # ---------------------------------------------------- See if user can see this if ((&gettype($asheet) eq 'classcalc') ||