version 1.1421, 2023/11/19 21:28:17
|
version 1.1447, 2025/01/26 07:17:02
|
Line 1372 sub helpLatexCheatsheet {
|
Line 1372 sub helpLatexCheatsheet {
|
$out .= '<span>' |
$out .= '<span>' |
.&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) |
.&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) |
.'</span> <span>' |
.'</span> <span>' |
.&help_open_topic('Authoring_Multilingual_Problems',&mt('How to create problems in different languages'),$stayOnPage,undef,600) |
.&help_open_topic('Authoring_Multilingual_Problems',&mt('Languages'),$stayOnPage,undef,600) |
.'</span>'; |
.'</span>'; |
} |
} |
$out .= '</span>'; # End cheatsheet |
$out .= '</span>'; # End cheatsheet |
Line 1764 the id of the element to resize, second
|
Line 1764 the id of the element to resize, second
|
surrounds everything that comes after the textarea, this routine needs |
surrounds everything that comes after the textarea, this routine needs |
to be attached to the <body> for the onload and onresize events. |
to be attached to the <body> for the onload and onresize events. |
|
|
=back |
|
|
|
=cut |
=cut |
|
|
sub resize_textarea_js { |
sub resize_textarea_js { |
Line 2439 sub show_crsfiles_js {
|
Line 2437 sub show_crsfiles_js {
|
END |
END |
} |
} |
|
|
|
sub crsauthor_rights { |
|
my ($rightsfile,$path,$docroot,$cnum,$cdom) = @_; |
|
my $sourcerights = "$path/$rightsfile"; |
|
my $now = time; |
|
if (!-e $sourcerights) { |
|
my $cid = $cdom.'_'.$cnum; |
|
if (!-e "$docroot/priv/$cdom") { |
|
mkdir("$docroot/priv/$cdom",0755); |
|
} |
|
if (!-e "$docroot/priv/$cdom/$cnum") { |
|
mkdir("$docroot/priv/$cdom/$cnum",0755); |
|
} |
|
if (open(my $fh,">$sourcerights")) { |
|
print $fh <<END; |
|
<accessrule effect="deny" realm="" type="course" role="" /> |
|
<accessrule effect="allow" realm="$cid" type="course" role="" /> |
|
END |
|
close($fh); |
|
} |
|
} |
|
if (!-e "$sourcerights.meta") { |
|
if (open(my $fh,">$sourcerights.meta")) { |
|
my $author=$env{'environment.firstname'}.' '. |
|
$env{'environment.middlename'}.' '. |
|
$env{'environment.lastname'}.' '. |
|
$env{'environment.generation'}; |
|
$author =~ s/\s+$//; |
|
print $fh <<"END"; |
|
|
|
<abstract></abstract> |
|
<author>$author</author> |
|
<authorspace>$cnum:$cdom</authorspace> |
|
<copyright>private</copyright> |
|
<creationdate>$now</creationdate> |
|
<customdistributionfile></customdistributionfile> |
|
<dependencies></dependencies> |
|
<domain>$cdom</domain> |
|
<highestgradelevel>0</highestgradelevel> |
|
<keywords></keywords> |
|
<language>notset</language> |
|
<lastrevisiondate>$now</lastrevisiondate> |
|
<lowestgradelevel>0</lowestgradelevel> |
|
<mime>rights</mime> |
|
<modifyinguser>$env{'user.name'}:$env{'user.domain'}</modifyinguser> |
|
<notes></notes> |
|
<obsolete></obsolete> |
|
<obsoletereplacement></obsoletereplacement> |
|
<owner>$cnum:$cdom</owner> |
|
<rule>deny:::course,allow:$cid::course</rule> |
|
<sourceavail></sourceavail> |
|
<standards></standards> |
|
<subject></subject> |
|
<title>Course Authoring Rights</title> |
|
END |
|
close($fh); |
|
} |
|
} |
|
return; |
|
} |
|
|
=pod |
=pod |
|
|
=item * &iframe_wrapper_headjs() |
=item * &iframe_wrapper_headjs() |
|
|
|
emits javascript containing two global vars to facilitate handling of resizing |
|
by code in iframe_wrapper_resizejs() used when an iframe is present in a page |
|
with standard LON-CAPA menus. |
|
|
|
=cut |
|
|
# |
# |
# Where iframe is in use, if window.onload() executes before the custom resize function |
# Where iframe is in use, if window.onload() executes before the custom resize function |
# has been defined (jQuery), two global javascript vars (LCnotready and LCresizedef) |
# has been defined (jQuery), two global javascript vars (LCnotready and LCresizedef) |
Line 2450 END
|
Line 2514 END
|
# do not obscure the Functions menu. |
# do not obscure the Functions menu. |
# |
# |
|
|
=back |
|
|
|
=cut |
|
|
|
|
|
sub iframe_wrapper_headjs { |
sub iframe_wrapper_headjs { |
return <<"ENDJS"; |
return <<"ENDJS"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 2472 ENDJS
|
Line 2531 ENDJS
|
|
|
=item * &iframe_wrapper_resizejs() |
=item * &iframe_wrapper_resizejs() |
|
|
|
emits javascript used to handle resizing for a page containing |
|
an iframe, to ensure that the iframe does not obscure any |
|
standard LON-CAPA menu items. |
|
|
|
=back |
|
|
|
=cut |
|
|
# |
# |
# jQuery to use when iframe is in use and a page resize occurs. |
# jQuery to use when iframe is in use and a page resize occurs. |
# This script will ensure that the iframe does not obscure any |
# This script will ensure that the iframe does not obscure any |
Line 2481 ENDJS
|
Line 2548 ENDJS
|
# e.g., by inclusion in second arg passed to &start_page(). |
# e.g., by inclusion in second arg passed to &start_page(). |
# |
# |
|
|
=back |
|
|
|
=cut |
|
|
|
sub iframe_wrapper_resizejs { |
sub iframe_wrapper_resizejs { |
my $offset = 5; |
my $offset = 5; |
&get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
&get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
Line 2501 sub iframe_wrapper_resizejs {
|
Line 2564 sub iframe_wrapper_resizejs {
|
if (\$('div.LC_menus_content:first').length) { |
if (\$('div.LC_menus_content:first').length) { |
if (\$('div.LC_menus_content:first').hasClass ("shown")) { |
if (\$('div.LC_menus_content:first').hasClass ("shown")) { |
header = \$('div.LC_menus_content:first'); |
header = \$('div.LC_menus_content:first'); |
offset = 9; |
offset = 12; |
} |
} |
} else if (\$('div.LC_head_subbox:first').length) { |
} else if (\$('div.LC_head_subbox:first').length) { |
header = \$('div.LC_head_subbox:first'); |
header = \$('div.LC_head_subbox:first'); |
Line 3887 sub passwd_validation_js {
|
Line 3950 sub passwd_validation_js {
|
} else { |
} else { |
$alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n'; |
$alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n'; |
} |
} |
|
} elsif ($context eq 'ltitools') { |
|
my %domconfig = &Apache::lonnet::get_dom('configuration',['toolsec'],$domain); |
|
if (ref($domconfig{'toolsec'}) eq 'HASH') { |
|
if (ref($domconfig{'toolsec'}{'rules'}) eq 'HASH') { |
|
%passwdconf = %{$domconfig{'toolsec'}{'rules'}}; |
|
} |
|
} |
|
if ($id eq 'add') { |
|
$alertmsg = &mt('Secret for added external tool did not satisfy requirement(s):').'\n\n'; |
|
} elsif ($id =~ /^\d+$/) { |
|
my $pos = $id+1; |
|
$alertmsg = &mt('Secret for external tool [_1] did not satisfy requirement(s):','#'.$pos).'\n\n'; |
|
} else { |
|
$alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n'; |
|
} |
} else { |
} else { |
%passwdconf = &Apache::lonnet::get_passwdconf($domain); |
%passwdconf = &Apache::lonnet::get_passwdconf($domain); |
$alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n'; |
$alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n'; |
Line 5613 sub blockcheck {
|
Line 5691 sub blockcheck {
|
} |
} |
unless ($has_evb) { |
unless ($has_evb) { |
if (($activity eq 'printout') || ($activity eq 'grades') || ($activity eq 'search') || |
if (($activity eq 'printout') || ($activity eq 'grades') || ($activity eq 'search') || |
($activity eq 'boards') || ($activity eq 'groups') || ($activity eq 'chat')) { |
($activity eq 'index') || ($activity eq 'boards') || ($activity eq 'groups') || |
|
($activity eq 'chat')) { |
if ($udom eq $cdom) { |
if ($udom eq $cdom) { |
$check_ipaccess = 1; |
$check_ipaccess = 1; |
} |
} |
Line 5704 sub blockcheck {
|
Line 5783 sub blockcheck {
|
|
|
if (($activity eq 'boards' || $activity eq 'chat' || |
if (($activity eq 'boards' || $activity eq 'chat' || |
$activity eq 'groups' || $activity eq 'printout' || |
$activity eq 'groups' || $activity eq 'printout' || |
$activity eq 'search' || $activity eq 'reinit' || |
$activity eq 'search' || $activity eq 'index' || |
$activity eq 'alert') && |
$activity eq 'reinit' || $activity eq 'alert') && |
($env{'request.course.id'})) { |
($env{'request.course.id'})) { |
foreach my $key (keys(%live_courses)) { |
foreach my $key (keys(%live_courses)) { |
if ($key ne $env{'request.course.id'}) { |
if ($key ne $env{'request.course.id'}) { |
Line 6040 END_MYBLOCK
|
Line 6119 END_MYBLOCK
|
$text = &mt('Gradebook Blocked'); |
$text = &mt('Gradebook Blocked'); |
} elsif ($activity eq 'search') { |
} elsif ($activity eq 'search') { |
$text = &mt('Search Blocked'); |
$text = &mt('Search Blocked'); |
|
} elsif ($activity eq 'index') { |
|
$text = &mt('Content Index Blocked'); |
} elsif ($activity eq 'alert') { |
} elsif ($activity eq 'alert') { |
$text = &mt('Checking Critical Messages Blocked'); |
$text = &mt('Checking Critical Messages Blocked'); |
} elsif ($activity eq 'reinit') { |
} elsif ($activity eq 'reinit') { |
Line 6473 Input: (optional) filename from which br
|
Line 6554 Input: (optional) filename from which br
|
If page header is being requested for use in a frameset, then |
If page header is being requested for use in a frameset, then |
the second (option) argument -- frameset will be true, and |
the second (option) argument -- frameset will be true, and |
the target attribute set for links should be target="_parent". |
the target attribute set for links should be target="_parent". |
If $title is supplied as the thitd arg, that will be used to |
If $title is supplied as the third arg, that will be used to |
the left of the breadcrumbs tail for the current path. |
the left of the breadcrumbs tail for the current path. |
|
|
Returns: HTML div with CSTR path and recent box |
Returns: HTML div with CSTR path and recent box |
Line 6590 sub nocodemirror {
|
Line 6671 sub nocodemirror {
|
|
|
=item * &permitted_editors() |
=item * &permitted_editors() |
|
|
Input: None |
Input: $uri (optional) |
|
|
Returns: %editors hash in which keys are editors |
Returns: %editors hash in which keys are editors |
permitted in current Authoring Space. |
permitted in current Authoring Space, |
|
or in current course for web pages |
|
created in a course. |
|
|
Value for each key is 1. Possible keys |
Value for each key is 1. Possible keys |
are: edit, xml, and daxe. If no specific |
are: edit, xml, and daxe. |
|
|
|
For a regular Authoring Space, if no specific |
set of editors has been set for the Author |
set of editors has been set for the Author |
who owns the Authoring Space, then the |
who owns the Authoring Space, then the |
domain default will be used. If no domain |
domain default will be used. If no domain |
default has been set, then the keys will be |
default has been set, then the keys will be |
edit and xml. |
edit and xml. |
|
|
|
For a course author, or for web pages created |
|
in a course, if no specific set of editors has |
|
been set for the course, then the domain |
|
course default will be used. If no domain |
|
course default has been set, then the keys |
|
will be edit and xml. |
|
|
=cut |
=cut |
|
|
sub permitted_editors { |
sub permitted_editors { |
my ($is_author,$is_coauthor,$auname,$audom,%editors); |
my ($uri) = @_; |
|
my ($is_author,$is_coauthor,$is_course,$auname,$audom,%editors); |
if ($env{'request.role'} =~ m{^au\./}) { |
if ($env{'request.role'} =~ m{^au\./}) { |
$is_author = 1; |
$is_author = 1; |
} elsif ($env{'request.role'} =~ m{^(?:ca|aa)\./($match_domain)/($match_username)}) { |
} elsif ($env{'request.role'} =~ m{^(?:ca|aa)\./($match_domain)/($match_username)}) { |
Line 6619 sub permitted_editors {
|
Line 6713 sub permitted_editors {
|
} |
} |
} |
} |
} elsif ($env{'request.course.id'}) { |
} elsif ($env{'request.course.id'}) { |
if ($env{'request.editurl'} =~ m{^/priv/($match_domain)/($match_username)/}) { |
my ($cdom,$cnum); |
|
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
if (($env{'request.editurl'} =~ m{^/priv/\Q$cdom/$cnum\E/}) || |
|
($env{'request.editurl'} =~ m{^/uploaded/\Q$cdom/$cnum\E/(docs|supplemental)/}) || |
|
($uri =~ m{^/uploaded/\Q$cdom/$cnum\E/(docs|supplemental)/})) { |
|
$is_course = 1; |
|
} elsif ($env{'request.editurl'} =~ m{^/priv/($match_domain)/($match_username)/}) { |
($audom,$auname) = ($1,$2); |
($audom,$auname) = ($1,$2); |
} elsif ($env{'request.uri'} =~ m{^/priv/($match_domain)/($match_username)/}) { |
} elsif ($env{'request.uri'} =~ m{^/priv/($match_domain)/($match_username)/}) { |
($audom,$auname) = ($1,$2); |
($audom,$auname) = ($1,$2); |
|
} elsif (($uri eq '/daxesave') && |
|
(($env{'form.path'} =~ m{^/daxeopen/priv/\Q$cdom/$cnum\E/}) || |
|
($env{'form.path'} =~ m{^/daxeopen/uploaded/\Q$cdom/$cnum\E/(docs|supplemental)/}))) { |
|
$is_course = 1; |
|
} elsif (($uri eq '/daxesave') && |
|
($env{'form.path'} =~ m{^/daxeopen/priv/($match_domain)/($match_username)/})) { |
|
($audom,$auname) = ($1,$2); |
} |
} |
if (($audom ne '') && ($auname ne '')) { |
unless ($is_course) { |
if (($env{'user.domain'} eq $audom) && |
if (($audom ne '') && ($auname ne '')) { |
($env{'user.name'} eq $auname)) { |
if (($env{'user.domain'} eq $audom) && |
$is_author = 1; |
($env{'user.name'} eq $auname)) { |
} else { |
$is_author = 1; |
$is_coauthor = 1; |
} else { |
|
$is_coauthor = 1; |
|
} |
} |
} |
} |
} |
} |
} |
Line 6649 sub permitted_editors {
|
Line 6759 sub permitted_editors {
|
xml => 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 { |
} else { |
%editors = ( edit => 1, |
%editors = ( edit => 1, |
xml => 1, |
xml => 1, |
Line 6757 sub bodytag {
|
Line 6880 sub bodytag {
|
my $hostname = $args->{'hostname'}; |
my $hostname = $args->{'hostname'}; |
|
|
$function = &get_users_function() if (!$function); |
$function = &get_users_function() if (!$function); |
my $img = &designparm($function.'.img',$domain); |
|
my $font = &designparm($function.'.font',$domain); |
my $font = &designparm($function.'.font',$domain); |
my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); |
my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); |
|
|
Line 6880 sub bodytag {
|
Line 7002 sub bodytag {
|
# $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls |
# $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls |
# } |
# } |
|
|
$bodytag .= Apache::lonhtmlcommon::scripttag( |
my $need_endlcint; |
Apache::lonmenu::utilityfunctions($httphost), 'start'); |
unless ($args->{'switchserver'}) { |
|
$bodytag .= Apache::lonhtmlcommon::scripttag( |
|
Apache::lonmenu::utilityfunctions($httphost), 'start'); |
|
$need_endlcint = 1; |
|
} |
|
|
if ($args->{'collapsible_header'}) { |
my $collapsible; |
my $alttext = &mt('menu state: collapsed'); |
if ($args->{'collapsible_header'} ne '') { |
my $tooltip = &mt('display standard menus'); |
$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"; |
$bodytag .= <<"END"; |
<div id="LC_expandingContainer" style="display:inline;"> |
<div id="LC_expandingContainer" style="display:inline;"> |
<div id="LC_collapsible" class="LC_collapse_trigger" style="position: absolute;top: -5px;left: 0px; z-index:101; display:inline;"> |
<div id="LC_collapsible" class="LC_collapse_trigger" style="position: absolute;top: -5px;left: 0px; z-index:101; display:inline;"> |
<a href="#" style="text-decoration:none;"><img class="LC_collapsible_indicator" alt="$alttext" title="$tooltip" src="/res/adm/pages/collapsed.png" style="border:0;margin:0;padding:0;max-width:100%;height:auto" /></a></div> |
<a href="#" style="text-decoration:none;"><img class="LC_collapsible_indicator" alt="$alttext" title="$tooltip" src="/res/adm/pages/$menustate.png" style="border:0;margin:0;padding:0;max-width:100%;height:auto" /></a></div> |
<div class="LC_menus_content hidden"> |
<div class="LC_menus_content $divclass"> |
END |
END |
} |
} |
unless ($args->{'no_primary_menu'}) { |
unless ($args->{'no_primary_menu'}) { |
my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref, |
my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref, |
$args->{'links_disabled'}, |
$args->{'links_disabled'}, |
$args->{'links_target'}, |
$args->{'links_target'}, |
$args->{'collapsible_header'}); |
$collapsible); |
|
|
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($dc_info) { |
if ($dc_info) { |
Line 6905 END
|
Line 7043 END
|
} |
} |
$bodytag .= qq|<div id="LC_nav_bar">$left $role<br /> |
$bodytag .= qq|<div id="LC_nav_bar">$left $role<br /> |
<em>$realm</em> $dc_info</div>|; |
<em>$realm</em> $dc_info</div>|; |
|
if ($need_endlcint) { |
|
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
|
} |
return $bodytag; |
return $bodytag; |
} |
} |
|
|
Line 6922 END
|
Line 7063 END
|
|
|
#if directed to not display the secondary menu, don't. |
#if directed to not display the secondary menu, don't. |
if ($args->{'no_secondary_menu'}) { |
if ($args->{'no_secondary_menu'}) { |
|
if ($need_endlcint) { |
|
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
|
} |
return $bodytag; |
return $bodytag; |
} |
} |
#don't show menus for public users |
#don't show menus for public users |
Line 6934 END
|
Line 7078 END
|
$args->{'links_target'}); |
$args->{'links_target'}); |
} |
} |
$bodytag .= Apache::lonmenu::serverform(); |
$bodytag .= Apache::lonmenu::serverform(); |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
if ($need_endlcint) { |
|
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
|
} |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
$bodytag .= &Apache::lonmenu::innerregister($forcereg, |
$bodytag .= &Apache::lonmenu::innerregister($forcereg, |
$args->{'bread_crumbs'},'','',$hostname, |
$args->{'bread_crumbs'},'','',$hostname, |
Line 6950 END
|
Line 7096 END
|
$args->{'bread_crumbs'}, |
$args->{'bread_crumbs'}, |
$advtoolsref,'',$hostname); |
$advtoolsref,'',$hostname); |
} |
} |
}else{ |
} else { |
# this is to seperate menu from content when there's no secondary |
# this is to separate menu from content when there's no secondary |
# menu. Especially needed for public accessible ressources. |
# menu. Especially needed for publicly accessible resources. |
$bodytag .= '<hr style="clear:both" />'; |
$bodytag .= '<hr style="clear:both" />'; |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
if ($need_endlcint) { |
|
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
|
} |
} |
} |
if ($args->{'collapsible_header'}) { |
if ($args->{'collapsible_header'} ne '') { |
$bodytag .= '<div id="LC_collapsible_separator"></div>'. |
$bodytag .= $args->{'collapsible_header'}. |
|
'<div id="LC_collapsible_separator"></div>'. |
'</div></div>'; |
'</div></div>'; |
} |
} |
return $bodytag; |
return $bodytag; |
Line 7088 Inputs: (all optional)
|
Line 7237 Inputs: (all optional)
|
sub standard_css { |
sub standard_css { |
my ($function,$domain,$bgcolor) = @_; |
my ($function,$domain,$bgcolor) = @_; |
$function = &get_users_function() if (!$function); |
$function = &get_users_function() if (!$function); |
my $img = &designparm($function.'.img', $domain); |
|
my $tabbg = &designparm($function.'.tabbg', $domain); |
my $tabbg = &designparm($function.'.tabbg', $domain); |
my $font = &designparm($function.'.font', $domain); |
my $font = &designparm($function.'.font', $domain); |
my $fontmenu = &designparm($function.'.fontmenu', $domain); |
my $fontmenu = &designparm($function.'.fontmenu', $domain); |
Line 7141 body {
|
Line 7289 body {
|
line-height:130%; |
line-height:130%; |
font-size:0.83em; |
font-size:0.83em; |
color:$font; |
color:$font; |
|
background-color: $pgbg_or_bgcolor; |
} |
} |
|
|
a:focus, |
a:focus, |
Line 7152 form, .inline {
|
Line 7301 form, .inline {
|
display: inline; |
display: inline; |
} |
} |
|
|
|
.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_menus_content.shown{ |
.LC_menus_content.shown{ |
display: inline; |
display: block; |
} |
} |
|
|
.LC_menus_content.hidden { |
.LC_menus_content.hidden { |
Line 8068 table.LC_prior_tries td {
|
Line 8227 table.LC_prior_tries td {
|
padding: 6px; |
padding: 6px; |
} |
} |
|
|
|
.LC_prob_status { |
|
margin-top: 5px; |
|
padding-top: 0; |
|
padding-left: 0; |
|
padding-bottom: 0; |
|
padding-right: 5px; |
|
} |
|
|
span.LC_prior_numerical, |
span.LC_prior_numerical, |
span.LC_prior_string, |
span.LC_prior_string, |
span.LC_prior_custom, |
span.LC_prior_custom, |
Line 9292 sub headtag {
|
Line 9459 sub headtag {
|
$inhibitprint = &print_suppression(); |
$inhibitprint = &print_suppression(); |
} |
} |
|
|
if (!$args->{'frameset'}) { |
if (!$args->{'frameset'} && !$args->{'switchserver'}) { |
$result .= &Apache::lonhtmlcommon::htmlareaheaders(); |
$result .= &Apache::lonhtmlcommon::htmlareaheaders(); |
} |
} |
if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) { |
if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) { |
Line 9300 sub headtag {
|
Line 9467 sub headtag {
|
} |
} |
if (!$args->{'no_nav_bar'} |
if (!$args->{'no_nav_bar'} |
&& !$args->{'only_body'} |
&& !$args->{'only_body'} |
&& !$args->{'frameset'}) { |
&& !$args->{'frameset'} |
|
&& !$args->{'switchserver'}) { |
$result .= &help_menu_js($httphost); |
$result .= &help_menu_js($httphost); |
$result.=&modal_window(); |
$result.=&modal_window(); |
$result.=&togglebox_script(); |
$result.=&togglebox_script(); |
Line 9496 OFFLOAD
|
Line 9664 OFFLOAD
|
$title = 'The LearningOnline Network with CAPA'; |
$title = 'The LearningOnline Network with CAPA'; |
} |
} |
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } |
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } |
$result .= '<title> LON-CAPA '.$title.'</title>' |
if ($title =~ /^LON-CAPA\s+/) { |
.'<link rel="stylesheet" type="text/css" href="'.$url.'"'; |
$result .= '<title> '.$title.'</title>'; |
|
} else { |
|
$result .= '<title> LON-CAPA '.$title.'</title>'; |
|
} |
|
$result .= "\n".'<link rel="stylesheet" type="text/css" href="'.$url.'"'; |
if (!$args->{'frameset'}) { |
if (!$args->{'frameset'}) { |
$result .= ' /'; |
$result .= ' /'; |
} |
} |
Line 9512 OFFLOAD
|
Line 9684 OFFLOAD
|
} |
} |
if ($clientmobile) { |
if ($clientmobile) { |
$result .= ' |
$result .= ' |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
<meta name="apple-mobile-web-app-capable" content="yes" />'; |
<meta name="apple-mobile-web-app-capable" content="yes" />'; |
} |
} |
$result .= '<meta name="google" content="notranslate" />'."\n"; |
$result .= '<meta name="google" content="notranslate" />'."\n"; |
Line 9696 $args - additional optional args support
|
Line 9868 $args - additional optional args support
|
no_auto_mt_title -> prevent &mt()ing the title arg |
no_auto_mt_title -> prevent &mt()ing the title arg |
bread_crumbs -> Array containing breadcrumbs |
bread_crumbs -> Array containing breadcrumbs |
bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs |
bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs |
|
bread_crumbs_style -> breadcrumbs are contained within <div id="LC_breadcrumbs">, |
|
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 |
bread_crumbs_nomenu -> if true will pass false as the value of $menulink |
to lonhtmlcommon::breadcrumbs |
to lonhtmlcommon::breadcrumbs |
group -> includes the current group, if page is for a |
group -> includes the current group, if page is for a |
Line 9864 sub start_page {
|
Line 10041 sub start_page {
|
} |
} |
#if bread_crumbs_component exists show it as headline else show only the breadcrumbs |
#if bread_crumbs_component exists show it as headline else show only the breadcrumbs |
if(exists($args->{'bread_crumbs_component'})){ |
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 { |
} else { |
$result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink); |
$result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink,'', |
|
$args->{'bread_crumbs_style'}); |
} |
} |
} |
} |
} |
} |
Line 17954 sub init_user_environment {
|
Line 18134 sub init_user_environment {
|
} else { |
} else { |
$userenv{'editors'} = 'edit,xml'; |
$userenv{'editors'} = 'edit,xml'; |
} |
} |
|
if ($userenv{'authorarchive'}) { |
|
$userenv{'canarchive'} = 1; |
|
} elsif (($userenv{'authorarchive'} eq '') && |
|
($domdef{'archive'})) { |
|
$userenv{'canarchive'} = 1; |
|
} |
} |
} |
|
|
$userenv{'canrequest.author'} = |
$userenv{'canrequest.author'} = |