[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface loncommon.pm
raeburn
raeburn@source.lon-capa.org
Wed, 17 Nov 2010 20:41:53 -0000
raeburn Wed Nov 17 20:41:53 2010 EDT
Modified files: (Branch: version_2_10_X)
/loncom/interface loncommon.pm
Log:
- Backport 1.986.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.948.2.12 loncom/interface/loncommon.pm:1.948.2.13
--- loncom/interface/loncommon.pm:1.948.2.12 Tue Nov 9 21:18:16 2010
+++ loncom/interface/loncommon.pm Wed Nov 17 20:41:53 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.948.2.12 2010/11/09 21:18:16 raeburn Exp $
+# $Id: loncommon.pm,v 1.948.2.13 2010/11/17 20:41:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2284,12 +2284,16 @@
}
function set_auth_radio_buttons(newvalue,currentform) {
+ var numauthchoices = currentform.login.length;
+ if (typeof numauthchoices == "undefined") {
+ return;
+ }
var i=0;
- while (i < currentform.login.length) {
+ while (i < numauthchoices) {) {
if (currentform.login[i].value == newvalue) { break; }
i++;
}
- if (i == currentform.login.length) {
+ if (i == numauthchoices) {
return;
}
current.radiovalue = newvalue;