--- loncom/interface/lonhelper.pm 2005/07/12 16:11:19 1.112
+++ loncom/interface/lonhelper.pm 2005/10/01 02:28:55 1.116
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.112 2005/07/12 16:11:19 albertel Exp $
+# $Id: lonhelper.pm,v 1.116 2005/10/01 02:28:55 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2243,6 +2243,43 @@ sub render {
}
}
}
+ function getDesiredState() { // Return desired person state radio value.
+ numRadio = document.forms.helpform.personstate.length;
+ for (i =0; i < numRadio; i++) {
+ if (document.forms.helpform.personstate[i].checked) {
+ return document.forms.helpform.personstate[i].value;
+ }
+ }
+ return "";
+ }
+
+ function checksections(value) { // Check selected sections.
+ numSections = document.forms.helpform.chosensections.length;
+ desiredState = getDesiredState();
+
+ for (var option = 0; option < numSections; option++) {
+ if(document.forms.helpform.chosensections.options[option].selected) {
+ section = document.forms.helpform.chosensections.options[option].text;
+ if (section == "none") {
+ section ="";
+ }
+ for (i = 0; i < document.forms.helpform.elements.length; i++ ) {
+ if (document.forms.helpform.elements[i].value.indexOf(':') != -1) {
+ info = document.forms.helpform.elements[i].value.split(':');
+ hisSection = info[2];
+ hisState = info[4];
+ if (desiredState == hisState ||
+ desiredState == "All") {
+ if(hisSection == section ||
+ section =="" ) {
+ document.forms.helpform.elements[i].checked = value;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
// -->
SCRIPT
@@ -2258,23 +2295,12 @@ SCRIPT
$buttons = <
- | |
|
|
- | - |
- | - |