--- loncom/interface/lonrequestcourse.pm 2014/01/04 02:10:36 1.74 +++ loncom/interface/lonrequestcourse.pm 2014/01/08 17:18:12 1.76 @@ -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.76 2014/01/08 17:18:12 bisitz 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). '
'. @@ -1540,7 +1549,7 @@ sub print_request_form { if ($result eq 'created') { my $role = 'au'; my $spec = "$role./$env{'form.showdom'}/"; - push(@links,&mt('Enter your authoring space with role: [_1]', + push(@links,&mt('Enter your Authoring Space with role: [_1]', ''. &Apache::lonnet::plaintext($role).'')); } @@ -1615,12 +1624,12 @@ sub print_request_form { sub print_author_prompt { my ($r,$action,$cnum,$showdom,$crstype,$storeresult) = @_; - $r->print('

'.&mt('Access to authoring space').'

'. + $r->print('

'.&mt('Access to Authoring Space').'

'. '

'. &mt('Although assessment items can be created directly inside a course, such items only use part of the assessment capabilities of LON-CAPA.'). '
'. - &mt('By contrast, items created in authoring space, then imported into a course, can use all of the features of the assessment engine.').'

'. - '

'.&mt('Request authoring space access now?'). + &mt('By contrast, items created in Authoring Space, then imported into a course, can use all of the features of the assessment engine.').'

'. + '

'.&mt('Request Authoring Space access now?'). ' '. ''. (' 'x2).