--- loncom/interface/lonrequestcourse.pm 2014/01/04 02:10:36 1.74 +++ loncom/interface/lonrequestcourse.pm 2014/01/05 10:55:35 1.75 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.74 2014/01/04 02:10:36 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.75 2014/01/05 10:55:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -817,7 +817,7 @@ END return true; } END - my ($pagetitle,$pageinfo,$domaintitle); + my ($pagetitle,$pageinfo,$domaintitle,$earlyout); if (ref($can_request) eq 'HASH') { if (($can_request->{'official'}) || ($can_request->{'unofficial'}) || $can_request->{'textbook'}) { if ($can_request->{'community'}) { @@ -833,15 +833,24 @@ END $pagetitle = 'Community Requests'; $pageinfo = &mt('Request creation of a new course, or review your pending requests.'); $domaintitle = &mt('Community Domain'); - } else { + } elsif ((ref($incdoms) eq 'ARRAY') && ((@{$incdoms} > 1) || + ((@{$incdoms} == 1) && ($incdoms->[0] ne $dom)))) { $pagetitle = 'Course/Community Requests'; $pageinfo = &mt('You do not have rights to request creation of courses in this domain; please choose a different domain.'); $domaintitle = &mt('Course/Community Domain'); + } else { + $pagetitle = 'Course/Community Requests'; + $pageinfo = &mt('You do not have rights to request creation of courses or communities.'); + $earlyout = 1; } } $r->print(&header($pagetitle,$js.$jscript,$loaditems).$crumb. - '

'.$pageinfo.'

'. - '
'. + '

'.$pageinfo.'

'); + if ($earlyout) { + $r->print(&Apache::loncommon::end_page()); + return; + } + $r->print('
'. &Apache::lonhtmlcommon::start_pick_box(). &Apache::lonhtmlcommon::row_title($domaintitle). '
'.