version 1.500, 2020/01/18 04:37:10
|
version 1.502, 2020/02/18 23:10:53
|
Line 1098 if ($env{'browser.mobile'}) {
|
Line 1098 if ($env{'browser.mobile'}) {
|
} |
} |
|
|
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) { |
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) { |
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/}) && ($env{'request.noversionuri'} !~ m{^/uploaded/$match_domain/$match_courseid/docs/}) && ($env{'request.noversionuri'} !~ m{^/adm/.+/ext\.tool$})) { |
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/}) && |
|
($env{'request.noversionuri'} !~ m{^/uploaded/$match_domain/$match_courseid/(docs/|default_\d+\.page$)}) && |
|
($env{'request.noversionuri'} !~ m{^/adm/.+/ext\.tool$})) { |
$menuitems.=(<<ENDREALRES); |
$menuitems.=(<<ENDREALRES); |
s&6&3&catalog.png&Info&info[_1]&catalog_info(currentURL,'$is_mobile')&Show Metadata |
s&6&3&catalog.png&Info&info[_1]&catalog_info(currentURL,'$is_mobile')&Show Metadata |
ENDREALRES |
ENDREALRES |
} |
} |
unless (($env{'request.noversionuri'} =~ m{^/uploaded/$match_domain/$match_courseid/docs/}) || |
unless (($env{'request.noversionuri'} =~ m{^/uploaded/$match_domain/$match_courseid/(docs/|default_\d+\.page$)}) || |
($env{'request.noversionuri'} =~ m{^\Q/adm/wrapper/\E(ext|uploaded)/}) || |
($env{'request.noversionuri'} =~ m{^\Q/adm/wrapper/\E(ext|uploaded)/}) || |
($env{'request.noversionuri'} =~ m{^/adm/.+/ext\.tool$})) { |
($env{'request.noversionuri'} =~ m{^/adm/.+/ext\.tool$})) { |
$menuitems.=(<<ENDREALRES); |
$menuitems.=(<<ENDREALRES); |
Line 1365 sub prepare_functions {
|
Line 1367 sub prepare_functions {
|
if ((($cfile eq '') || (!$editbutton)) && |
if ((($cfile eq '') || (!$editbutton)) && |
($resurl =~ /$LONCAPA::assess_re/)) { |
($resurl =~ /$LONCAPA::assess_re/)) { |
my $showurl = &Apache::lonnet::clutter($resurl); |
my $showurl = &Apache::lonnet::clutter($resurl); |
|
my $crs_sec = $env{'request.course.id'} . (($env{'request.course.sec'} ne '') |
|
? "/$env{'request.course.sec'}" |
|
: ''); |
if ((&Apache::lonnet::allowed('cre','/')) && |
if ((&Apache::lonnet::allowed('cre','/')) && |
(&Apache::lonnet::metadata($resurl,'sourceavail') eq 'open')) { |
(&Apache::lonnet::metadata($resurl,'sourceavail') eq 'open')) { |
$viewsrcbutton = 1; |
$viewsrcbutton = 1; |
} elsif (&Apache::lonnet::allowed('vxc',$env{'request.course.id'})) { |
} elsif (&Apache::lonnet::allowed('vxc',$crs_sec)) { |
if ($showurl =~ m{^\Q/res/$cdom/\E($match_username)/}) { |
if ($showurl =~ m{^\Q/res/$cdom/\E($match_username)/}) { |
my $auname = $1; |
my $auname = $1; |
if (($env{'request.course.adhocsrcaccess'} ne '') && |
if (($env{'request.course.adhocsrcaccess'} ne '') && |
(grep(/^\Q$auname\E$/,split(/,/,$env{'request.course.adhocsrcaccess'})))) { |
(grep(/^\Q$auname\E$/,split(/,/,$env{'request.course.adhocsrcaccess'})))) { |
$viewsrcbutton = 1; |
$viewsrcbutton = 1; |
} elsif ((&Apache::lonnet::metadata($resurl,'sourceavail') eq 'open') && |
} elsif ((&Apache::lonnet::metadata($resurl,'sourceavail') eq 'open') && |
(&Apache::lonnet::allowed('bre','/'))) { |
(&Apache::lonnet::allowed('bre',$crs_sec))) { |
$viewsrcbutton = 1; |
$viewsrcbutton = 1; |
} |
} |
} |
} |