version 1.75, 2016/11/22 13:51:29
|
version 1.77, 2017/05/30 15:16:38
|
Line 205 sub handler {
|
Line 205 sub handler {
|
|
|
# permissions checking |
# permissions checking |
my ($allowed,$canedit,$context,$cid); |
my ($allowed,$canedit,$context,$cid); |
if ($env{'form.readfile'} =~ m{^/uploaded/($match_domain)/($match_courseid)/}) { |
if ($env{'form.readfile'} eq '') { |
|
$allowed = 1; |
|
} elsif ($env{'form.readfile'} =~ m{^/uploaded/($match_domain)/($match_courseid)/}) { |
my ($cdom,$cnum) = ($1,$2); |
my ($cdom,$cnum) = ($1,$2); |
$cid = $cdom.'_'.$cnum; |
$cid = $cdom.'_'.$cnum; |
$context = 'course'; |
$context = 'course'; |
Line 219 sub handler {
|
Line 221 sub handler {
|
(&Apache::lonnet::allowed('bro',$env{'form.readfile'}))) { |
(&Apache::lonnet::allowed('bro',$env{'form.readfile'}))) { |
$allowed = 1; |
$allowed = 1; |
} |
} |
} elsif (($env{'form.readfile'} eq '') && ($env{'form.acts'} ne '')) { |
|
$allowed = 1; |
|
} |
} |
if ($allowed) { |
if ($allowed) { |
if ($env{'form.mode'} eq 'rat') { |
if ($env{'form.mode'} eq 'rat') { |
Line 243 sub handler {
|
Line 243 sub handler {
|
|
|
unless ($allowed) { |
unless ($allowed) { |
if ($context eq 'course') { |
if ($context eq 'course') { |
if ($env{'request.course.id'} eq $cid) { |
if ($env{'request.course.id'} eq $cid) { |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |
"/adm/groupsort::0:1:Course environment gone, reinitialize the course"; |
"/adm/groupsort::0:1:Course environment gone, reinitialize the course"; |
} else { |
} else { |
Line 268 sub handler {
|
Line 268 sub handler {
|
} else { |
} else { |
$noedit = &js_escape(&mt('You do not have rights to edit map contents.')); |
$noedit = &js_escape(&mt('You do not have rights to edit map contents.')); |
} |
} |
} |
} |
if (($env{'form.readfile'})) { |
if (($env{'form.readfile'})) { |
$begincondition='if (eval("document.forms.groupsort.include"+num+".checked")) {'; |
$begincondition='if (eval("document.forms.groupsort.include"+num+".checked")) {'; |
$endcondition='}'; |
$endcondition='}'; |
Line 294 ENDSMP
|
Line 294 ENDSMP
|
$finishimport=(<<ENDNO); |
$finishimport=(<<ENDNO); |
function finish_import() { |
function finish_import() { |
alert('$noedit'); |
alert('$noedit'); |
} |
} |
ENDNO |
ENDNO |
} |
} |
} else { |
} else { |