[LON-CAPA-cvs] cvs: loncom / lontrans.pm
raeburn
raeburn at source.lon-capa.org
Sat Jan 13 13:58:33 EST 2018
raeburn Sat Jan 13 18:58:33 2018 EDT
Modified files:
/loncom lontrans.pm
Log:
- Display a listing of the folder's contents when deep-linking is to a
folder not a resource.
Index: loncom/lontrans.pm
diff -u loncom/lontrans.pm:1.18 loncom/lontrans.pm:1.19
--- loncom/lontrans.pm:1.18 Fri Jan 12 13:34:08 2018
+++ loncom/lontrans.pm Sat Jan 13 18:58:33 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network
# URL translation for User Files
#
-# $Id: lontrans.pm,v 1.18 2018/01/12 13:34:08 raeburn Exp $
+# $Id: lontrans.pm,v 1.19 2018/01/13 18:58:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -103,10 +103,21 @@
}
if ((&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i) &&
(!$env{'request.role.adv'})) {
- $realuri = &Apache::lonenc::encrypted(&Apache::lonnet::clutter($url)).
- '?symb='.&Apache::lonenc::encrypted($symb);
+ $realuri = &Apache::lonenc::encrypted(&Apache::lonnet::clutter($url));
+ if (($url =~ /\.sequence$/) &&
+ ($env{'course.'.$env{'request.course.id'}.'.type'} ne 'Placement')) {
+ $realuri .= '?navmap=1';
+ } else {
+ $realuri .= '?symb='.&Apache::lonenc::encrypted($symb);
+ }
} else {
- $realuri = &Apache::lonnet::clutter($url).'?symb='.$symb;
+ $realuri = &Apache::lonnet::clutter($url);
+ if (($url =~ /\.sequence$/) &&
+ ($env{'course.'.$env{'request.course.id'}.'.type'} ne 'Placement')) {
+ $realuri .= '?navmap=1';
+ } else {
+ $realuri .= '?symb='.$symb;
+ }
}
my $host = $r->headers_in->get('Host');
if ($host) {
More information about the LON-CAPA-cvs
mailing list