--- loncom/interface/loncommon.pm 2009/08/15 00:25:43 1.885 +++ loncom/interface/loncommon.pm 2009/10/20 08:54:13 1.899 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.885 2009/08/15 00:25:43 raeburn Exp $ +# $Id: loncommon.pm,v 1.899 2009/10/20 08:54:13 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -483,7 +483,7 @@ ENDAUTHORBRW sub coursebrowser_javascript { my ($domainfilter,$sec_element,$formname)=@_; - my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Community - for which you wish to add/modify a user role'); + my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Community - for which you wish to add/modify a user role.'); my $id_functions = &javascript_index_functions(); my $output = ' END_MYBLOCK + + $output = Apache::lonhtmlcommon::scripttag($output); + my $popupUrl = "/adm/blockingstatus/$querystring"; + my $text = mt('Communication Blocked'); + $output .= <<"END_BLOCK";
- Communication Blocked + title='$text'> + $text Communication Blocked + title='$text'>$text
END_BLOCK @@ -4035,7 +4047,7 @@ sub determinedomain { my $domain=shift; if (! $domain) { # Determine domain if we have not been given one - $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; + $domain = &Apache::lonnet::default_login_domain(); if ($env{'user.domain'}) { $domain=$env{'user.domain'}; } if ($env{'request.role.domain'}) { $domain=$env{'request.role.domain'}; @@ -4385,6 +4397,9 @@ sub bodytag { if ($env{'request.role'} !~ /^cr/) { $role = &Apache::lonnet::plaintext($role,&course_type()); } + if ($env{'request.course.sec'}) { + $role .= (' 'x2).'- '.&mt('section:').' '.$env{'request.course.sec'}; + } $realm = $env{'course.'.$env{'request.course.id'}.'.description'}; } else { $role = &Apache::lonnet::plaintext($role); @@ -4424,34 +4439,52 @@ sub bodytag { $dc_info = '('.$dc_info.')'; } - $role = "($role)" if $role; + $role = '('.$role.')' if $role; &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); if ($env{'environment.remote'} eq 'off') { # No Remote - if ($env{'request.state'} eq 'construct') { - $forcereg=1; - } + if ($env{'request.state'} eq 'construct') { + $forcereg=1; + } -# if ($env{'request.state'} eq 'construct') { -# $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls -# } + # if ($env{'request.state'} eq 'construct') { + # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls + # } my $titletable = '' - ."" - .'
$titleinfo $dc_info
'; + ." $titleinfo $dc_info" + .''; - if ($no_nav_bar) { - $bodytag .= $titletable; - } else { - $bodytag .= qq|
$name $role
- $realm $dc_info
| unless $env{'form.inhibitmenu'}; + if ($no_nav_bar) { + $bodytag .= $titletable; + } else { + $bodytag .= qq|
$name $role
+ $realm $dc_info
| unless $env{'form.inhibitmenu'}; - if ($env{'request.state'} eq 'construct') { - $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable); - } else { - $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable; - } +#SD $titletable is obsolete +#SD if ($env{'request.state'} eq 'construct') { +#SD $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable); +#SD } else { +#SD $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable; +#SD } + if ( $env{'form.inhibitmenu'} eq 'yes' + || $ENV{'REQUEST_URI'} eq '/adm/logout' + || $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { + + return $bodytag; + } + + $bodytag .= Apache::lonhtmlcommon::scripttag( + Apache::lonmenu::utilityfunctions(), + 'start'); + $bodytag .= Apache::lonmenu::primary_menu(); + $bodytag .= Apache::lonmenu::secondary_menu(); + #SD remove next line + #$bodytag .= Apache::lonmenu::menubuttons($forcereg); + $bodytag .= Apache::lonmenu::serverform(); + $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); + $bodytag .= Apache::lonmenu::innerregister($forcereg) if $forcereg; } return $bodytag; } @@ -4471,7 +4504,7 @@ sub bodytag { :''.&mt('Switch to Inline Menu Mode').''); $bodytag .= qq|
$name $role $realm $dc_info
-
    +
    1. $menu
    | unless $env{'form.inhibitmenu'}; # @@ -4642,14 +4675,6 @@ a:focus { background: yellow } -hr { - clear: both; - color: $tabbg; - background-color: $tabbg; - height: 3px; - border: none; -} - form, .inline { display: inline; } @@ -4994,6 +5019,9 @@ table.LC_nested tr.LC_empty_row td { padding: 8px; } +table.LC_caption { +} + table.LC_nested tr.LC_empty_row td { padding: 4ex } @@ -5117,7 +5145,7 @@ table.LC_mail_list tr.LC_mail_other:hove table.LC_data_table tr > td.LC_browser_file, table.LC_data_table tr > td.LC_browser_file_published { - background: #CCFF88; + background: #AAEE77; } table.LC_data_table tr > td.LC_browser_file_locked, @@ -5126,16 +5154,16 @@ table.LC_data_table tr > td.LC_browser_f } table.LC_data_table tr > td.LC_browser_file_obsolete { - background: #AAAAAA; + background: #888888; } table.LC_data_table tr > td.LC_browser_file_modified, table.LC_data_table tr > td.LC_browser_file_metamodified { - background: #FFFF77; + background: #F8F866; } table.LC_data_table tr.LC_browser_folder > td { - background: #CCCCFF; + background: #E0E8FF; } table.LC_data_table tr > td.LC_roles_is { @@ -5805,10 +5833,10 @@ div.LC_createcourse { # --------------------------*/ a:hover, -ol.LC_smallMenu a:hover, +ol.LC_primary_menu a:hover, ol#LC_MenuBreadcrumbs a:hover, ol#LC_PathBreadcrumbs a:hover, -ul#LC_TabMainMenuContent a:hover, +ul#LC_secondary_menu a:hover, .LC_FormSectionClearButton input:hover ul.LC_TabContent li:hover a { color:#BF2317; @@ -5885,7 +5913,7 @@ fieldset > legend { font-style: normal; } -ol.LC_smallMenu { +ol.LC_primary_menu { float: right; margin: 0.2em 0 0 0; } @@ -5894,23 +5922,23 @@ ol#LC_PathBreadcrumbs { margin: 0; } -ol.LC_smallMenu li { +ol.LC_primary_menu li { display: inline; padding: 5px 5px 0 10px; vertical-align: top; } -ol.LC_smallMenu li img { +ol.LC_primary_menu li img { vertical-align: bottom; } -ol.LC_smallMenu a { +ol.LC_primary_menu a { font-size: 90%; color: RGB(80, 80, 80); text-decoration: none; } -ul#LC_TabMainMenuContent { +ul#LC_secondary_menu { clear: both; color: $fontmenu; background: $tabbg; @@ -5920,7 +5948,7 @@ ul#LC_TabMainMenuContent { width: 100%; } -ul#LC_TabMainMenuContent li { +ul#LC_secondary_menu li { font-weight: bold; line-height: 1.8em; padding: 0 0.8em; @@ -5943,7 +5971,7 @@ ul.LC_TabContentBigger li { float:left; } -ul#LC_TabMainMenuContent li a { +ul#LC_secondary_menu li a { color: $fontmenu; text-decoration: none; } @@ -6763,6 +6791,11 @@ sub simple_error_page { sub end_data_table_header_row { return ''."\n";; } + + sub data_table_caption { + my $caption = shift; + return "$caption"; + } } =pod