[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface loncreateuser.pm
raeburn
raeburn@source.lon-capa.org
Wed, 20 Jan 2010 02:57:09 -0000
raeburn Wed Jan 20 02:57:09 2010 EDT
Modified files: (Branch: version_2_9_X)
/loncom/interface loncreateuser.pm
Log:
- Backport 1.332.
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.295.2.26 loncom/interface/loncreateuser.pm:1.295.2.27
--- loncom/interface/loncreateuser.pm:1.295.2.26 Tue Jan 19 23:41:43 2010
+++ loncom/interface/loncreateuser.pm Wed Jan 20 02:57:09 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.295.2.26 2010/01/19 23:41:43 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.295.2.27 2010/01/20 02:57:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -219,7 +219,7 @@
sub build_tools_display {
my ($ccuname,$ccdomain,$context) = @_;
my (@usertools,%userenv,$output,@options,%validations,%reqtitles,%reqdisplay,
- $colspan);
+ $colspan,$isadv,%domconfig);
my %lt = &Apache::lonlocal::texthash (
'blog' => "Personal User Blog",
'aboutme' => "Personal Information Page",
@@ -241,6 +241,9 @@
%reqtitles = &courserequest_titles();
%reqdisplay = &courserequest_display();
$colspan = ' colspan="2"';
+ %domconfig =
+ &Apache::lonnet::get_dom('configuration',['requestcourses'],$ccdomain);
+ $isadv = &Apache::lonnet::is_advanced_user($ccuname,$ccdomain);
} else {
%userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
'tools.aboutme','tools.portfolio','tools.blog');
@@ -287,7 +290,14 @@
&Apache::loncommon::start_data_table_row()."\n";
if ($context eq 'requestcourses') {
my ($curroption,$currlimit);
- $curroption = $userenv{$context.'.'.$item};
+ if ($userenv{$context.'.'.$item} ne '') {
+ $curroption = $userenv{$context.'.'.$item};
+ } else {
+ my (@inststatuses);
+ $curroption =
+ &Apache::loncoursequeueadmin::get_processtype($ccuname,$ccdomain,$isadv,$ccdomain,
+ $item,\@inststatuses,\%domconfig);
+ }
if (!$curroption) {
$curroption = 'norequest';
}