--- loncom/interface/lonuserutils.pm 2009/11/12 15:58:22 1.104
+++ loncom/interface/lonuserutils.pm 2009/11/18 21:32:41 1.105
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.104 2009/11/12 15:58:22 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.105 2009/11/18 21:32:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1956,13 +1956,17 @@ sub process_coursepick {
my $coursefilter = $env{'form.coursepick'};
my $cdom = $env{'request.role.domain'};
my %courses;
+ my $crssrch = 'Course';
+ if ($env{'form.roletype'} eq 'community') {
+ $crssrch = 'Community';
+ }
if ($coursefilter eq 'all') {
%courses = &Apache::lonnet::courseiddump($cdom,'.','.','.','.','.',
- undef,undef,'Course');
+ undef,undef,$crssrch);
} elsif ($coursefilter eq 'category') {
my $instcode = &instcode_from_coursefilter();
%courses = &Apache::lonnet::courseiddump($cdom,'.','.',$instcode,'.','.',
- undef,undef,'Course');
+ undef,undef,$crssrch);
} elsif ($coursefilter eq 'specific') {
if ($env{'form.coursetotal'} > 1) {
my @course_ids = split(/&&/,$env{'form.courselist'});
@@ -2147,7 +2151,7 @@ END
} elsif ($context eq 'domain') {
if ($setting eq 'community') {
$crstype = 'Community';
- } elsif ($crstype eq 'course') {
+ } elsif ($setting eq 'course') {
$crstype = 'Course';
}
}
@@ -2298,7 +2302,11 @@ END
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll' || $mode eq 'pickauthor') {
if ($mode ne 'autoenroll' && $mode ne 'pickauthor') {
if ($permission->{'cusr'}) {
- $actionselect = &select_actions($context,$setting,$statusmode,$formname);
+ unless (($context eq 'domain') &&
+ (($setting eq 'course') || ($setting eq 'community'))) {
+ $actionselect =
+ &select_actions($context,$setting,$statusmode,$formname);
+ }
}
$r->print(<