[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm lonmsgdisplay.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 12 Jun 2006 22:55:25 -0000
albertel Mon Jun 12 18:55:25 2006 EDT
Modified files:
/loncom/interface lonmsg.pm lonmsgdisplay.pm
Log:
- braak at the notes adding lines, for use elsewhere
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.184 loncom/interface/lonmsg.pm:1.185
--- loncom/interface/lonmsg.pm:1.184 Tue May 30 08:46:09 2006
+++ loncom/interface/lonmsg.pm Mon Jun 12 18:55:23 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.184 2006/05/30 12:46:09 www Exp $
+# $Id: lonmsg.pm,v 1.185 2006/06/12 22:55:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -354,6 +354,18 @@
return %returnhash;
}
+# ====================================== Add a comment to the User Notes screen
+
+sub store_instructor_comment {
+ my ($msg,$uname,$udom) = @_;
+ my $cid = $env{'request.course.id'};
+ my $cnum = $env{'course.'.$cid.'.num'};
+ my $cdom = $env{'course.'.$cid.'.domain'};
+ my $subject= &mt('Record').' ['.$uname.':'.$udom.']';
+ my $result = &user_normal_msg_raw($cnum,$cdom,$subject,$msg);
+ return $result;
+}
+
# ================================================== Critical message to a user
sub user_crit_msg_raw {
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.30 loncom/interface/lonmsgdisplay.pm:1.31
--- loncom/interface/lonmsgdisplay.pm:1.30 Tue May 30 16:09:25 2006
+++ loncom/interface/lonmsgdisplay.pm Mon Jun 12 18:55:23 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.30 2006/05/30 20:09:25 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.31 2006/06/12 22:55:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1058,13 +1058,9 @@
($env{'form.recdomain'}) && ($env{'form.recuname'})) {
chomp($env{'form.newrecord'});
if ($env{'form.newrecord'}) {
- my $recordtxt = $env{'form.newrecord'};
- &Apache::lonmsg::user_normal_msg_raw(
- $env{'course.'.$env{'request.course.id'}.'.num'},
- $env{'course.'.$env{'request.course.id'}.'.domain'},
- &mt('Record').
- ' ['.$env{'form.recuname'}.':'.$env{'form.recdomain'}.']',
- $recordtxt);
+ &Apache::lonmsg::store_instructor_comment($env{'form.newrecord'},
+ $env{'form.recuname'},
+ $env{'form.recdomain'});
}
$r->print('<h3>'.&Apache::loncommon::plainname($env{'form.recuname'},
$env{'form.recdomain'}).'</h3>');