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

www lon-capa-cvs@mail.lon-capa.org
Mon, 20 Jun 2005 14:13:03 -0000


www		Mon Jun 20 10:13:03 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Try to avoid surprises by telling people what's going to happen automatically
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.230 loncom/interface/lonparmset.pm:1.231
--- loncom/interface/lonparmset.pm:1.230	Sat Jun 18 14:51:50 2005
+++ loncom/interface/lonparmset.pm	Mon Jun 20 10:13:00 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.230 2005/06/18 18:51:50 www Exp $
+# $Id: lonparmset.pm,v 1.231 2005/06/20 14:13:00 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -629,7 +629,10 @@
     } else {    
         $parm=~s|\[.*\]\s||g;
     }
-
+    my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');
+    if ($automatic) {
+	$parm.='<font color="red"><br />'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'</font>';
+    }
     $r->print('<td bgcolor='.$defbgone.'>'.$parm.'</td>');
    
     my $thismarker=$which;
@@ -1000,7 +1003,7 @@
 
 sub mapmenu {
     my ($r,$allmaps,$pschp,$maptitles)=@_;
-    $r->print(&mt('Select Enclosing Map or Folder').' ');
+    $r->print('<b>'.&mt('Select Enclosing Map or Folder').'</b> ');
     $r->print('<select name="pschp">');
     $r->print('<option value="all">'.&mt('All Maps or Folders').'</option>');
     foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) {
@@ -1013,8 +1016,8 @@
 
 sub levelmenu {
     my ($r,$alllevs,$parmlev)=@_;
-    $r->print(&mt('Select Parameter Level').
-	      &Apache::loncommon::help_open_topic('Course_Parameter_Levels').' ');
+    $r->print('<b>'.&mt('Select Parameter Level').
+	      &Apache::loncommon::help_open_topic('Course_Parameter_Levels').'</b> ');
     $r->print('<select name="parmlev">');
     foreach (reverse sort keys %{$alllevs}) {
 	$r->print('<option value="'.$$alllevs{$_}.'"');
@@ -2735,6 +2738,8 @@
 	    push @datedisplay,&mt('Automatically set earlier than ').$tempkey;
 	} 
     }
+$r->print(&mt('Manual setting rules apply to all interfaces.').'<br />'.
+	  &mt('Automatic setting rules apply to table mode interfaces only.'));
     $r->print("\n<table border='1'><tr><th>".&mt('Rule for parameter').'</th><th>'.
 	      &mt('Action').'</th><th>'.&mt('Value').'</th></tr>');
     foreach my $tempkey (&keysindisplayorder(\%allparms,\%keyorder)) {