--- rat/lonpage.pm 2020/03/04 16:33:31 1.135
+++ rat/lonpage.pm 2020/03/05 19:24:35 1.137
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.135 2020/03/04 16:33:31 raeburn Exp $
+# $Id: lonpage.pm,v 1.137 2020/03/05 19:24:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -939,20 +939,26 @@ ENDEXT
sub get_buttons {
my ($hash,$rid,$buttonshide,$hostname) = @_;
- my $metainfo = '';
- my $esrc=&Apache::lonnet::declutter($hash->{'src_'.$rid});
my ($mapid,$resid)=split(/\./,$rid);
my $symb=&Apache::lonnet::encode_symb($hash->{'map_id_'.$mapid},
$resid,
$hash->{'src_'.$rid});
+ my $aname;
+ if (($hash->{'encrypted_'.$rid}) && (!$env{'request.role.adv'})) {
+ $aname = 'LC_'.$rid;
+ } else {
+ $aname = &escape($symb);
+ }
+ my $metainfo = '';
unless ($env{'request.role.adv'}) {
if ($buttonshide->{$symb} eq 'yes') {
- return;
+ return $metainfo;
}
}
my $crs_sec = $env{'request.course.id'} . (($env{'request.course.sec'} ne '')
? "/$env{'request.course.sec'}"
: '');
+ my $esrc=&Apache::lonnet::declutter($hash->{'src_'.$rid});
if ($hash->{'encrypted_'.$rid}) {
$esrc=&Apache::lonenc::encrypted($esrc);
}
@@ -961,8 +967,8 @@ sub get_buttons {
&& !$env{'request.enc'}
&& ($env{'request.role.adv'}
|| !$hash->{'encrypted_'.$rid})) {
- $metainfo .=''.
- ''.
+ $metainfo .= ''.
''.