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

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 02 Jun 2004 14:55:51 -0000


sakharuk		Wed Jun  2 10:55:51 2004 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm 
  Log:
  Bug 2855 (Priniting for expired students) is fixed. But I am ready to return to this bug if your reaction would be negative (I mean Guy Albertelli). I changed option "Select for Section/Group" on "Select Current Students for Sectopn/Group" and added option "Unselect Expired Students". The last is excessive to my opinion but some users wanted to have this option as well.
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.81 loncom/interface/lonhelper.pm:1.82
--- loncom/interface/lonhelper.pm:1.81	Tue Apr 27 14:37:43 2004
+++ loncom/interface/lonhelper.pm	Wed Jun  2 10:55:50 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.81 2004/04/27 18:37:43 sakharuk Exp $
+# $Id: lonhelper.pm,v 1.82 2004/06/02 14:55:50 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2090,7 +2090,9 @@
 	for (i=0; i<document.forms.helpform.elements.length; i++) {
 	    comp = document.forms.helpform.elements.chksec.value;
             if (document.forms.helpform.elements[i].value.indexOf(':'+comp+':') != -1) {
-                document.forms.helpform.elements[i].checked=value;
+		if (document.forms.helpform.elements[i].value.indexOf(':Active') != -1) {
+		    document.forms.helpform.elements[i].checked=value;
+		}
             }
         }
     }
@@ -2098,7 +2100,14 @@
 	for (i=0; i<document.forms.helpform.elements.length; i++) {
             if (document.forms.helpform.elements[i].value.indexOf(':Active') != -1) {
                 document.forms.helpform.elements[i].checked=true;
-            }
+            } 
+        }
+    }
+    function uncheckexpired() {
+	for (i=0; i<document.forms.helpform.elements.length; i++) {
+            if (document.forms.helpform.elements[i].value.indexOf(':Expired') != -1) {
+                document.forms.helpform.elements[i].checked=false;
+            } 
         }
     }
 </script>
@@ -2106,16 +2115,18 @@
 
         my %lt=&Apache::lonlocal::texthash(
                     'ocs'  => "Select Only Current Students",
+                    'ues'  => "Unselect Expired Students",
                     'sas'  => "Select All Students",
                     'uas'  => "Unselect All Students",
-                    'sfsg' => "Select for Section/Group",
+                    'sfsg' => "Select Current Students for Section/Group",
 		    'ufsg' => "Unselect for Section/Group");
  
         $buttons = <<BUTTONS;
 <br />
 <input type="button" onclick="checkactive()" value="$lt{'ocs'}" />
+<input type="button" onclick="uncheckexpired()" value="$lt{'ues'}" /><br />
 <input type="button" onclick="checkall(true, '$var')" value="$lt{'sas'}" />
-<input type="button" onclick="checkall(false, '$var')" value="$lt{'uas'}" />
+<input type="button" onclick="checkall(false, '$var')" value="$lt{'uas'}" /><br />
 <input type="button" onclick="checksec(true)" value="$lt{'sfsg'}">
 <input type="text" size="5" name="chksec">&nbsp;
 <input type="button" onclick="checksec(false)" value="$lt{'ufsg'}">