';
# Do we have a NAV link?
if ($env{'request.course.id'}) {
my $link='/adm/navmaps?postdata='.$escurl.'&postsymb='.
@@ -184,40 +215,44 @@ ENDINLINEMENU
$link="javascript:gonav('".$link."')";
}
$navmaps=(<
-$lt{'nav'}
+
':'').($textinter?'':'');
# =============================================================================
# ============================ This is for URLs that actually can be registered
if (($env{'request.noversionuri'}!~m|^/(res/)*adm/|) || ($forcereg)) {
@@ -378,7 +414,7 @@ sub innerregister {
&Apache::lonnet::allowed('opa',$crs)) {
$hwkadd.=&switch('','',7,3,'pparm.gif','problem[_2]','parms[_2]',
"gocmd('/adm/parmset','set')",
- 'Modify deadlines, etc, for this resource');
+ 'Modify parameter settings for this resource');
}
# -- End Homework
###
@@ -387,19 +423,24 @@ sub innerregister {
###
my $editbutton = '';
if ($env{'user.author'}) {
- if ($env{'request.role'}=~/^(ca|au)/) {
+ if ($env{'request.role'}=~/^(aa|ca|au)/) {
# Set defaults for authors
my ($top,$bottom) = ('con-','struct');
my $action = "go('/priv/".$env{'user.name'}."');";
my $cadom = $env{'request.role.domain'};
my $caname = $env{'user.name'};
- my $desc = "Enter my resource construction space";
+ my $desc = "Enter my construction space";
# Set defaults for co-authors
if ($env{'request.role'} =~ /^ca/) {
- ($cadom,$caname)=($env{'request.role'}=~/(\w+)\/(\w+)$/);
+ ($cadom,$caname)=($env{'request.role'}=~/($match_domain)\/($match_username)$/);
($top,$bottom) = ('co con-','struct');
$action = "go('/priv/".$caname."');";
$desc = "Enter construction space as co-author";
+ } elsif ($env{'request.role'} =~ /^aa/) {
+ ($cadom,$caname)=($env{'request.role'}=~/($match_domain)\/($match_username)$/);
+ ($top,$bottom) = ('co con-','struct');
+ $action = "go('/priv/".$caname."');";
+ $desc = "Enter construction space as assistant co-author";
}
# Check that we are on the correct machine
my $home = &Apache::lonnet::homeserver($caname,$cadom);
@@ -418,7 +459,7 @@ sub innerregister {
my $cfudom='';
if ($env{'request.filename'}) {
my $file=&Apache::lonnet::declutter($env{'request.filename'});
- $file=~s/^(\w+)\/(\w+)/\/priv\/$2/;
+ $file=~s/^($match_domain)\/($match_username)/\/priv\/$2/;
# Check that the user has permission to edit this resource
($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$1);
if (defined($cfudom)) {
@@ -434,13 +475,10 @@ sub innerregister {
# Finally, turn the button on or off
if ($cfile && !$const_space) {
$editbutton=&switch
- ('','',6,1,'cstr.gif','edit[_1]','resource[_2]',
+ ('','',6,1,'pcstr.gif','edit[_1]','resource[_2]',
"go('".$cfile."');","Edit this resource");
} elsif ($editbutton eq '') {
- $editbutton=&switch('','',6,1,'port.gif',
- 'port-[_1]','folio[_1]',
- "go('/adm/portfolio');",
- "Enter my portfolio space");
+ $editbutton=&clear(6,1);
}
}
###
@@ -455,42 +493,63 @@ sub innerregister {
$is_const_dir = 1;
} else {
$currdir =~ s#[^/]+$##;
+ my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn);
+ my $esc_currdir = &Apache::loncommon::escape_single($currdir);
$menuitems=(<
+$inlineremote[21] $inlineremote[23]
+ENDARROWSINLINE
+ if (&hidden_button_check() ne 'yes') {
+ $inlinebuttons .= (<
+ENDINLINEICONS
+ }
+ } else {
+ if ($inlineremote[21] ne '' || $inlineremote[23] ne '') {
+ $inlinebuttons=(<
$inlineremote[21]
$inlineremote[23]
-
$inlineremote[61]
$inlineremote[62]
$inlineremote[63]
-
$inlineremote[71]
$inlineremote[72]
$inlineremote[73]
-
$inlineremote[81]
$inlineremote[82]
$inlineremote[83]
-
$inlineremote[91]
$inlineremote[92]
$inlineremote[93]
-ENDINLINE
- }
+ENDFIRSTLINE
+ }
+ if (&hidden_button_check() ne 'yes') {
+ foreach my $row (6..9) {
+ if ($inlineremote[${row}.'1'] ne ''
+ || $inlineremote[$row.'2'] ne ''
+ || $inlineremote[$row.'3'] ne '') {
+ $inlinebuttons .= <<"ENDLINE";
+
$inlineremote["${row}1"]
$inlineremote["${row}2"]
$inlineremote["${row}3"]
+ENDLINE
+ }
+ }
+ }
+ }
+ }
}
$result =(<
// BEGIN LON-CAPA Internal
$timesync
-$newmail
$tablestart
$inlinebuttons
$tableend
+$newmail
@@ -531,7 +613,7 @@ ENDREGTEXT
# Registered, graphical output
} else {
my $requri=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0]));
- $requri=&Apache::lonenc::check_encrypt(&Apache::lonnet::unescape($requri));
+ $requri=&Apache::lonenc::check_encrypt(&unescape($requri));
my $cursymb=&Apache::lonenc::check_encrypt($env{'request.symb'});
my $navstatus=&get_nav_status();
my $clearcstr;
@@ -624,13 +706,13 @@ ENDDONOTREGTHIS
sub loadevents() {
if ($env{'request.state'} eq 'construct' ||
- $env{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; }
+ $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; }
return 'LONCAPAreg();';
}
sub unloadevents() {
if ($env{'request.state'} eq 'construct' ||
- $env{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; }
+ $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; }
return 'LONCAPAstale();';
}
@@ -646,7 +728,7 @@ sub startupremote {
# The Remote actually gets launched!
#
my $configmenu=&rawconfig();
- my $esclowerurl=&Apache::lonnet::escape($lowerurl);
+ my $esclowerurl=&escape($lowerurl);
my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited');
return(<
@@ -729,9 +811,9 @@ sub load_remote_msg {
if (($env{'browser.interface'} eq 'textual') ||
($env{'environment.remote'} eq 'off')) { return ''; }
- my $esclowerurl=&Apache::lonnet::escape($lowerurl);
+ my $esclowerurl=&escape($lowerurl);
my $link=&mt('Continue on in Inline Menu mode',
- "/adm/remote?action=collapse?url=$esclowerurl");
+ "/adm/remote?action=collapse&url=$esclowerurl");
return(<