[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 30 Apr 2008 23:36:57 -0000
raeburn Wed Apr 30 19:36:57 2008 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
Bug 5176.
- pass $context as additional argument to lonnet::assignrole() and lonnet::modify_student_enrollment() to include in record in the nohist_rolelog.db for the course.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.651 loncom/interface/loncommon.pm:1.652
--- loncom/interface/loncommon.pm:1.651 Fri Mar 28 17:05:28 2008
+++ loncom/interface/loncommon.pm Wed Apr 30 19:36:56 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.651 2008/03/28 21:05:28 www Exp $
+# $Id: loncommon.pm,v 1.652 2008/04/30 23:36:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8018,7 +8018,7 @@
$output = &mt('Assigning').' '.$three.' in '.$url.
($start?', '.&mt('starting').' '.localtime($start):'').
($end?', '.&mt('ending').' '.localtime($end):'').': ';
- my $result = &Apache::lonnet::assignrole($udom,$uname,$url,$three,$end,$start);
+ my $result = &Apache::lonnet::assignrole($udom,$uname,$url,$three,$end,$start,'','',$context);
if ($context eq 'auto') {
$output .= $result.$linefeed;
} else {
@@ -8053,7 +8053,7 @@
}
$oldsecurl = $uurl;
$expire_role_result =
- &Apache::lonnet::assignrole($udom,$uname,$uurl,'st',$now);
+ &Apache::lonnet::assignrole($udom,$uname,$uurl,'st',$now,'','',$context);
if ($env{'request.course.sec'} ne '') {
if ($expire_role_result eq 'refused') {
my @roles = ('st');
@@ -8076,7 +8076,7 @@
}
}
if (($expire_role_result eq 'ok') || ($secchange == 0)) {
- $modify_section_result = &Apache::lonnet::modify_student_enrollment($udom,$uname,undef,undef,undef,undef,undef,$sec,$end,$start,'','',$cid);
+ $modify_section_result = &Apache::lonnet::modify_student_enrollment($udom,$uname,undef,undef,undef,undef,undef,$sec,$end,$start,'','',$cid,'',$context);
if ($modify_section_result =~ /^ok/) {
if ($secchange == 1) {
if ($sec eq '') {