');
+ } else {
+ $r->print($response.''.&Apache::loncommon::end_page());
+ }
}
sub print_user_query_page {
@@ -611,7 +821,7 @@ sub print_user_modification_page {
&Apache::lonuserutils::can_create_user($ccdomain,$context,
$usertype);
if (!$cancreate) {
- my $helplink = ' href="javascript:helpMenu('."'display'".')"';
+ my $helplink = 'javascript:helpMenu('."'display'".')';
my %usertypetext = (
official => 'institutional',
unofficial => 'non-institutional',
@@ -621,7 +831,12 @@ sub print_user_modification_page {
$response = ''.&mt('No match was found for the username ([_1]) in LON-CAPA domain: [_2]',$ccuname,$ccdomain).
' ';
}
- $response .= ''.&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.").' '.&mt('Contact the helpdesk for assistance.',$helplink).'
';
+ $response .= '
'
+ .&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.")
+ .' '
+ .&mt('Please contact the [_1]helpdesk[_2] for assistance.'
+ ,'','')
+ .'
');
my $user_auth_text = &user_authentication($ccuname,$ccdomain,$formname);
- my ($user_quota_text,$user_tools_text);
+ my ($user_quota_text,$user_tools_text,$user_reqcrs_text);
if ((&Apache::lonnet::allowed('mpq',$ccdomain)) ||
(&Apache::lonnet::allowed('mut',$ccdomain))) {
# Current user has quota modification privileges
@@ -875,7 +1111,7 @@ ENDNOPORTPRIV
if (&Apache::lonnet::allowed('mut',$env{'request.role.domain'})) {
my %lt=&Apache::lonlocal::texthash(
'utav' => "User Tools Availability",
- 'yodo' => "You do not have privileges to modify Portfolio, Blog or Home Page settings for this user.",
+ 'yodo' => "You do not have privileges to modify Portfolio, Blog or Personal Information Page settings for this user.",
'ifch' => "If a change is required, contact a domain coordinator for the domain",
);
$user_tools_text = <print(' '."\n");
+ $r->print(' '."\n");
} else {
$r->print('
\n");
@@ -2274,15 +2683,20 @@ END
$env{'form.ccdomain'}.' ');
}
} else { # End of if ($env ... ) logic
- # They did not want to change the users name, quota or tool availability,
+ # They did not want to change the users name, quota, tool availability,
+ # or ability to request creation of courses,
# but we can still tell them what the name and quota and availabilities are
my %lt=&Apache::lonlocal::texthash(
- 'id' => "Student/Employee ID",
- 'mail' => "Permanent e-mail",
- 'disk' => "Disk space allocated to user's portfolio files",
- 'blog' => "Blog Availability",
- 'aboutme' => "Home Page Availability",
- 'portfolio' => "Portfolio Availability",
+ 'id' => "Student/Employee ID",
+ 'mail' => "Permanent e-mail address",
+ 'disk' => "Disk space allocated to user's portfolio files",
+ 'blog' => "Blog Availability",
+ 'aboutme' => "Personal Information Page Availability",
+ 'portfolio' => "Portfolio Availability",
+ 'official' => "Can Request Official Courses",
+ 'unofficial' => "Can Request Unofficial Courses",
+ 'community' => "Can Request Communities",
+ 'inststatus' => "Affiliation",
);
$r->print(<<"END");
$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'} $userenv{'generation'}
@@ -2291,6 +2705,20 @@ END
$r->print(' ['.$lt{'mail'}.': '.
$userenv{'permanentemail'}.']');
}
+ if ($showinststatus) {
+ $r->print(' ['.$lt{'inststatus'}.': '.$oldinststatuses.']');
+ }
+ if ($showrequestcourses) {
+ foreach my $item (@requestcourses) {
+ $r->print(' ['.$lt{$item}.': '.$newaccess{$item}.' '.
+ $newaccesstext{$item}.']'."\n");
+ }
+ } elsif ($showreqotherdom) {
+ foreach my $item (@requestcourses) {
+ $r->print(' ['.$lt{$item}.': '.$newaccess{$item}.' '.
+ $newaccesstext{$item}.']'."\n");
+ }
+ }
if ($showtools) {
foreach my $item (@usertools) {
$r->print(' ['.$lt{$item}.': '.$newaccess{$item}.' '.
@@ -2326,8 +2754,11 @@ END
} else {
$r->print(&mt("You do not have the authority to change these fields given the user's current set of active/future [_1] roles:",$contextname));
}
- $r->print(''.$rolestr.' '.
- &mt('Contact your helpdesk for more information.',"javascript:helpMenu('display')").' ');
+ my $helplink = 'javascript:helpMenu('."'display'".')';
+ $r->print(''.$rolestr.' '
+ .&mt('Please contact your [_1]helpdesk[_2] for more information.'
+ ,'','')
+ .' ');
}
$r->print(''
.$no_forceid_alert
@@ -2369,6 +2800,168 @@ END
$r->print(&Apache::loncommon::end_page());
}
+sub tool_changes {
+ my ($context,$usertools,$oldaccess,$oldaccesstext,$userenv,$changeHash,
+ $changed,$newaccess,$newaccesstext) = @_;
+ if (!((ref($usertools) eq 'ARRAY') && (ref($oldaccess) eq 'HASH') &&
+ (ref($oldaccesstext) eq 'HASH') && (ref($userenv) eq 'HASH') &&
+ (ref($changeHash) eq 'HASH') && (ref($changed) eq 'HASH') &&
+ (ref($newaccess) eq 'HASH') && (ref($newaccesstext) eq 'HASH'))) {
+ return;
+ }
+ if ($context eq 'reqcrsotherdom') {
+ my @options = ('approve','validate','autolimit');
+ my $optregex = join('|',@options);
+ my %reqdisplay = &courserequest_display();
+ my $cdom = $env{'request.role.domain'};
+ foreach my $tool (@{$usertools}) {
+ $oldaccesstext->{$tool} = &mt('no');
+ $changeHash->{$context.'.'.$tool} = $userenv->{$context.'.'.$tool};
+ if ($userenv->{$context.'.'.$tool} eq '') {
+ if ($env{'form.'.$context.'_'.$tool}) {
+ $changed->{$tool}=&tool_admin($tool,$cdom,
+ $changeHash,$context);
+ if ($changed->{$tool}) {
+ $newaccesstext->{$tool} = &mt('yes');
+ } else {
+ $newaccesstext->{$tool} = $oldaccesstext->{$tool};
+ }
+ }
+ } else {
+ my @curr = split(',',$userenv->{$context.'.'.$tool});
+ my @new;
+ my $changedoms;
+ my $newop = $env{'form.'.$context.'_'.$tool};
+ if ($newop eq 'autolimit') {
+ $newop .= '=';
+ unless ($env{'form.'.$context.'_'.$tool.'_limit'} =~ /\D/) {
+ $newop .= $env{'form.'.$context.'_'.$tool.'_limit'};
+ }
+ }
+ if (grep(/^\Q$cdom:($optregex\=?\d*)\E$/,@curr)) {
+ $oldaccesstext->{$tool} = &mt('yes');
+ my $oldop = $1;
+ if ($oldop ne $newop) {
+ $changedoms = 1;
+ foreach my $dom (@curr) {
+ unless ($dom eq $cdom) {
+ push(@new,$dom);
+ }
+ }
+ if ($newop) {
+ push(@new,$cdom.':'.$newop);
+ }
+ @new = sort(@new);
+ }
+ } elsif ($env{'form.'.$context.'_'.$tool}) {
+ $changedoms = 1;
+ @new = sort(@curr,$cdom.':'.$newop);
+ }
+ $newaccesstext->{$tool} = $oldaccesstext->{$tool};
+ if ($changedoms) {
+ my $newdomstr;
+ if (@new) {
+ $newdomstr = join(',',@new);
+ }
+ $changed->{$tool}=&tool_admin($tool,$newdomstr,$changeHash,
+ $context);
+ if ($changed->{$tool}) {
+ if ($env{'form.'.$context.'_'.$tool}) {
+ if ($env{'form.'.$context.'_'.$tool} eq 'autolimit') {
+ if ($env{'form.'.$context.'_'.$tool.'_limit'} =~ /\D/) {
+ $newaccesstext->{$tool} = &mt('Yes, processed automatically');
+ } else {
+ $newaccesstext->{$tool} = &mt('Yes, up to limit of [quant,_1,request] per user).',$env{'form.'.$context.'_'.$tool.'_limit'});
+ }
+ } else {
+ $newaccesstext->{$tool} = $reqdisplay{$env{'form.'.$context.'_'.$tool}};
+ }
+ } else {
+ $newaccesstext->{$tool} = &mt('No');
+ }
+ }
+ }
+ }
+ }
+ return;
+ }
+ foreach my $tool (@{$usertools}) {
+ my $newval;
+ if ($context eq 'requestcourses') {
+ $newval = $env{'form.crsreq_'.$tool};
+ if ($newval eq 'autolimit') {
+ $newval .= '='.$env{'form.crsreq_'.$tool.'_limit'};
+ }
+ } else {
+ $newval = $env{'form.'.$context.'_'.$tool};
+ }
+ if ($userenv->{$context.'.'.$tool} ne '') {
+ $oldaccess->{$tool} = &mt('custom');
+ if ($userenv->{$context.'.'.$tool}) {
+ $oldaccesstext->{$tool} = &mt("availability set to 'on'");
+ } else {
+ $oldaccesstext->{$tool} = &mt("availability set to 'off'");
+ }
+ $changeHash->{$context.'.'.$tool} = $userenv->{$context.'.'.$tool};
+ if ($env{'form.custom'.$tool} == 1) {
+ if ($newval ne $userenv->{$context.'.'.$tool}) {
+ $changed->{$tool} = &tool_admin($tool,$newval,$changeHash,
+ $context);
+ if ($changed->{$tool}) {
+ $newaccess->{$tool} = &mt('custom');
+ if ($newval) {
+ $newaccesstext->{$tool} = &mt("availability set to 'on'");
+ } else {
+ $newaccesstext->{$tool} = &mt("availability set to 'off'");
+ }
+ } else {
+ $newaccess->{$tool} = $oldaccess->{$tool};
+ if ($userenv->{$context.'.'.$tool}) {
+ $newaccesstext->{$tool} = &mt("availability set to 'on'");
+ } else {
+ $newaccesstext->{$tool} = &mt("availability set to 'off'");
+ }
+ }
+ } else {
+ $newaccess->{$tool} = $oldaccess->{$tool};
+ $newaccesstext->{$tool} = $oldaccesstext->{$tool};
+ }
+ } else {
+ $changed->{$tool} = &tool_admin($tool,'',$changeHash,$context);
+ if ($changed->{$tool}) {
+ $newaccess->{$tool} = &mt('default');
+ } else {
+ $newaccess->{$tool} = $oldaccess->{$tool};
+ if ($userenv->{$context.'.'.$tool}) {
+ $newaccesstext->{$tool} = &mt("availability set to 'on'");
+ } else {
+ $newaccesstext->{$tool} = &mt("availability set to 'off'");
+ }
+ }
+ }
+ } else {
+ $oldaccess->{$tool} = &mt('default');
+ if ($env{'form.custom'.$tool} == 1) {
+ $changed->{$tool} = &tool_admin($tool,$newval,$changeHash,
+ $context);
+ if ($changed->{$tool}) {
+ $newaccess->{$tool} = &mt('custom');
+ if ($newval) {
+ $newaccesstext->{$tool} = &mt("availability set to 'on'");
+ } else {
+ $newaccesstext->{$tool} = &mt("availability set to 'off'");
+ }
+ } else {
+ $newaccess->{$tool} = $oldaccess->{$tool};
+ }
+ } else {
+ $newaccess->{$tool} = $oldaccess->{$tool};
+ }
+ }
+ }
+ return;
+}
+
sub update_roles {
my ($r,$context) = @_;
my $now=time;
@@ -2436,8 +3029,8 @@ sub update_roles {
if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {
my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4);
# Delete custom role
- $r->print(&mt('Deleting custom role [_1] by [_2]:[_3] in [_4]',
- $rolename,$rnam,$rdom,$url).': '.
+ $r->print(&mt('Deleting custom role [_1] by [_2] in [_3]',
+ $rolename,$rnam.':'.$rdom,$url).': '.
&Apache::lonnet::assigncustomrole($env{'form.ccdomain'},
$env{'form.ccuname'},$url,$rdom,$rnam,$rolename,$now,
0,1,$context).' ');
@@ -2488,8 +3081,8 @@ sub update_roles {
my $result = &Apache::lonnet::assigncustomrole(
$env{'form.ccdomain'}, $env{'form.ccuname'},
$url,$rdom,$rnam,$rolename,0,$now,undef,$context);
- $r->print(&mt('Re-enabling custom role [_1] by [_2]:[_3] in [_4] : [_5]',
- $rolename,$rnam,$rdom,$url,''.$result.'').' ');
+ $r->print(&mt('Re-enabling custom role [_1] by [_2] in [_3]: [_4]',
+ $rolename,$rnam.':'.$rdom,$url,''.$result.'').' ');
if (!grep(/^cr$/,@rolechanges)) {
push(@rolechanges,'cr');
}
@@ -2733,13 +3326,25 @@ sub quota_admin {
}
sub tool_admin {
- my ($tool,$settool,$changeHash) = @_;
- my $toolchanged;
- if (&Apache::lonnet::allowed('mut',$env{'form.ccdomain'})) {
+ my ($tool,$settool,$changeHash,$context) = @_;
+ my $canchange = 0;
+ if ($context eq 'requestcourses') {
+ if (&Apache::lonnet::allowed('ccc',$env{'form.ccdomain'})) {
+ $canchange = 1;
+ }
+ } elsif ($context eq 'reqcrsotherdom') {
+ if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) {
+ $canchange = 1;
+ }
+ } elsif (&Apache::lonnet::allowed('mut',$env{'form.ccdomain'})) {
# Current user has quota modification privileges
+ $canchange = 1;
+ }
+ my $toolchanged;
+ if ($canchange) {
if (ref($changeHash) eq 'HASH') {
$toolchanged = 1;
- $changeHash->{'tools.'.$tool} = $settool;
+ $changeHash->{$context.'.'.$tool} = $settool;
}
}
return $toolchanged;
@@ -2850,13 +3455,16 @@ sub custom_role_editor {
my ($jsback,$elements) = &crumb_utilities();
my $button_code = "\n";
my $head_script = "\n";
- $head_script .= ''."\n";
+ $head_script .= "\n".$jsback."\n"
+ .'// ]]>'."\n"
+ .''."\n";
$r->print(&Apache::loncommon::start_page('Custom Role Editor',$head_script));
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:backPage(document.form1,'pickrole','')",
@@ -2897,14 +3505,14 @@ ENDCCF
my $privtext = &Apache::lonnet::plaintext($priv);
$r->print(&Apache::loncommon::start_data_table_row().
'
'.&mt('The following enrollment requests were deleted because the user is already enrolled in the course:').'
');
+ foreach my $user (@existing) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ if (@missingreq) {
+ $r->print('
'.&mt('The following enrollment requests were ignored because the request is no longer in the enrollment queue:').'
');
+ foreach my $user (@missingreq) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ if (@invalidusers) {
+ $r->print('
'.&mt('The following enrollment requests were deleted because the requestor does not have a LON-CAPA account:').'
');
+ foreach my $user (@invalidusers) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ if (@limitexceeded) {
+ $r->print('
'.&mt('The following enrollment requests were skipped because the enrollment limit has been reached for the course:').'
');
+ foreach my $user (@limitexceeded) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ if (@enrollerrors) {
+ $r->print('
'.&mt('The following enrollment requests could not be processed because an error occurred:').'
');
+ foreach my $user (@enrollerrors) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ if (@warn_approves) {
+ $r->print('
'.&mt("For the following users, an error occurred when updating the user's own self-enroll requests record:").'
');
+ foreach my $user (@warn_approves) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ if (@warn_rejects) {
+ $r->print('
'.&mt("For the following users, an error occurred when updating the user's own self-enroll requests record:").'
');
+ foreach my $user (@warn_rejects) {
+ $r->print('
'.$user.'
');
+ }
+ $r->print('
');
+ }
+ return;
+}
+
+sub get_student_counts {
+ my ($cdom,$cnum) = @_;
+ my (%idx,%stucounts);
+ my $classlist = &Apache::loncoursedata::get_classlist($cdom,$cnum);
+ $idx{'type'} = &Apache::loncoursedata::CL_TYPE();
+ $idx{'status'} = &Apache::loncoursedata::CL_STATUS();
+ while (my ($student,$data) = each(%$classlist)) {
+ if (($data->[$idx{'status'}] eq 'Active') ||
+ ($data->[$idx{'status'}] eq 'Future')) {
+ if ($data->[$idx{'type'}] eq 'selfenroll') {
+ $stucounts{'selfenroll'} ++;
+ }
+ $stucounts{'allstudents'} ++;
+ }
+ }
+ return (\%stucounts,\%idx,$classlist);
+}
+
sub visible_in_cat {
my ($cdom,$cnum) = @_;
my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$cdom);
@@ -3879,7 +4913,7 @@ sub visible_in_cat {
miss => 'Your course does not currently appear in the Course Catalog for this domain.',
yous => 'You should remedy this if you plan to allow self-enrollment, otherwise students will have difficulty finding your course.',
coca => 'Courses can be absent from the Catalog, because they do not have an institutional code, have no assigned category, or have been specifically excluded.',
- make => 'Make any changes to self-enrollment settings below, click "Save changes", then take action to include the course in the Catalog:',
+ make => 'Make any changes to self-enrollment settings below, click "Save", then take action to include the course in the Catalog:',
take => 'Take the following action to ensure the course appears in the Catalog:',
dc_unhide => 'Ask a domain coordinator to change the "Exclude from course catalog" setting.',
dc_addinst => 'Ask a domain coordinator to enable display the catalog of "Official courses (with institutional codes)".',
@@ -4131,13 +5165,6 @@ sub print_userchangelogs_display {
my (%whodunit,%changed,$version);
($version) = ($r->dir_config('lonVersion') =~ /^([\d\.]+)\-/);
$r->print(&role_display_filter($formname,$cdom,$cnum,\%curr,$version));
- my $showntablehdr = 0;
- my $tablehdr = &Apache::loncommon::start_data_table().
- &Apache::loncommon::start_data_table_header_row().
- '
'.&mt('When').'
'.&mt('Who made the change').
- '
'.&mt('Changed User').'
'.&mt('Role').'
'.&mt('Section').'
'.
- &mt('Context').'
'.&mt('Start').'
'.&mt('End').'
'.
- &Apache::loncommon::end_data_table_header_row();
my ($minshown,$maxshown);
$minshown = 1;
my $count = 0;
@@ -4147,6 +5174,9 @@ sub print_userchangelogs_display {
$minshown = 1 + ($curr{'page'} - 1) * $curr{'show'};
}
}
+
+ # Collect user change log data
+ my $content = '';
foreach my $id (sort { $roleslog{$b}{'exe_time'}<=>$roleslog{$a}{'exe_time'} } (keys(%roleslog))) {
next if (($roleslog{$id}{'exe_time'} < $curr{'rolelog_start_date'}) ||
($roleslog{$id}{'exe_time'} > $curr{'rolelog_end_date'}));
@@ -4168,10 +5198,7 @@ sub print_userchangelogs_display {
}
$count ++;
next if ($count < $minshown);
- if (!$showntablehdr) {
- $r->print($tablehdr);
- $showntablehdr = 1;
- }
+
if ($whodunit{$roleslog{$id}{'exe_uname'}.':'.$roleslog{$id}{'exe_udom'}} eq '') {
$whodunit{$roleslog{$id}{'exe_uname'}.':'.$roleslog{$id}{'exe_udom'}} =
&Apache::loncommon::plainname($roleslog{$id}{'exe_uname'},$roleslog{$id}{'exe_udom'});
@@ -4210,21 +5237,43 @@ sub print_userchangelogs_display {
if ($chgcontext ne '' && $lt{$chgcontext} ne '') {
$chgcontext = $lt{$chgcontext};
}
- $r->print(&Apache::loncommon::start_data_table_row().'
'
+ .&Apache::loncommon::end_data_table_row();
+ }
+
+ # Form Footer
+ my $form_footer =
+ ''
+ .''
+ .'';
+
+ # Only display table, if content is available (has been collected above)
+ if (!$content) {
+ $r->print('
';
@@ -4264,9 +5352,13 @@ sub role_display_filter {
$curr->{'rolelog_end_date'},undef,
undef,undef,undef,undef,undef,undef,$nolink);
my %lt = &rolechg_contexts();
- $output .= '
'.&mt('Window during which changes occurred:').'
'.&mt('After:').
- '
'.$startform.'
'.&mt('Before:').'
'.
- $endform.'
'.
+ $output .= '
'.&mt('Window during which changes occurred:').' '.
+ '
'.&mt('After:').
+ '
'.$startform.'
'.
+ '
'.&mt('Before:').'
'.
+ '
'.$endform.'
'.
+ '
'.
+ '
'.
'
'.&mt('Role:').' '.
'
'.
+ $output .= '
'.
+ '
'.
+ '
'.
&mt('Context:').'
'.
- ''.
- &mt('[_1]Note:[_2] Only changes made from servers running LON-CAPA 2.6.99.0 or later are displayed.');
+ $output .= ''
+ .'';
+
+ # Update Display button
+ $output .= '
'
+ .''
+ .'
';
+
+ # Server version info
+ $output .= '
'
+ .&mt('Only changes made from servers running LON-CAPA [_1] or later are displayed.'
+ ,'2.6.99.0');
if ($version) {
- $output .= ' '.&mt('This server is version [_3].','','',$version); }
- $output .= '
';
+ $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version);
+ }
+ $output .= '';
return $output;
}
@@ -4693,17 +5796,27 @@ sub build_search_response {
$response .= ' '.&mt('You may want to broaden your search to the selected LON-CAPA domain.');
}
}
- if (!($srch->{'srchby'} eq 'uname' && $srch->{'srchin'} eq 'dom' && $srch->{'srchtype'} eq 'exact' && $srch->{'srchdomain'} eq $env{'request.role.domain'})) {
+ my $createdom = $env{'request.role.domain'};
+ if ($context eq 'requestcrs') {
+ if ($env{'form.coursedom'} ne '') {
+ $createdom = $env{'form.coursedom'};
+ }
+ }
+ if (!($srch->{'srchby'} eq 'uname' && $srch->{'srchin'} eq 'dom' && $srch->{'srchtype'} eq 'exact' && $srch->{'srchdomain'} eq $createdom)) {
my $cancreate =
- &Apache::lonuserutils::can_create_user($env{'request.role.domain'},$context);
+ &Apache::lonuserutils::can_create_user($createdom,$context);
+ my $targetdom = ''.$createdom.'';
if ($cancreate) {
- my $showdom = &display_domain_info($env{'request.role.domain'});
+ my $showdom = &display_domain_info($createdom);
$response .= '
'
.''.&mt('To add a new user:').''
- .' '
- .&mt("(You can only create new users in your current role's domain - [_1])"
- ,''.$env{'request.role.domain'}.'')
- .'
'
+ .' ';
+ if ($context eq 'requestcrs') {
+ $response .= &mt("(You can only define new users in the new course's domain - [_1])",$targetdom);
+ } else {
+ $response .= &mt("(You can only create new users in your current role's domain - [_1])",$targetdom);
+ }
+ $response .='
'
.&mt("Set 'Domain/institution to search' to: [_1]",''.$showdom.'')
.'
'
.&mt("Set 'Search criteria' to: [_1]username is ..... in selected LON-CAPA domain[_2]",'','')
@@ -4714,14 +5827,17 @@ sub build_search_response {
.'
'
- .&mt("You are not authorized to create new users in your current role's domain - [_1]."
- ,''.$env{'request.role.domain'}.'')
- .' '
- .&mt('Contact the [_1]helpdesk[_2] if you need to create a new user.'
+ $response .= '
';
+ if ($context eq 'requestcrs') {
+ $response .= &mt("You are not authorized to defined new users in the new course's domain - [_1].",$targetdom);
+ } else {
+ $response .= &mt("You are not authorized to create new users in your current role's domain - [_1].",$targetdom);
+ }
+ $response .= ' '
+ .&mt('Please contact the [_1]helpdesk[_2] if you need to create a new user.'
,' '
,'')
- .'