--- loncom/interface/Attic/lonspreadsheet.pm	2002/08/12 18:21:42	1.99
+++ loncom/interface/Attic/lonspreadsheet.pm	2002/08/21 17:18:08	1.101
@@ -1,5 +1,5 @@
 #
-# $Id: lonspreadsheet.pm,v 1.99 2002/08/12 18:21:42 albertel 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'";
         }
@@ -2521,9 +2529,7 @@ $tmpdir=$r->dir_config('lonDaemons').'/t
 
 </script>
 ENDSCRIPT
-    $r->print('</head><body bgcolor="#FFFFFF">'.
-       '<img align=right src=/adm/lonIcons/lonlogos.gif>'.
-       '<h1>LON-CAPA Spreadsheet</h1>'.
+   $r->print('</head>'.&Apache::loncommon::bodytag('Grades Spreadsheet').
        '<form action="'.$r->uri.'" name=sheet method=post>'.
        &hiddenfield('uname',$ENV{'form.uname'}).
        &hiddenfield('udom',$ENV{'form.udom'}).
@@ -2587,12 +2593,6 @@ ENDSCRIPT
         }
     }
 
-# ---------------------------------------------------------------- Course title
-
-    $r->print('<h1>'.
-            $ENV{'course.'.$ENV{'request.course.id'}.'.description'}.
-             '</h1><h3>'.localtime().'</h3>');
-
 # ---------------------------------------------------- See if user can see this
 
     if ((&gettype($asheet) eq 'classcalc') ||