[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmsg.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 06 Jun 2005 20:31:26 -0000
www Mon Jun 6 16:31:26 2005 EDT
Modified files:
/loncom/interface loncommon.pm lonmsg.pm
Log:
Use existing functions
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.266 loncom/interface/loncommon.pm:1.267
--- loncom/interface/loncommon.pm:1.266 Mon Jun 6 15:51:05 2005
+++ loncom/interface/loncommon.pm Mon Jun 6 16:31:24 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.266 2005/06/06 19:51:05 www Exp $
+# $Id: loncommon.pm,v 1.267 2005/06/06 20:31:24 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2000,52 +2000,6 @@
return qq{<a href="$link" title="$title" $target>$linktext</a>};
}
-# --------------------------------------------------------- Links into grading, etc
-
-sub parm_direct_link {
- my ($linktext,$sname,$sdom,$symb,$target)=@_;
- unless ($sname) { return ''; }
- unless ($sdom) { return ''; }
- unless ($symb) { return ''; }
-
- my $link ="/adm/parmset";
- my $title = 'Change parameters';
- if (defined($sname) && $sname !~ /^\s*$/ &&
- defined($sdom) && $sdom !~ /^\s*$/) {
- $link .= "?uname=$sname&udom=$sdom&action=settable&symb=".
- &Apache::lonnet::escape($symb);
- }
- if (defined($target) && $target !~ /^\s*$/) {
- $target = qq{target="$target"};
- } else {
- $target = '';
- }
- return qq{<a href="$link" title="$title" $target>$linktext</a>};
-}
-
-sub grds_direct_link {
- my ($linktext,$sname,$sdom,$symb,$target)=@_;
- unless ($sname) { return ''; }
- unless ($sdom) { return ''; }
- unless ($symb) { return ''; }
- my $url=(&Apache::lonnet::decode_symb($symb))[2];
- my $link ="/adm/grades";
- my $title = 'Change grades';
- if (defined($sname) && $sname !~ /^\s*$/ &&
- defined($sdom) && $sdom !~ /^\s*$/) {
- $link .= "?stuinfo=$sname:$sdom&symb=".
- &Apache::lonnet::escape($symb)."&url=".
- &Apache::lonnet::escape($url).
- "&showgrading=yes&lastsub=all&vProp=yes&vAns=yes&command=processGroup";
- }
- if (defined($target) && $target !~ /^\s*$/) {
- $target = qq{target="$target"};
- } else {
- $target = '';
- }
- return qq{<a href="$link" title="$title" $target>$linktext</a>};
-}
-
=pod
=back
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.146 loncom/interface/lonmsg.pm:1.147
--- loncom/interface/lonmsg.pm:1.146 Mon Jun 6 15:51:05 2005
+++ loncom/interface/lonmsg.pm Mon Jun 6 16:31:24 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.146 2005/06/06 19:51:05 www Exp $
+# $Id: lonmsg.pm,v 1.147 2005/06/06 20:31:24 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1798,11 +1798,11 @@
}
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
my $symb=&Apache::lonnet::symbread($content{'baseurl'});
- $r->print('<td><b>'.&Apache::loncommon::parm_direct_link(&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>');
+ $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'});
- $r->print('<td><b>'.&Apache::loncommon::grds_direct_link(&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>');
+ $r->print('<td><b>'.&Apache::loncommon::pgrdlink(&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'</b></td>');
}
$r->print('</tr></table>');
}