--- loncom/interface/loncommon.pm 2007/09/27 15:36:23 1.590 +++ loncom/interface/loncommon.pm 2007/10/09 17:33:57 1.591 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.590 2007/09/27 15:36:23 raeburn Exp $ +# $Id: loncommon.pm,v 1.591 2007/10/09 17:33:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1798,19 +1798,16 @@ END } my $radioval = "'nochange'"; - if (exists($in{'curr_authtype'}) && - defined($in{'curr_authtype'}) && - $in{'curr_authtype'} ne '') { - $radioval = "'$in{'curr_authtype'}arg'"; + if (defined($in{'curr_authtype'})) { + if ($in{'curr_authtype'} ne '') { + $radioval = "'".$in{'curr_authtype'}."arg'"; + } } my $argfield = 'null'; - if ( grep/^mode$/,(keys %in) ) { + if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { - if ( grep/^curr_authtype$/,(keys %in) ) { - $radioval = "'$in{'curr_authtype'}'"; - } - if ( grep/^curr_autharg$/,(keys %in) ) { - unless ($in{'curr_autharg'} eq '') { + if (defined($in{'curr_autharg'})) { + if ($in{'curr_autharg'} ne '') { $argfield = "'$in{'curr_autharg'}'"; } } @@ -1907,7 +1904,7 @@ sub authform_nochange{ return $result; } -sub authform_kerberos{ +sub authform_kerberos { my %in = ( formname => 'document.cu', kerb_def_dom => 'MSU.EDU', @@ -1923,22 +1920,23 @@ sub authform_kerberos{ $check4 = ' checked="on"'; } $krbarg = $in{'kerb_def_dom'}; - if (grep(/^curr_authtype$/,(keys(%in)))) { - if ($in{'curr_authtype'} =~ m/^krb(\d+)$/) { - $krbver = $1; + if (defined($in{'curr_authtype'})) { + if ($in{'curr_authtype'} eq 'krb') { $krbcheck = ' checked="on"'; - if ($krbver eq '5') { - $check5 = ' checked="on"'; - $check4 = ''; - } else { - $check4 = ' checked="on"'; - $check5 = ''; + if (defined($in{'curr_kerb_ver'})) { + if ($in{'curr_krb_ver'} eq '5') { + $check5 = ' checked="on"'; + $check4 = ''; + } else { + $check4 = ' checked="on"'; + $check5 = ''; + } } - if (grep(/^curr_autharg$/,(keys(%in)))) { + if (defined($in{'curr_autharg'})) { $krbarg = $in{'curr_autharg'}; } if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { - if (grep(/^curr_autharg$/,(keys(%in)))) { + if (defined($in{'curr_autharg'})) { $result = &mt('Currently Kerberos authenticated with domain [_1] Version [_2].', $in{'curr_autharg'},$krbver); @@ -1957,7 +1955,7 @@ sub authform_kerberos{ if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { return; } elsif ($authtype eq '') { - if (grep(/^mode$/,(keys(%in)))) { + if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { $authtype = ''; @@ -2018,11 +2016,11 @@ sub authform_internal{ ); my ($intcheck,$intarg,$result,$authtype,$autharg,$jscall); my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); - if (grep(/^curr_authtype$/,(keys(%in)))) { - if ($in{'curr_authtype'} eq 'internal:') { + if (defined($in{'curr_authtype'})) { + if ($in{'curr_authtype'} eq 'int') { if ($can_assign{'int'}) { $intcheck = 'checked="on" '; - if (grep(/^curr_autharg$/,(keys(%in)))) { + if (defined($in{'curr_autharg'})) { $intarg = $in{'curr_autharg'}; } } else { @@ -2038,7 +2036,7 @@ sub authform_internal{ if (!$can_assign{'int'}) { return; } elsif ($authtype eq '') { - if (grep(/^mode$/,(keys(%in)))) { + if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { $authtype = ''; @@ -2067,11 +2065,11 @@ sub authform_local{ ); my ($loccheck,$locarg,$result,$authtype,$autharg,$jscall); my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); - if (grep(/^curr_authtype$/,(keys(%in)))) { - if ($in{'curr_authtype'} eq 'localauth:') { + if (defined($in{'curr_authtype'})) { + if ($in{'curr_authtype'} eq 'loc') { if ($can_assign{'loc'}) { $loccheck = 'checked="on" '; - if (grep(/^curr_autharg$/,(keys(%in)))) { + if (defined($in{'curr_autharg'})) { $locarg = $in{'curr_autharg'}; } } else { @@ -2087,7 +2085,7 @@ sub authform_local{ if (!$can_assign{'loc'}) { return; } elsif ($authtype eq '') { - if (grep(/^mode$/,(keys(%in)))) { + if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { $authtype = ''; @@ -2116,8 +2114,8 @@ sub authform_filesystem{ ); my ($fsyscheck,$result,$authtype,$autharg,$jscall); my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); - if (grep(/^curr_authtype$/,(keys(%in)))) { - if ($in{'curr_authtype'} eq 'unix:') { + if (defined($in{'curr_authtype'})) { + if ($in{'curr_authtype'} eq 'fsys') { if ($can_assign{'fsys'}) { $fsyscheck = 'checked="on" '; } else { @@ -2133,7 +2131,7 @@ sub authform_filesystem{ if (!$can_assign{'fsys'}) { return; } elsif ($authtype eq '') { - if (grep(/^mode$/,(keys(%in)))) { + if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { $authtype = ''; @@ -4981,6 +4979,21 @@ table.LC_double_column tr td.LC_right_co vertical-align: top; } +div.LC_left_float { + float: left; + padding-right: 5%; + padding:bottom: 4px; +} + +div.LC_clear_float_header { + padding:bottom: 2px; +} + +div.LC_clear_float_footer { + padding:top: 10px; + clear: both; +} + END }