';
+ $roles = ''.$lt{'roles'}.'';
# Do we have a NAV link?
if ($env{'request.course.id'}) {
my $link='/adm/navmaps?postdata='.$escurl.'&postsymb='.
@@ -311,34 +310,35 @@ ENDINLINEMENU
$link="javascript:gonav('".$link."')";
}
$navmaps=(<$lt{'nav'}
+
+$role_selector
+
$form
+
$reg
ENDINLINEMENU
} else {
@@ -493,7 +502,7 @@ sub innerregister {
if ($env{'request.symb'} ne '' &&
$env{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form|task)$/) {
if (&Apache::lonnet::allowed('mgr',$crs)) {
- $hwkadd.=&switch('','',7,2,'pgrd.gif','problem[_1]','grades[_4]',
+ $hwkadd.=&switch('','',7,2,'pgrd.gif','problem[_1]','grades[_3]',
"gocmd('/adm/grades','gradingmenu')",
'Modify user grades for this assessment resource');
} elsif (&Apache::lonnet::allowed('vgr',$crs)) {
@@ -559,19 +568,24 @@ sub innerregister {
my $uploaded;
if ($env{'request.filename'}) {
my $file=&Apache::lonnet::declutter($env{'request.filename'});
- $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)) {
- my $home=&Apache::lonnet::homeserver($cfuname,$cfudom);
- my $allowed=0;
- my @ids=&Apache::lonnet::current_machine_ids();
- foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
- if ($allowed) {
- $cfile=$file;
+ if (defined($cnum) && defined($cdom)) {
+ $uploaded = &is_course_upload($file,$cnum,$cdom);
+ }
+ if (!$uploaded) {
+ $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)) {
+ my $home=&Apache::lonnet::homeserver($cfuname,$cfudom);
+ my $allowed=0;
+ my @ids=&Apache::lonnet::current_machine_ids();
+ foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
+ if ($allowed) {
+ $cfile=$file;
+ }
}
}
- }
+ }
# Finally, turn the button on or off
if ($cfile && !$const_space) {
$editbutton=&switch
@@ -582,7 +596,7 @@ sub innerregister {
$editbutton=&clear(6,1);
}
}
- if (($noeditbutton) && ($env{'request.filename'})) {
+ if (($noeditbutton) && ($env{'request.filename'})) {
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
my $file=&Apache::lonnet::declutter($env{'request.filename'});
if (defined($cnum) && defined($cdom)) {
@@ -615,7 +629,7 @@ sub innerregister {
$menuitems=(<',
- '');
+ my $link=&mt('Continue on in Inline Menu mode',
+ "/adm/remote?action=collapse&url=$esclowerurl");
return(<