[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Thu Jun 27 14:34:22 EDT 2013
raeburn Thu Jun 27 18:34:22 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/lonnet/perl lonnet.pm
Log:
- For 2.11
- Backport 1.1227.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.27 loncom/lonnet/perl/lonnet.pm:1.1172.2.28
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.27 Wed May 29 19:36:56 2013
+++ loncom/lonnet/perl/lonnet.pm Thu Jun 27 18:34:21 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1172.2.27 2013/05/29 19:36:56 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.28 2013/06/27 18:34:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -9604,7 +9604,7 @@
# --------------------------------------------------------- Value of a Variable
sub EXT {
- my ($varname,$symbparm,$udom,$uname,$usection,$recurse)=@_;
+ my ($varname,$symbparm,$udom,$uname,$usection,$recurse,$cid)=@_;
unless ($varname) { return ''; }
#get real user name/domain, courseid and symb
my $courseid;
@@ -9737,8 +9737,11 @@
my ($section, $group, @groups);
my ($courselevelm,$courselevel);
- if ($symbparm && defined($courseid) &&
- $courseid eq $env{'request.course.id'}) {
+ if (($courseid eq '') && ($cid)) {
+ $courseid = $cid;
+ }
+ if (($symbparm && $courseid) &&
+ (($courseid eq $env{'request.course.id'}) || ($courseid eq $cid))) {
#print '<br>'.$space.' - '.$qualifier.' - '.$spacequalifierrest;
@@ -12834,10 +12837,15 @@
=item *
-EXT($varname,$symb,$udom,$uname) : evaluates and returns the value of
-a vairety of different possible values, $varname should be a request
-string, and the other parameters can be used to specify who and what
-one is asking about.
+EXT($varname,$symb,$udom,$uname,$usection,$recurse,$cid) : evaluates
+and returns the value of a variety of different possible values,
+$varname should be a request string, and the other parameters can be
+used to specify who and what one is asking about. Ordinarily, $cid
+does not need to be specified, as it is retrived from
+$env{'request.course.id'}, but &Apache::lonnet::EXT() is called
+within lonuserstate::loadmap() when initializing a course, before
+$env{'request.course.id'} has been set, so it needs to be provided
+in that one case.
Possible values for $varname are environment.lastname (or other item
from the envirnment hash), user.name (or someother aspect about the
More information about the LON-CAPA-cvs
mailing list