[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 20 Jul 2007 23:57:12 -0000
albertel Fri Jul 20 19:57:12 2007 EDT
Modified files:
/loncom/interface loncreateuser.pm
Log:
- eliminate some direct calls to lonnet::critical and use more approriate cput
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.158 loncom/interface/loncreateuser.pm:1.159
--- loncom/interface/loncreateuser.pm:1.158 Fri Jul 20 19:55:12 2007
+++ loncom/interface/loncreateuser.pm Fri Jul 20 19:57:06 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.158 2007/07/20 23:55:12 albertel Exp $
+# $Id: loncreateuser.pm,v 1.159 2007/07/20 23:57:06 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1344,14 +1344,14 @@
if ($2 eq 'st') {
$1=~m{^/($match_domain)/($match_courseid)};
my $cid=$1.'_'.$2;
- $r->print(&mt('Drop from classlist').': <b>'.
- &Apache::lonnet::critical('put:'.
- $env{'course.'.$cid.'.domain'}.':'.
- $env{'course.'.$cid.'.num'}.':classlist:'.
- &escape($env{'form.ccuname'}.':'.
- $env{'form.ccdomain'}).'='.
- &escape($now.':'),
- $env{'course.'.$cid.'.home'}).'</b><br />');
+ my $user = $env{'form.ccuname'}.':'.$env{'form.ccdomain'};
+ my $result =
+ &Apache::lonnet::cput('classlist',
+ { $user => $now },
+ $env{'course.'.$cid.'.domain'},
+ $env{'course.'.$cid.'.num'});
+ $r->print(&mt('Drop from classlist: [_1]',
+ '<b>'.$result.'</b>').'<br />');
}
}
if ($key=~m{^form\.rev\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {
@@ -1371,14 +1371,14 @@
if ($2 eq 'st') {
$1=~m{^/($match_domain)/($match_courseid)};
my $cid=$1.'_'.$2;
- $r->print(&mt('Drop from classlist').': <b>'.
- &Apache::lonnet::critical('put:'.
- $env{'course.'.$cid.'.domain'}.':'.
- $env{'course.'.$cid.'.num'}.':classlist:'.
- &escape($env{'form.ccuname'}.':'.
- $env{'form.ccdomain'}).'='.
- &escape($now.':'),
- $env{'course.'.$cid.'.home'}).'</b><br />');
+ my $user = $env{'form.ccuname'}.':'.$env{'form.ccdomain'};
+ my $result =
+ &Apache::lonnet::cput('classlist',
+ { $user => $now },
+ $env{'course.'.$cid.'.domain'},
+ $env{'course.'.$cid.'.num'});
+ $r->print(&mt('Drop from classlist: [_1]',
+ '<b>'.$result.'</b>').'<br />');
}
}
if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {