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

raeburn raeburn at source.lon-capa.org
Fri Oct 14 19:26:21 EDT 2016


raeburn		Fri Oct 14 23:26:21 2016 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  - Some custom roles may receive only one usernamelink radio button.
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.176 loncom/interface/lonuserutils.pm:1.177
--- loncom/interface/lonuserutils.pm:1.176	Mon Oct 10 03:02:47 2016
+++ loncom/interface/lonuserutils.pm	Fri Oct 14 23:26:21 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.176 2016/10/10 03:02:47 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.177 2016/10/14 23:26:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2563,9 +2563,13 @@
 
 function username_display_launch(username,domain) {
     var target;
-    for (var i=0; i<document.$formname.usernamelink.length; i++) {
-        if (document.$formname.usernamelink[i].checked) {
-            target = document.$formname.usernamelink[i].value;
+    if (!document.$formname.usernamelink.length) {
+        target = document.$formname.usernamelink.value;
+    } else {
+        for (var i=0; i<document.$formname.usernamelink.length; i++) {
+            if (document.$formname.usernamelink[i].checked) {
+               target = document.$formname.usernamelink[i].value;
+            }
         }
     }
     if (target == 'modify') {




More information about the LON-CAPA-cvs mailing list