version 1.549, 2024/04/19 03:48:22
|
version 1.552, 2024/05/13 13:55:51
|
Line 910 sub innerregister {
|
Line 910 sub innerregister {
|
my ($forcereg,$bread_crumbs,$group,$pagebuttonshide,$hostname, |
my ($forcereg,$bread_crumbs,$group,$pagebuttonshide,$hostname, |
$ltiscope,$ltiuri,$showncrumbsref) = @_; |
$ltiscope,$ltiuri,$showncrumbsref) = @_; |
my $const_space = ($env{'request.state'} eq 'construct'); |
my $const_space = ($env{'request.state'} eq 'construct'); |
my $is_const_dir = 0; |
|
my $in_daxe = 0; |
my $in_daxe = 0; |
|
|
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; } |
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; } |
Line 1236 END
|
Line 1235 END
|
# End course context |
# End course context |
|
|
# Prepare the rest of the buttons |
# Prepare the rest of the buttons |
my ($menuitems,$got_prt,$got_wishlist,$crsauthor); |
my ($menuitems,$got_prt,$got_wishlist,$crsauthor,$toplevel_cstr,$crsauthor_cstr); |
if ($const_space) { |
if ($const_space) { |
# |
# |
# We are in construction space |
# We are in construction space |
# |
# |
Line 1245 END
|
Line 1244 END
|
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
my ($udom,$uname,$thisdisfn) = |
my ($udom,$uname,$thisdisfn) = |
($env{'request.filename'}=~m{^\Q$londocroot/priv/\E([^/]+)/([^/]+)/(.*)$}); |
($env{'request.filename'}=~m{^\Q$londocroot/priv/\E([^/]+)/([^/]+)/(.*)$}); |
my $crsauthor; |
|
if (($env{'request.course.id'}) && |
if (($env{'request.course.id'}) && |
($env{'course.'.$env{'request.course.id'}.'.num'} eq $uname) && |
($env{'course.'.$env{'request.course.id'}.'.num'} eq $uname) && |
($env{'course.'.$env{'request.course.id'}.'.domain'} eq $udom)) { |
($env{'course.'.$env{'request.course.id'}.'.domain'} eq $udom)) { |
$crsauthor = 1; |
$crsauthor_cstr = 1; |
} |
} |
my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn; |
my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn; |
if ($currdir =~ m-/$-) { |
if ($currdir =~ m-/$-) { |
$is_const_dir = 1; |
if ($thisdisfn eq '') { |
if (($thisdisfn eq '') && ($crsauthor)) { |
$toplevel_cstr = 1; |
$is_const_dir = 2; |
|
} |
} |
my $esc_currdir = &Apache::loncommon::escape_single($currdir); |
my $esc_currdir = &Apache::loncommon::escape_single($currdir); |
$menuitems=(<<ENDMENUITEMS); |
$menuitems=(<<ENDMENUITEMS); |
Line 1264 s&7&4&docs-22x22.png&Edit Metadata&defau
|
Line 1261 s&7&4&docs-22x22.png&Edit Metadata&defau
|
s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','$esc_currdir')&Print contents of directory |
s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','$esc_currdir')&Print contents of directory |
s&7&1&del.png&Delete&dir[_3]&gocstr('/adm/cfile?action=delete','$esc_currdir')&Delete this Directory |
s&7&1&del.png&Delete&dir[_3]&gocstr('/adm/cfile?action=delete','$esc_currdir')&Delete this Directory |
ENDMENUITEMS |
ENDMENUITEMS |
|
unless ($crsauthor_cstr) { |
|
if ($env{'environment.authorarchive'}) { |
|
$menuitems .= (<<ENDMENUITEMS); |
|
s&7&7&archive.png&Export&dir[_1]&gocstr('/adm/authorexport','$esc_currdir')&Export Authoring Space Archive |
|
ENDMENUITEMS |
|
} |
|
} |
} else { |
} else { |
$currdir =~ s|[^/]+$||; |
$currdir =~ s|[^/]+$||; |
my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn); |
my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn); |
Line 1278 ENDMENUITEMS
|
Line 1282 ENDMENUITEMS
|
# |
# |
# Probably should be in mydesk.tab |
# Probably should be in mydesk.tab |
# |
# |
if (($crsauthor) && ($pubfile eq "/res/$udom/$uname/default.rights")) { |
if (($crsauthor_cstr) && ($pubfile eq "/res/$udom/$uname/default.rights")) { |
$menuitems=(<<ENDMENUITEMS); |
$menuitems=(<<ENDMENUITEMS); |
s&6&1&list.png&Directory&dir[_1]&golist('$esc_currdir')&List current directory |
s&6&1&list.png&Directory&dir[_1]&golist('$esc_currdir')&List current directory |
s&6&3&pub.png&Publish&resource[_3]&gocstr('/adm/publish','/priv/$udom/$uname/$cleandisfn')&Publish this resource |
s&6&3&pub.png&Publish&resource[_3]&gocstr('/adm/publish','/priv/$udom/$uname/$cleandisfn')&Publish this resource |
Line 1308 ENDMENUITEMS
|
Line 1312 ENDMENUITEMS
|
s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','/priv/$udom/$uname/$cleandisfn')&Prepare a printable document |
s&7&2&prt.png&Print&printout[_1]&gocstr('/adm/printout','/priv/$udom/$uname/$cleandisfn')&Prepare a printable document |
ENDMENUITEMS |
ENDMENUITEMS |
} |
} |
} |
|
# |
# |
# "Exit Daxe" in Functions menu when using Daxe |
# "Exit Daxe" in Functions menu when using Daxe |
# |
# |
Line 1326 s&7&6&tolastloc.png&Exit Daxe&resource[_
|
Line 1329 s&7&6&tolastloc.png&Exit Daxe&resource[_
|
ENDMENUITEMS |
ENDMENUITEMS |
} |
} |
} |
} |
|
} |
# |
# |
# Editing options usually accessed via "Settings" in inline menu need to be |
# Editing options usually accessed via "Settings" in inline menu need to be |
# accessed in a different way, when Authoring Space is accessed in course |
# accessed in a different way, when Authoring Space is accessed in course |
Line 1576 ENDMENUITEMS
|
Line 1580 ENDMENUITEMS
|
} |
} |
} |
} |
my ($topic_help,$topic_help_text); |
my ($topic_help,$topic_help_text); |
if ($is_const_dir == 2) { |
if ($toplevel_cstr && !$crsauthor_cstr) { |
if ((($ENV{'SERVER_PORT'} == 443) || |
if ((($ENV{'SERVER_PORT'} == 443) || |
($Apache::lonnet::protocol{$Apache::lonnet::perlvar{'lonHostID'}} eq 'https')) && |
($Apache::lonnet::protocol{$Apache::lonnet::perlvar{'lonHostID'}} eq 'https')) && |
(&Apache::lonnet::usertools_access($env{'user.name'},$env{'user.domain'},'webdav'))) { |
(&Apache::lonnet::usertools_access($env{'user.name'},$env{'user.domain'},'webdav'))) { |
Line 1899 sub advtools_crumbs {
|
Line 1903 sub advtools_crumbs {
|
} elsif ($env{'request.noversionuri'} !~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { |
} elsif ($env{'request.noversionuri'} !~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
&Apache::lonhtmlcommon::add_breadcrumb_tool( |
&Apache::lonhtmlcommon::add_breadcrumb_tool( |
'advtools', @funcs[61,73,74,71,72]); |
'advtools', @funcs[61,73,74,71,72,77]); |
} else { |
} else { |
&Apache::lonhtmlcommon::add_breadcrumb_tool( |
&Apache::lonhtmlcommon::add_breadcrumb_tool( |
'advtools', @funcs[61,71,72,73,74,75,92]); |
'advtools', @funcs[61,71,72,73,74,75,92]); |