version 1.1075.2.161.2.22, 2024/02/28 03:23:49
|
version 1.1075.2.161.2.32, 2025/01/16 13:50:34
|
Line 3452 sub passwd_validation_js {
|
Line 3452 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 5968 Input: (optional) filename from which br
|
Line 5983 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 third arg, that will be used to |
|
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 |
To be included on Authoring Space pages |
To be included on Authoring Space pages |
Line 5975 Returns: HTML div with CSTR path and rec
|
Line 5992 Returns: HTML div with CSTR path and rec
|
=cut |
=cut |
|
|
sub CSTR_pageheader { |
sub CSTR_pageheader { |
my ($trailfile,$frameset) = @_; |
my ($trailfile,$frameset,$title) = @_; |
if ($trailfile eq '') { |
if ($trailfile eq '') { |
$trailfile = $env{'request.filename'}; |
$trailfile = $env{'request.filename'}; |
} |
} |
Line 5998 sub CSTR_pageheader {
|
Line 6015 sub CSTR_pageheader {
|
$lastitem = $thisdisfn; |
$lastitem = $thisdisfn; |
} |
} |
|
|
|
if ($title eq '') { |
|
$title = &mt('Authoring Space'); |
|
} |
|
|
my ($target,$crumbtarget) = (' target="_top"','_top'); |
my ($target,$crumbtarget) = (' target="_top"','_top'); |
if ($frameset) { |
if ($frameset) { |
$target = ' target="_parent"'; |
$target = ' target="_parent"'; |
Line 6013 sub CSTR_pageheader {
|
Line 6034 sub CSTR_pageheader {
|
my $output = |
my $output = |
'<div>' |
'<div>' |
.&Apache::loncommon::help_open_menu('','',3,'Authoring') #FIXME: Broken? Where is it? |
.&Apache::loncommon::help_open_menu('','',3,'Authoring') #FIXME: Broken? Where is it? |
.'<b>'.&mt('Authoring Space:').'</b> ' |
.'<b>'.$title.'</b> ' |
.'<form name="dirs" method="post" action="'.$formaction.'"'.$target.'>' |
.'<form name="dirs" method="post" action="'.$formaction.'"'.$target.'>' |
.&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,$crumbtarget,'/priv/'.$udom,undef,undef); |
.&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,$crumbtarget,'/priv/'.$udom,undef,undef); |
|
|
Line 6069 sub nocodemirror {
|
Line 6090 sub nocodemirror {
|
Input: $uri (optional) |
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 ($uri) = @_; |
my ($uri) = @_; |
my ($is_author,$is_coauthor,$auname,$audom,%editors); |
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 6096 sub permitted_editors {
|
Line 6129 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') && |
} 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)/})) { |
($env{'form.path'} =~ m{^/daxeopen/priv/($match_domain)/($match_username)/})) { |
($audom,$auname) = ($1,$2); |
($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 6129 sub permitted_editors {
|
Line 6175 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 6360 sub bodytag {
|
Line 6419 sub bodytag {
|
|
|
my $funclist; |
my $funclist; |
if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) { |
if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) { |
$bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions($httphost), 'start')."\n". |
unless ($args->{'switchserver'}) { |
Apache::lonmenu::serverform(); |
$bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions($httphost), 'start')."\n". |
my $forbodytag; |
Apache::lonmenu::serverform(); |
&Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, |
my $forbodytag; |
$forcereg,$args->{'group'}, |
&Apache::lonmenu::prepare_functions($env{'request.noversionuri'}, |
$args->{'bread_crumbs'}, |
$forcereg,$args->{'group'}, |
$advtoolsref,'','',\$forbodytag); |
$args->{'bread_crumbs'}, |
unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') { |
$advtoolsref,'','',\$forbodytag); |
$funclist = $forbodytag; |
unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') { |
|
$funclist = $forbodytag; |
|
} |
|
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
} |
} |
} else { |
} else { |
|
|
Line 6376 sub bodytag {
|
Line 6438 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; |
|
} |
|
|
|
my $collapsible; |
if ($args->{'collapsible_header'} ne '') { |
if ($args->{'collapsible_header'} ne '') { |
my $alttext = &mt('menu state: collapsed'); |
$collapsible = 1; |
my $tooltip = &mt('display standard menus'); |
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'}) { |
if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} eq 'construct')) { |
|
unless ($env{'form.inhibitmenu'}) { |
|
$bodytag .= &inline_for_remote($public,$role,$realm,$dc_info,$no_inline_link); |
|
} |
|
} elsif (!$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) { |
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|; |
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|; |
} |
} |
$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 6417 END
|
Line 6502 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 |
if (!$public){ |
if (!$public){ |
unless ($args->{'no_inline_menu'}) { |
unless (($args->{'no_inline_menu'}) || |
|
(($env{'environment.remote'} eq 'on') && |
|
($env{'request.state'} eq 'construct'))) { |
$bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu, |
$bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu, |
$args->{'no_primary_menu'}, |
$args->{'no_primary_menu'}, |
$menucoll,$menuref, |
$menucoll,$menuref, |
Line 6429 END
|
Line 6519 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 6449 END
|
Line 6541 END
|
$bodytag .= $forbodytag; |
$bodytag .= $forbodytag; |
} |
} |
} |
} |
}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 public accessible ressources. |
$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'} ne '') { |
if ($args->{'collapsible_header'} ne '') { |
$bodytag .= $args->{'collapsible_header'}. |
$bodytag .= $args->{'collapsible_header'}. |
Line 6467 END
|
Line 6561 END
|
# Top frame rendering, Remote is up |
# Top frame rendering, Remote is up |
# |
# |
|
|
my $imgsrc = $img; |
my $linkattr; |
if ($img =~ /^\/adm/) { |
if ($args->{'links_disabled'}) { |
$imgsrc = &lonhttpdurl($img); |
$linkattr = 'class="LCisDisabled" aria-disabled="true"'; |
} |
} |
my $upperleft='<img src="'.$imgsrc.'" alt="'.$function.'" />'; |
|
|
|
my $help=($no_inline_link?'' |
my $help=($no_inline_link?'' |
:&Apache::loncommon::top_nav_help('Help')); |
:&top_nav_help('Help',$linkattr)); |
|
|
# Explicit link to get inline menu |
# Explicit link to get inline menu |
my $menu= ($no_inline_link?'' |
my $menu= ($no_inline_link?'' |
:'<a href="/adm/remote?action=collapse" target="_top">'.&mt('Switch to Inline Menu Mode').'</a>'); |
:'<a href="/adm/remote?action=collapse" $linkattr target="_top">'.&mt('Switch to Inline Menu Mode').'</a>'); |
|
|
if ($dc_info) { |
if ($dc_info) { |
$dc_info = qq|<span class="LC_cusr_subheading">($dc_info)</span>|; |
$dc_info = qq|<span class="LC_cusr_subheading">($dc_info)</span>|; |
Line 6486 END
|
Line 6579 END
|
|
|
my $name = &plainname($env{'user.name'},$env{'user.domain'}); |
my $name = &plainname($env{'user.name'},$env{'user.domain'}); |
unless ($public) { |
unless ($public) { |
|
my $class = 'LC_menubuttons_link'; |
|
if ($args->{'links_disabled'}) { |
|
$class .= ' LCisDisabled'; |
|
} |
$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}, |
$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}, |
undef,'LC_menubuttons_link'); |
undef,$class); |
} |
} |
|
|
unless ($env{'form.inhibitmenu'}) { |
unless ($env{'form.inhibitmenu'}) { |
$bodytag .= qq|<div id="LC_nav_bar">$name $role</div> |
$bodytag .= &inline_for_remote($public,$role,$realm,$dc_info,$no_inline_link); |
<ol class="LC_primary_menu LC_floatright LC_right"> |
|
<li>$help</li> |
|
<li>$menu</li> |
|
</ol><div id="LC_realm"> $realm $dc_info</div>|; |
|
} |
|
if ($env{'request.state'} eq 'construct') { |
|
if (!$public){ |
|
if ($env{'request.state'} eq 'construct') { |
|
$funclist = &Apache::lonhtmlcommon::scripttag( |
|
&Apache::lonmenu::utilityfunctions($httphost), 'start'). |
|
&Apache::lonhtmlcommon::scripttag('','end'). |
|
&Apache::lonmenu::innerregister($forcereg, |
|
$args->{'bread_crumbs'}); |
|
} |
|
} |
|
} |
} |
return $bodytag."\n".$funclist; |
return $bodytag."\n".$funclist; |
} |
} |
|
|
|
sub inline_for_remote { |
|
my ($public,$role,$realm,$dc_info,$no_inline_link) = @_; |
|
my $help=($no_inline_link?'' |
|
:&Apache::loncommon::top_nav_help('Help')); |
|
|
|
# Explicit link to get inline menu |
|
my $menu= ($no_inline_link?'' |
|
:'<a href="/adm/remote?action=collapse" target="_top">'.&mt('Switch to Inline Menu Mode').'</a>'); |
|
|
|
if ($dc_info) { |
|
$dc_info = qq|<span class="LC_cusr_subheading">($dc_info)</span>|; |
|
} |
|
|
|
my $name = &plainname($env{'user.name'},$env{'user.domain'}); |
|
unless ($public) { |
|
$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}, |
|
undef,'LC_menubuttons_link'); |
|
} |
|
|
|
return qq|<div id="LC_nav_bar">$name $role</div> |
|
<ol class="LC_primary_menu LC_floatright LC_right"> |
|
<li>$help</li> |
|
<li>$menu</li> |
|
</ol><div id="LC_realm"> $realm $dc_info</div>|; |
|
} |
|
|
sub dc_courseid_toggle { |
sub dc_courseid_toggle { |
my ($dc_info) = @_; |
my ($dc_info) = @_; |
return ' <span id="dccidtext" class="LC_cusr_subheading LC_nobreak">'. |
return ' <span id="dccidtext" class="LC_cusr_subheading LC_nobreak">'. |
Line 6696 body {
|
Line 6804 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 6708 form, .inline {
|
Line 6817 form, .inline {
|
} |
} |
|
|
.LC_menus_content.shown{ |
.LC_menus_content.shown{ |
display: inline; |
display: block; |
} |
} |
|
|
.LC_menus_content.hidden { |
.LC_menus_content.hidden { |
Line 8830 sub headtag {
|
Line 8939 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'}) { |
if ($args->{'force_register'}) { |
Line 8838 sub headtag {
|
Line 8947 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 9034 OFFLOAD
|
Line 9144 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 9236 $args - additional optional args support
|
Line 9350 $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 9401 sub start_page {
|
Line 9520 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'}); |
} |
} |
} |
} |
} elsif (($env{'environment.remote'} eq 'on') && |
} elsif (($env{'environment.remote'} eq 'on') && |
Line 17242 sub init_user_environment {
|
Line 17364 sub init_user_environment {
|
my %is_adv = ( is_adv => $env{'user.adv'} ); |
my %is_adv = ( is_adv => $env{'user.adv'} ); |
my %domdef = &Apache::lonnet::get_domain_defaults($domain); |
my %domdef = &Apache::lonnet::get_domain_defaults($domain); |
|
|
foreach my $tool ('aboutme','blog','webdav','portfolio','timezone') { |
foreach my $tool ('aboutme','blog','webdav','portfolio','portaccess','timezone') { |
$userenv{'availabletools.'.$tool} = |
$userenv{'availabletools.'.$tool} = |
&Apache::lonnet::usertools_access($username,$domain,$tool,'reload', |
&Apache::lonnet::usertools_access($username,$domain,$tool,'reload', |
undef,\%userenv,\%domdef,\%is_adv); |
undef,\%userenv,\%domdef,\%is_adv); |
} |
} |
Line 17264 sub init_user_environment {
|
Line 17386 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'} = |