--- loncom/interface/loncommon.pm 2013/01/21 02:33:22 1.1075.2.29 +++ loncom/interface/loncommon.pm 2012/05/19 14:03:31 1.1077 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.29 2013/01/21 02:33:22 raeburn Exp $ +# $Id: loncommon.pm,v 1.1077 2012/05/19 14:03:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -67,13 +67,9 @@ use Apache::lonhtmlcommon(); use Apache::loncoursedata(); use Apache::lontexconvert(); use Apache::lonclonecourse(); -use Apache::lonuserutils(); -use Apache::lonuserstate(); use LONCAPA qw(:DEFAULT :match); use DateTime::TimeZone; use DateTime::Locale::Catalog; -use Authen::Captcha; -use Captcha::reCAPTCHA; # ---------------------------------------------- Designs use vars qw(%defaultdesign); @@ -889,14 +885,10 @@ sub check_uncheck_jscript { function checkAll(field) { if (field.length > 0) { for (i = 0; i < field.length; i++) { - if (!field[i].disabled) { - field[i].checked = true; - } + field[i].checked = true ; } } else { - if (!field.disabled) { - field.checked = true; - } + field.checked = true } } @@ -990,7 +982,7 @@ sub select_language { my ($name,$selected,$includeempty) = @_; my %langchoices; if ($includeempty) { - %langchoices = ('' => &mt('No language preference')); + %langchoices = ('' => 'No language preference'); } foreach my $id (&languageids()) { my $code = &supportedlanguagecode($id); @@ -2483,7 +2475,7 @@ END return $result; } -sub authform_authorwarning { +sub authform_authorwarning{ my $result=''; $result=''. &mt('As a general rule, only authors or co-authors should be '. @@ -2492,16 +2484,16 @@ sub authform_authorwarning { return $result; } -sub authform_nochange { +sub authform_nochange{ my %in = ( formname => 'document.cu', 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 (!$authnum) { - $result = &mt('Under your current role you are not permitted to change login settings for this user'); + if (keys(%can_assign) == 0) { + $result = &mt('Under you current role you are not permitted to change login settings for this user'); } else { $result = '