[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 12 Dec 2003 15:13:51 -0000


www		Fri Dec 12 10:13:51 2003 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Bug #2469: Sorry, make this 1.1 
  - there was also no feedback on "No parameters" available.
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.144 loncom/interface/lonparmset.pm:1.145
--- loncom/interface/lonparmset.pm:1.144	Fri Dec 12 10:03:26 2003
+++ loncom/interface/lonparmset.pm	Fri Dec 12 10:13:50 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.144 2003/12/12 15:03:26 www Exp $
+# $Id: lonparmset.pm,v 1.145 2003/12/12 15:13:50 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1790,6 +1790,7 @@
     my $oldpart='';
     my $pointer=0;
     $tableopen=0;
+    my $foundkeys=0;
     foreach my $thiskey (sort keys %resourcedata) {
 	if ($resourcedata{$thiskey.'.type'}) {
 	    my ($course,$middle,$part,$name)=
@@ -1827,6 +1828,7 @@
 	    $r->print(&tablestart().'<tr><td><b>'.$name.
 		      ':</b></td><td><input type="checkbox" name="del_'.
 		      $thiskey.'" /></td><td>');
+	    $foundkeys++;
 	    if ($resourcedata{$thiskey.'.type'}=~/^date/) {
 		my $jskey='key_'.$pointer;
 		$pointer++;
@@ -1845,8 +1847,8 @@
 	}
     }
     
-    $r->print(&tableend().
-	      '<p><input type="submit" value="'.&mt('Modify Parameters').'" /></p></form></body></html>');
+    $r->print(&tableend().'<p>'.
+	($foundkeys?'<input type="submit" value="'.&mt('Modify Parameters').'" />':&mt('There are no course or section parameters.')).'</p></form></body></html>');
 }
 
 ##################################################