[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 19 18:03:38 EST 2012
raeburn Wed Dec 19 23:03:38 2012 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Prevent "Invalid login mode or password" error when Domain Coordinator
modifies user information for an existing user where Domain configuration
has been set to only allow a single authentication type in this context.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1103 loncom/interface/loncommon.pm:1.1104
--- loncom/interface/loncommon.pm:1.1103 Mon Dec 17 17:45:32 2012
+++ loncom/interface/loncommon.pm Wed Dec 19 23:03:37 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1103 2012/12/17 17:45:32 raeburn Exp $
+# $Id: loncommon.pm,v 1.1104 2012/12/19 23:03:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2526,10 +2526,10 @@
kerb_def_dom => 'MSU.EDU',
@_,
);
- my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'});
+ my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'});
my $result;
- if (keys(%can_assign) == 0) {
- $result = &mt('Under you current role you are not permitted to change login settings for this user');
+ if (!$authnum) {
+ $result = &mt('Under you current role you are not permitted to change login settings for this user');
} else {
$result = '<label>'.&mt('[_1] Do not change login data',
'<input type="radio" name="login" value="nochange" '.
@@ -2599,7 +2599,7 @@
if (defined($in{'mode'})) {
if ($in{'mode'} eq 'modifycourse') {
if ($authnum == 1) {
- $authtype = '<input type="hidden" name="login" value="krb" />';
+ $authtype = '<input type="radio" name="login" value="krb" />';
}
}
}
@@ -2649,7 +2649,7 @@
return $result;
}
-sub authform_internal{
+sub authform_internal {
my %in = (
formname => 'document.cu',
kerb_def_dom => 'MSU.EDU',
@@ -2685,7 +2685,7 @@
if (defined($in{'mode'})) {
if ($in{'mode'} eq 'modifycourse') {
if ($authnum == 1) {
- $authtype = '<input type="hidden" name="login" value="int" />';
+ $authtype = '<input type="radio" name="login" value="int" />';
}
}
}
@@ -2704,7 +2704,7 @@
return $result;
}
-sub authform_local{
+sub authform_local {
my %in = (
formname => 'document.cu',
kerb_def_dom => 'MSU.EDU',
@@ -2740,7 +2740,7 @@
if (defined($in{'mode'})) {
if ($in{'mode'} eq 'modifycourse') {
if ($authnum == 1) {
- $authtype = '<input type="hidden" name="login" value="loc" />';
+ $authtype = '<input type="radio" name="login" value="loc" />';
}
}
}
@@ -2791,7 +2791,7 @@
if (defined($in{'mode'})) {
if ($in{'mode'} eq 'modifycourse') {
if ($authnum == 1) {
- $authtype = '<input type="hidden" name="login" value="fsys" />';
+ $authtype = '<input type="radio" name="login" value="fsys" />';
}
}
}
More information about the LON-CAPA-cvs
mailing list