[LON-CAPA-cvs] cvs: loncom /interface lonsource.pm
raeburn
raeburn at source.lon-capa.org
Mon Feb 3 14:02:19 EST 2020
raeburn Mon Feb 3 19:02:19 2020 EDT
Modified files:
/loncom/interface lonsource.pm
Log:
- Arg was missing from calls to lonnet::metadata added in 1.37 and 1.38.
Index: loncom/interface/lonsource.pm
diff -u loncom/interface/lonsource.pm:1.38 loncom/interface/lonsource.pm:1.39
--- loncom/interface/lonsource.pm:1.38 Sat Oct 7 21:07:17 2017
+++ loncom/interface/lonsource.pm Mon Feb 3 19:02:18 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Source Code handler
#
-# $Id: lonsource.pm,v 1.38 2017/10/07 21:07:17 raeburn Exp $
+# $Id: lonsource.pm,v 1.39 2020/02/03 19:02:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -358,7 +358,7 @@
$filename =~ s/\~//g;
$filename =~ s/\/+/\//g;
if (($env{'request.course.id'}) && (&Apache::lonnet::is_on_map($filename))) {
- if ((&Apache::lonnet::metadata(&Apache::lonenc::check_decrypt($filename)) eq 'open') &&
+ if ((&Apache::lonnet::metadata(&Apache::lonenc::check_decrypt($filename),'sourceavail') eq 'open') &&
(&Apache::lonnet::allowed('cre','/'))) {
$canview = 1;
} elsif (&Apache::lonnet::allowed('vxc',$env{'request.course.id'})) {
@@ -369,7 +369,7 @@
if (($auname ne '') && ($env{'request.course.adhocsrcaccess'} ne '') &&
(grep(/^\Q$auname\E$/,split(/,/,$env{'request.course.adhocsrcaccess'})))) {
$canview = 1;
- } elsif ((&Apache::lonnet::metadata($filename) eq 'open') &&
+ } elsif ((&Apache::lonnet::metadata($filename,'sourceavail') eq 'open') &&
($filename =~ m{^\Q/res/$cdom/}) &&
(&Apache::lonnet::allowed('bre','/'))) {
$canview = 1;
More information about the LON-CAPA-cvs
mailing list