[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 04 Jul 2008 18:30:30 -0000
raeburn Fri Jul 4 14:30:30 2008 EDT
Modified files:
/loncom/interface loncreateuser.pm
Log:
- Form element value set to "any" where there are no defined institutional user types.
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.246 loncom/interface/loncreateuser.pm:1.247
--- loncom/interface/loncreateuser.pm:1.246 Wed Jul 2 12:08:21 2008
+++ loncom/interface/loncreateuser.pm Fri Jul 4 14:30:30 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.246 2008/07/02 16:08:21 bisitz Exp $
+# $Id: loncreateuser.pm,v 1.247 2008/07/04 18:30:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3360,7 +3360,11 @@
my $numinrow = 4;
my $count = 0;
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($currdom);
+ my $othervalue = 'any';
if ((ref($types) eq 'ARRAY') && (ref($usertypes) eq 'HASH')) {
+ if (@{$types} > 0) {
+ $othervalue = 'other';
+ }
$output .= '<table><tr>';
foreach my $type (@{$types}) {
if (($count > 0) && ($count%$numinrow == 0)) {
@@ -3383,7 +3387,7 @@
if (($count > 0) && ($count%$numinrow == 0)) {
$output .= '</tr><tr>';
}
- $output .= '<td><span class="LC_nobreak"><label><input type = "checkbox" value="other" ';
+ $output .= '<td><span class="LC_nobreak"><label><input type = "checkbox" value="'.$othervalue.'" ';
if (ref($currinsttypes) eq 'ARRAY') {
if (@{$currinsttypes} > 0) {
if (grep(/^other$/,@{$currinsttypes})) {