version 1.1421, 2023/11/19 21:28:17
|
version 1.1425, 2023/12/31 23:03:40
|
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 2443 END
|
Line 2441 END
|
|
|
=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 2454 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 2471 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 2488 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 2504 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 6590 sub nocodemirror {
|
Line 6593 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. |
Line 6605 Returns: %editors hash in which keys are
|
Line 6608 Returns: %editors hash in which keys are
|
=cut |
=cut |
|
|
sub permitted_editors { |
sub permitted_editors { |
|
my ($uri) = @_; |
my ($is_author,$is_coauthor,$auname,$audom,%editors); |
my ($is_author,$is_coauthor,$auname,$audom,%editors); |
if ($env{'request.role'} =~ m{^au\./}) { |
if ($env{'request.role'} =~ m{^au\./}) { |
$is_author = 1; |
$is_author = 1; |
Line 6623 sub permitted_editors {
|
Line 6627 sub permitted_editors {
|
($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/($match_domain)/($match_username)/})) { |
|
($audom,$auname) = ($1,$2); |
} |
} |
if (($audom ne '') && ($auname ne '')) { |
if (($audom ne '') && ($auname ne '')) { |
if (($env{'user.domain'} eq $audom) && |
if (($env{'user.domain'} eq $audom) && |
Line 6883 sub bodytag {
|
Line 6890 sub bodytag {
|
$bodytag .= Apache::lonhtmlcommon::scripttag( |
$bodytag .= Apache::lonhtmlcommon::scripttag( |
Apache::lonmenu::utilityfunctions($httphost), 'start'); |
Apache::lonmenu::utilityfunctions($httphost), 'start'); |
|
|
if ($args->{'collapsible_header'}) { |
if ($args->{'collapsible_header'} ne '') { |
my $alttext = &mt('menu state: collapsed'); |
my $alttext = &mt('menu state: collapsed'); |
my $tooltip = &mt('display standard menus'); |
my $tooltip = &mt('display standard menus'); |
$bodytag .= <<"END"; |
$bodytag .= <<"END"; |
Line 6956 END
|
Line 6963 END
|
$bodytag .= '<hr style="clear:both" />'; |
$bodytag .= '<hr style="clear:both" />'; |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
$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; |