version 1.74, 2014/01/04 02:10:36
|
version 1.77, 2014/04/09 10:50:07
|
Line 817 END
|
Line 817 END
|
return true; |
return true; |
} |
} |
END |
END |
my ($pagetitle,$pageinfo,$domaintitle); |
my ($pagetitle,$pageinfo,$domaintitle,$earlyout); |
if (ref($can_request) eq 'HASH') { |
if (ref($can_request) eq 'HASH') { |
if (($can_request->{'official'}) || ($can_request->{'unofficial'}) || $can_request->{'textbook'}) { |
if (($can_request->{'official'}) || ($can_request->{'unofficial'}) || $can_request->{'textbook'}) { |
if ($can_request->{'community'}) { |
if ($can_request->{'community'}) { |
Line 833 END
|
Line 833 END
|
$pagetitle = 'Community Requests'; |
$pagetitle = 'Community Requests'; |
$pageinfo = &mt('Request creation of a new course, or review your pending requests.'); |
$pageinfo = &mt('Request creation of a new course, or review your pending requests.'); |
$domaintitle = &mt('Community Domain'); |
$domaintitle = &mt('Community Domain'); |
} else { |
} elsif ((ref($incdoms) eq 'ARRAY') && ((@{$incdoms} > 1) || |
|
((@{$incdoms} == 1) && ($incdoms->[0] ne $dom)))) { |
$pagetitle = 'Course/Community Requests'; |
$pagetitle = 'Course/Community Requests'; |
$pageinfo = &mt('You do not have rights to request creation of courses in this domain; please choose a different domain.'); |
$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'); |
$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. |
$r->print(&header($pagetitle,$js.$jscript,$loaditems).$crumb. |
'<p>'.$pageinfo.'</p>'. |
'<p>'.$pageinfo.'</p>'); |
'<div>'. |
if ($earlyout) { |
|
$r->print(&Apache::loncommon::end_page()); |
|
return; |
|
} |
|
$r->print('<div>'. |
&Apache::lonhtmlcommon::start_pick_box(). |
&Apache::lonhtmlcommon::start_pick_box(). |
&Apache::lonhtmlcommon::row_title($domaintitle). |
&Apache::lonhtmlcommon::row_title($domaintitle). |
'<form name="domforcourse" method="post" action="/adm/requestcourse">'. |
'<form name="domforcourse" method="post" action="/adm/requestcourse">'. |
Line 1540 sub print_request_form {
|
Line 1549 sub print_request_form {
|
if ($result eq 'created') { |
if ($result eq 'created') { |
my $role = 'au'; |
my $role = 'au'; |
my $spec = "$role./$env{'form.showdom'}/"; |
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]', |
'<a href="/adm/roles?selectrole=1&'.$spec.'=1">'. |
'<a href="/adm/roles?selectrole=1&'.$spec.'=1">'. |
&Apache::lonnet::plaintext($role).'</a>')); |
&Apache::lonnet::plaintext($role).'</a>')); |
} |
} |
Line 1615 sub print_request_form {
|
Line 1624 sub print_request_form {
|
|
|
sub print_author_prompt { |
sub print_author_prompt { |
my ($r,$action,$cnum,$showdom,$crstype,$storeresult) = @_; |
my ($r,$action,$cnum,$showdom,$crstype,$storeresult) = @_; |
$r->print('<h3>'.&mt('Access to authoring space').'</h3>'. |
$r->print('<h3>'.&mt('Access to Authoring Space').'</h3>'. |
'<p>'. |
'<p>'. |
&mt('Although assessment items can be created directly inside a course, such items only use part of the assessment capabilities of LON-CAPA.'). |
&mt('Although assessment items can be created directly inside a course, such items only use part of the assessment capabilities of LON-CAPA.'). |
'<br />'. |
'<br />'. |
&mt('By contrast, items created in authoring space, then imported into a course, can use all of the features of the assessment engine.').'</p>'. |
&mt('By contrast, items created in Authoring Space, then imported into a course, can use all of the features of the assessment engine.').'</p>'. |
'<p>'.&mt('Request authoring space access now?'). |
'<p>'.&mt('Request Authoring Space access now?'). |
'<span class="LC_nobreak"> '. |
'<span class="LC_nobreak"> '. |
'<label><input type="radio" name="requestauthor" value="1" />'.&mt('Yes').'</label>'. |
'<label><input type="radio" name="requestauthor" value="1" />'.&mt('Yes').'</label>'. |
(' 'x2). |
(' 'x2). |
Line 3791 sub process_request {
|
Line 3800 sub process_request {
|
$env{'user.domain'},$fullname,$env{'form.cdescr'}); |
$env{'user.domain'},$fullname,$env{'form.cdescr'}); |
if ((ref($postprocess) eq 'HASH') && |
if ((ref($postprocess) eq 'HASH') && |
((ref($postprocess->{'queuedmsg'}) eq 'HASH') || ($postprocess->{'queuedweb'}))) { |
((ref($postprocess->{'queuedmsg'}) eq 'HASH') || ($postprocess->{'queuedweb'}))) { |
my $recipient = $env{'user.name'}.':'.$env{'user.domain'}; |
¬ification_information($disposition,undef,$dom,$cnum,$now,undef,$postprocess); |
$output .= ¬ification_information($disposition,$recipient,$dom,$cnum,$now,undef,$postprocess); |
|
} |
} |
} |
} |
} |
} |
Line 3985 sub notification_information {
|
Line 3993 sub notification_information {
|
if (scalar(@{$addmsg}) > 0) { |
if (scalar(@{$addmsg}) > 0) { |
&Apache::loncoursequeueadmin::send_selfserve_notification($recipient,$addmsg,undef, |
&Apache::loncoursequeueadmin::send_selfserve_notification($recipient,$addmsg,undef, |
$env{'form.cdescr'},$now, |
$env{'form.cdescr'},$now, |
'queuedreq',$sender); |
'queuedcrsreq',$sender); |
} |
} |
} |
} |
} |
} |
Line 4034 sub notification_information {
|
Line 4042 sub notification_information {
|
} |
} |
} |
} |
if (scalar(@{$addmsg}) > 0) { |
if (scalar(@{$addmsg}) > 0) { |
my $type = 'createdreq'; |
my $type = 'createdcrsreq'; |
if ($code) { |
if ($code) { |
$type = 'uniquecode'; |
$type = 'uniquecode'; |
} |
} |