1, + xml => 1, + ); + } + } elsif ($is_coauthor) { + if (exists($env{"environment.internal.editors./$audom/$auname"})) { + map { $editors{$_} = 1; } split(/,/,$env{"environment.internal.editors./$audom/$auname"}); + } else { + %editors = ( edit => 1, + xml => 1, + ); + } + } elsif ($is_course) { + if (exists($env{'course.'.$env{'request.course.id'}.'.internal.crseditors'})) { + map { $editors{$_} = 1; } split(/,/,$env{'course.'.$env{'request.course.id'}.'.internal.crseditors'}); + } else { + my %domdefaults = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'}); + if (exists($domdefaults{'crseditors'})) { + map { $editors{$_} = 1; } split(/,/,$domdefaults{'crseditors'}); + } else { + %editors = ( edit => 1, + xml => 1, + ); + } + } + } else { + %editors = ( edit => 1, + xml => 1, + ); + } + return %editors; +} + ############################################### ############################################### @@ -6550,7 +6900,6 @@ sub bodytag { my $hostname = $args->{'hostname'}; $function = &get_users_function() if (!$function); - my $img = &designparm($function.'.img',$domain); my $font = &designparm($function.'.font',$domain); my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); @@ -6604,8 +6953,6 @@ sub bodytag { $role = &Apache::lonnet::plaintext($role); } - if (!$realm) { $realm=' '; } - my $extra_body_attr = &make_attr_string($forcereg,\%design); # construct main body tag @@ -6629,7 +6976,6 @@ sub bodytag { undef($role); } unless ($ltimenu->{'coursetitle'}) { - $realm=' '; $showcrstitle = 0; } } @@ -6639,7 +6985,6 @@ sub bodytag { undef($role); } unless ($menuref->{'crs'}) { - $realm=' '; $showcrstitle = 0; } } @@ -6673,50 +7018,93 @@ sub bodytag { # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls # } - $bodytag .= Apache::lonhtmlcommon::scripttag( - Apache::lonmenu::utilityfunctions($httphost), 'start'); + my $need_endlcint; + unless ($args->{'switchserver'}) { + $bodytag .= Apache::lonhtmlcommon::scripttag( + Apache::lonmenu::utilityfunctions($httphost), 'start'); + $need_endlcint = 1; + } + my $collapsible; + if ($args->{'collapsible_header'} ne '') { + $collapsible = 1; + my ($menustate,$tiptext,$divclass); + if ($args->{'start_collapsed'}) { + $menustate = 'collapsed'; + $tiptext = 'display'; + $divclass = 'hidden'; + } else { + $menustate = 'expanded'; + $tiptext = 'hide'; + $divclass = 'shown'; + } + my $alttext = &mt('menu state: '.$menustate); + my $tooltip = &mt($tiptext.' standard menus'); + $bodytag .= <<"END"; +'; } - return $bodytag; } @@ -6844,6 +7238,9 @@ ENDJS $endbodytag; } } + if ((ref($args) eq 'HASH') && ($args->{'dashjs'})) { + $endbodytag = &Apache::lonhtmlcommon::dash_to_minus_js().$endbodytag; + } return $endbodytag; } @@ -6864,7 +7261,6 @@ Inputs: (all optional) sub standard_css { my ($function,$domain,$bgcolor) = @_; $function = &get_users_function() if (!$function); - my $img = &designparm($function.'.img', $domain); my $tabbg = &designparm($function.'.tabbg', $domain); my $font = &designparm($function.'.font', $domain); my $fontmenu = &designparm($function.'.fontmenu', $domain); @@ -6917,6 +7313,7 @@ body { line-height:130%; font-size:0.83em; color:$font; + background-color: $pgbg_or_bgcolor; } a:focus, @@ -6928,10 +7325,46 @@ form, .inline { display: inline; } +.LC_landmark { + margin: 0; + padding: 0; + border: none; +} + +.LC_visually_hidden:not(:focus):not(:active) { + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; + display: inline; +} + +.LC_heading_2 { + font-size: 1.17em; +} + +.LC_heading_3 { + font-size: 1.0em; +} + +.LC_menus_content.shown{ + display: block; +} + +.LC_menus_content.hidden { + display: none; +} + .LC_right { text-align:right; } +.LC_center { + text-align:center; +} + .LC_middle { vertical-align:middle; } @@ -6948,6 +7381,12 @@ form, .inline { width:400px; } +#LC_collapsible_separator { + border: 1px solid black; + width: 99.9%; + height: 0px; +} + .LC_iframecontainer { width: 98%; margin: 0; @@ -7069,9 +7508,10 @@ div.LC_confirm_box .LC_success img { padding: 4px; } -table.LC_pastsubmission { +.LC_pastsubmission { border: 1px solid black; margin: 2px; + padding: 2px; } table#LC_menubuttons { @@ -7325,6 +7765,12 @@ table.LC_nested tr.LC_empty_row td { table.LC_caption { } +caption.LC_caption_prefs { + font-weight: normal; + text-align: left; + padding-bottom: 0.8em; +} + table.LC_nested tr.LC_empty_row td { padding: 4ex } @@ -7495,6 +7941,10 @@ table.LC_data_table tr > td.LC_roles_sel border-right: 8px solid #11CC55; } +table.LC_data_table tr.LC_prefs_row { + line-height: 250%; +} + span.LC_current_location { font-size:larger; background: $pgbg; @@ -7568,39 +8018,68 @@ table.LC_parm_overview_restrictions th { border-color: $pgbg; } -table#LC_helpmenu { - border: none; - height: 55px; - border-spacing: 0; +h1.LC_helpmenu { + display: inline; + font-size: 100%; + font-weight: normal; + line-height: 1em; + margin: 0; + padding: 0; + border: 0; } -table#LC_helpmenu fieldset legend { - font-size: larger; +.LC_helpdesk_headbox { + border: 2px groove threedface; + padding: 1em; } -table#LC_helpmenu_links { - width: 100%; - border: 1px solid black; +h1.LC_helpdesk_legend { + float: left; + margin: -1.7em 0 0; + padding: 0 .5em; background: $pgbg; + font-size: 1em; + font-weight: bold; +} + +h1.LC_helpdesk_title { + display: inline; + font-size: 1em; + line-height: 2.5em; + margin: 0; padding: 0; - border-spacing: 1px; + vertical-align: bottom; } -table#LC_helpmenu_links tr td { - padding: 1px; +.LC_helpdesk_links { + border: 1px solid black; + padding: 3px; background: $tabbg; text-align: center; font-weight: bold; + display: inline; + margin-right: -6px; } -table#LC_helpmenu_links a:link, -table#LC_helpmenu_links a:visited, -table#LC_helpmenu_links a:active { +.LC_helpdesk_img, +.LC_helpdesk_text { + padding: 0; + margin: 0; + border: 0; + display: inline; +} + +.LC_helpdesk_img a:link, +.LC_helpdesk_img a:visited, +.LC_helpdesk_img a:active, +.LC_helpdesk_text a:link, +.LC_helpdesk_text a:visited, +.LC_helpdesk_text a:active { text-decoration: none; color: $font; } -table#LC_helpmenu_links a:hover { +div.LC_helpdesk_text a:hover { text-decoration: underline; color: $vlink; } @@ -7627,7 +8106,7 @@ table.LC_pick_box { border-spacing: 1px; } -table.LC_pick_box td.LC_pick_box_title { +table.LC_pick_box th.LC_pick_box_title { background: $sidebg; font-weight: bold; text-align: left; @@ -7830,6 +8309,44 @@ table.LC_prior_tries td { padding: 6px; } +span.LC_prob_status { + margin: 5px 0 0 0; + padding: 0 5px 0 0; + vertical-align: middle; +} + +div.LC_prob_status_outer { + display: inline-block; + margin: -5px 0 0 0; + padding: 0; +} + +div.LC_prob_status_inner { + display: inline-block; + margin: 0 5px 0 0; + padding: 5px; +} + +caption.LC_filesub_status { + text-align: left; + font-weight: bold; +} + +.LC_mail_actions { + float: left; + padding: 0; + margin: 6px; +} + +.LC_vertical_line { + width: 1px; + background-color: black; + height: 4em; + float: left; + margin: 0; + padding: 0; +} + span.LC_prior_numerical, span.LC_prior_string, span.LC_prior_custom, @@ -7983,6 +8500,10 @@ div.LC_grade_show_user div.LC_Box { margin-right: 50px; } +div.LC_grade_show_user div.LC_Box table tr th { + font-weight: normal; +} + div.LC_grade_submissions, div.LC_grade_message_center, div.LC_grade_info_links { @@ -8013,6 +8534,12 @@ table.LC_scantron_action tr th { font-style:normal; } +div.LC_edit_problem_daxe_header { + padding: 3px; + background: $tabbg; + z-index: 100; +} + .LC_edit_problem_header, div.LC_edit_problem_footer { font-weight: normal; @@ -8078,8 +8605,9 @@ img.stift { vertical-align: middle; } -table td.LC_mainmenu_col_fieldset { - vertical-align: top; +div.LC_mainmenu { + margin: 3px 2px 2px 1px; + float: left; } div.LC_createcourse { @@ -8161,8 +8689,9 @@ fieldset { } fieldset#LC_selectuser { - margin: 0; - padding: 0; + margin: -1px 0 0 0; + padding: 0; + border: 0; } article.geogebraweb div { @@ -8720,7 +9249,7 @@ ul#LC_toolbar { padding: 0; margin: 2px; list-style:none; - position:relative; + display:inline; background-color:white; overflow: auto; } @@ -8748,6 +9277,13 @@ a.LC_toolbarItem { background-color:transparent; } +.LC_navtools { + display: inline-block; + padding: 0; + margin: 2px; + vertical-align: middle; +} + ul.LC_funclist { margin: 0; padding: 0.5em 1em 0.5em 0; @@ -8852,13 +9388,39 @@ pre.LC_wordwrap { /* styles used for response display */ -div.LC_radiofoil, div.LC_rankfoil { +div.LC_radiofoil, div.LC_rankfoil, div.LC_optionfoil, div.LC_matchfoil, div.LC_login_links { margin: .5em 0em .5em 0em; } table.LC_itemgroup { margin-top: 1em; } +table.LC_itemgroup tr th { + font-weight: normal; +} + +fieldset.LC_webbubbles { + margin: 2px 0 0 0; + padding: 0; + border: 0; +} + +ul.LC_webbubbles { + list-style: none; + padding: 0; + margin: 0; + text-align: left; + float: left; +} + +ul.LC_webbubbles li { + line-height: 1.8em; + border: 1px solid black; + padding: 0 2px 0 5px; + margin: 0 0 0 -1px; + float: left; +} + /* styles used by TTH when "Default set of options to pass to tth/m when converting TeX" in course settings has been set @@ -9054,7 +9616,7 @@ sub headtag { $inhibitprint = &print_suppression(); } - if (!$args->{'frameset'}) { + if (!$args->{'frameset'} && !$args->{'switchserver'}) { $result .= &Apache::lonhtmlcommon::htmlareaheaders(); } if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) { @@ -9062,7 +9624,8 @@ sub headtag { } if (!$args->{'no_nav_bar'} && !$args->{'only_body'} - && !$args->{'frameset'}) { + && !$args->{'frameset'} + && !$args->{'switchserver'}) { $result .= &help_menu_js($httphost); $result.=&modal_window(); $result.=&togglebox_script(); @@ -9258,8 +9821,12 @@ OFFLOAD $title = 'The LearningOnline Network with CAPA'; } if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } - $result .= ' LON-CAPA '.$title.'' - .''; + } else { + $result .= ' LON-CAPA '.$title.''; + } + $result .= "\n".'{'frameset'}) { $result .= ' /'; } @@ -9274,10 +9841,14 @@ OFFLOAD } if ($clientmobile) { $result .= ' - + '; } - $result .= ''."\n"; + $result .= '{'frameset'}) { + $result .= ' /'; + } + $result .= '>'."\n"; return $result.''; } @@ -9408,7 +9979,7 @@ sub xml_begin { .'xmlns="http://www.w3.org/1999/xhtml">'; } elsif ($is_frameset) { $output=''."\n". - ''."\n"; + ''."\n"; } else { $output=''."\n". ''."\n"; @@ -9458,6 +10029,11 @@ $args - additional optional args support no_auto_mt_title -> prevent &mt()ing the title arg bread_crumbs -> Array containing breadcrumbs bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs + bread_crumbs_style -> breadcrumbs are contained within
, + and &standard_css() contains CSS for #LC_breadcrumbs, if you want + to override those values, or add to them, specify the value to + include in the style attribute to include in the div tag by using + bread_crumbs_style (e.g., overflow: visible) bread_crumbs_nomenu -> if true will pass false as the value of $menulink to lonhtmlcommon::breadcrumbs group -> includes the current group, if page is for a @@ -9626,9 +10202,12 @@ sub start_page { } #if bread_crumbs_component exists show it as headline else show only the breadcrumbs if(exists($args->{'bread_crumbs_component'})){ - $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'},'',$menulink); + $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'}, + '',$menulink,'', + $args->{'bread_crumbs_style'}); } else { - $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink); + $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink,'', + $args->{'bread_crumbs_style'}); } } } @@ -9764,6 +10343,50 @@ sub symb_from_tinyurl { } } +sub usable_exttools { + my %tooltypes; + if ($env{'request.course.id'}) { + if ($env{'course.'.$env{'request.course.id'}.'.internal.exttool'}) { + if ($env{'course.'.$env{'request.course.id'}.'.internal.exttool'} eq 'both') { + %tooltypes = ( + crs => 1, + dom => 1, + ); + } elsif ($env{'course.'.$env{'request.course.id'}.'.internal.exttool'} eq 'crs') { + $tooltypes{'crs'} = 1; + } elsif ($env{'course.'.$env{'request.course.id'}.'.internal.exttool'} eq 'dom') { + $tooltypes{'dom'} = 1; + } + } else { + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my $crstype = lc($env{'course.'.$env{'request.course.id'}.'.type'}); + if ($crstype eq '') { + $crstype = 'course'; + } + if ($crstype eq 'course') { + if ($env{'course.'.$env{'request.course.id'}.'internal.coursecode'}) { + $crstype = 'official'; + } elsif ($env{'course.'.$env{'request.course.id'}.'.internal.textbook'}) { + $crstype = 'textbook'; + } elsif ($env{'course.'.$env{'request.course.id'}.'.internal.lti'}) { + $crstype = 'lti'; + } else { + $crstype = 'unofficial'; + } + } + my %domdefaults = &Apache::lonnet::get_domain_defaults($cdom); + if ($domdefaults{$crstype.'domexttool'}) { + $tooltypes{'dom'} = 1; + } + if ($domdefaults{$crstype.'exttool'}) { + $tooltypes{'crs'} = 1; + } + } + } + return %tooltypes; +} + sub wishlist_window { return(<<'ENDWISHLIST');