[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 07 Jun 2005 18:19:34 -0000
www Tue Jun 7 14:19:34 2005 EDT
Modified files:
/loncom/interface lonmsg.pm
Log:
Only have grds and pprm links show if looking at resource message
Sorry for the syntax-bug submit
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.150 loncom/interface/lonmsg.pm:1.151
--- loncom/interface/lonmsg.pm:1.150 Tue Jun 7 11:26:51 2005
+++ loncom/interface/lonmsg.pm Tue Jun 7 14:19:32 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.150 2005/06/07 15:26:51 albertel Exp $
+# $Id: lonmsg.pm,v 1.151 2005/06/07 18:19:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1795,16 +1795,14 @@
$r->print('</tr></table>');
if ($env{'user.adv'}) {
$r->print('<table border="2" width="100%"><tr bgcolor="#FFAAAA"><td>'.&mt('Currently available actions (will open extra window)').':</td>');
-
+ my $symb=&Apache::lonnet::symbread($content{'baseurl'});
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
$r->print('<td><b>'.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').'</b></td>');
}
- if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
- my $symb=&Apache::lonnet::symbread($content{'baseurl'});
+ if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) {
$r->print('<td><b>'.&Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>');
}
- if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) {
- my $symb=&Apache::lonnet::symbread($content{'baseurl'});
+ if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) {
$r->print('<td><b>'.&Apache::loncommon::pgrdlink(&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>');
}
$r->print('</tr></table>');