--- loncom/interface/loncommon.pm 2009/03/08 21:49:33 1.764 +++ loncom/interface/loncommon.pm 2009/03/18 13:46:14 1.772 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.764 2009/03/08 21:49:33 weissno Exp $ +# $Id: loncommon.pm,v 1.772 2009/03/18 13:46:14 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2126,14 +2126,14 @@ sub authform_kerberos { $autharg,$jscall); my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); if ($in{'kerb_def_auth'} eq 'krb5') { - $check5 = ' checked="on"'; + $check5 = ' checked="checked"'; } else { - $check4 = ' checked="on"'; + $check4 = ' checked="checked"'; } $krbarg = $in{'kerb_def_dom'}; if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'krb') { - $krbcheck = ' checked="on"'; + $krbcheck = ' checked="checked"'; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $krbcheck = ''; @@ -2141,10 +2141,10 @@ sub authform_kerberos { } if (defined($in{'curr_kerb_ver'})) { if ($in{'curr_krb_ver'} eq '5') { - $check5 = ' checked="on"'; + $check5 = ' checked="checked"'; $check4 = ''; } else { - $check4 = ' checked="on"'; + $check4 = ' checked="checked"'; $check5 = ''; } } @@ -2235,7 +2235,7 @@ sub authform_internal{ if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'int') { if ($can_assign{'int'}) { - $intcheck = 'checked="on" '; + $intcheck = 'checked="checked" '; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $intcheck = ''; @@ -2290,7 +2290,7 @@ sub authform_local{ if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'loc') { if ($can_assign{'loc'}) { - $loccheck = 'checked="on" '; + $loccheck = 'checked="checked" '; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $loccheck = ''; @@ -2344,7 +2344,7 @@ sub authform_filesystem{ if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'fsys') { if ($can_assign{'fsys'}) { - $fsyscheck = 'checked="on" '; + $fsyscheck = 'checked="checked" '; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $fsyscheck = ''; @@ -4556,8 +4556,17 @@ form, .inline { display: inline; } } .LC_icon { - border: 0px; + border: none; +} + +.LC_fileicon { + border: none; + height: 1.3em; + vertical-align: text-bottom; + margin-right: 0.3em; + text-decoration:none; } + .LC_indexer_icon { border: 0px; height: 22px; @@ -4565,7 +4574,7 @@ form, .inline { display: inline; } .LC_docs_spacer { width: 25px; height: 1px; - border: 0px; + border: none; } .LC_internal_info { @@ -5276,6 +5285,7 @@ table.LC_prior_match tr td { border: 1px solid #000000; } +td.LC_nobreak, span.LC_nobreak { white-space: nowrap; } @@ -5909,24 +5919,26 @@ table em{ font-weight: bold; font-style: normal; } - -table#LC_tableOfContent{ - border-collapse: collapse; - border-spacing: 0; +table.LC_tableBrowseRes, +table.LC_tableOfContent{ + border:none; + border-spacing: 1; padding: 3px; - border: 0; background-color: #FFFFFF; font-size: 90%; } -table#LC_tableOfContent a { +table.LC_tableBrowseRes a, +table.LC_tableOfContent a { + background-color: transparent; text-decoration: none; } -table#LC_tableOfContent tr.LC_trOdd{ +table.LC_tableBrowseRes tr.LC_trOdd, +table.LC_tableOfContent tr.LC_trOdd{ background-color: #EEEEEE; } -table#LC_tableOfContent img{ +table.LC_tableOfContent img{ border: none; height: 1.3em; vertical-align: text-bottom; @@ -5981,12 +5993,13 @@ ul#LC_toolbar li{ border:1px solid white; padding:0; margin: 0; - display:inline-block; + float: left; + display:inline; vertical-align:middle; } a.LC_toolbarItem{ - display:inline-block; + display:block; padding:0; margin:0; height: 32px; @@ -7044,7 +7057,7 @@ sub default_quota { ['quotas'],$udom); if (ref($quotahash{'quotas'}) eq 'HASH') { if ($inststatus ne '') { - my @statuses = split(/:/,$inststatus); + my @statuses = map { &unescape($_); } split(/:/,$inststatus); foreach my $item (@statuses) { if (ref($quotahash{'quotas'}{'defaultquota'}) eq 'HASH') { if ($quotahash{'quotas'}{'defaultquota'}{$item} ne '') { @@ -7510,6 +7523,7 @@ sub personal_data_fieldtitles { middlename => 'Middle Name', generation => 'Generation', gen => 'Generation', + inststatus => 'Affiliation', ); return %fieldtitles; } @@ -8875,9 +8889,10 @@ sub restore_settings { =item * &build_recipient_list() -Build recipient lists for three types of e-mail: -(a) Error Reports, (b) Package Updates, (c) Help requests, generated by -lonerrorhandler.pm, CHECKRPMS and lonsupportreq.pm respectively. +Build recipient lists for four types of e-mail: +(a) Error Reports, (b) Package Updates, (c) lonstatus warnings/errors +(d) Help requests, generated by +lonerrorhandler.pm, CHECKRPMS, loncron, and lonsupportreq.pm respectively. Inputs: defmail (scalar - email address of default recipient), @@ -8901,17 +8916,21 @@ sub build_recipient_list { my %domconfig = &Apache::lonnet::get_dom('configuration',['contacts'],$defdom); if (ref($domconfig{'contacts'}) eq 'HASH') { - if (ref($domconfig{'contacts'}{$mailing}) eq 'HASH') { - my @contacts = ('adminemail','supportemail'); - foreach my $item (@contacts) { - if ($domconfig{'contacts'}{$mailing}{$item}) { - my $addr = $domconfig{'contacts'}{$item}; - if (!grep(/^\Q$addr\E$/,@recipients)) { - push(@recipients,$addr); + if (exists($domconfig{'contacts'}{$mailing})) { + if (ref($domconfig{'contacts'}{$mailing}) eq 'HASH') { + my @contacts = ('adminemail','supportemail'); + foreach my $item (@contacts) { + if ($domconfig{'contacts'}{$mailing}{$item}) { + my $addr = $domconfig{'contacts'}{$item}; + if (!grep(/^\Q$addr\E$/,@recipients)) { + push(@recipients,$addr); + } } + $otheremails = $domconfig{'contacts'}{$mailing}{'others'}; } - $otheremails = $domconfig{'contacts'}{$mailing}{'others'}; } + } elsif ($origmail ne '') { + push(@recipients,$origmail); } } elsif ($origmail ne '') { push(@recipients,$origmail); @@ -9182,7 +9201,7 @@ sub assign_categories_table { my $checked = ''; if (@currcategories > 0) { if (grep(/^\Q$item\E$/,@currcategories)) { - $checked = ' checked="checked" '; + $checked = ' checked="checked"'; } } $output .= ''. @@ -9248,7 +9267,7 @@ sub assign_category_rows { if (ref($currcategories) eq 'ARRAY') { if (@{$currcategories} > 0) { if (grep(/^\Q$item\E$/,@{$currcategories})) { - $checked = ' checked="checked" '; + $checked = ' checked="checked"'; } } } @@ -10020,6 +10039,12 @@ sub init_user_environment { &Apache::lonnet::usertools_access($username,$domain,$tool,'reload'); } + foreach my $crstype ('official','unofficial') { + $userenv{'canrequest.'.$crstype} = + &Apache::lonnet::usertools_access($username,$domain,$crstype, + 'reload','requestcourses'); + } + $env{'user.environment'} = "$lonids/$cookie.id"; if (tie(my %disk_env,'GDBM_File',"$lonids/$cookie.id",