'."\n".
&Apache::loncommon::end_data_table_row()."\n".
&Apache::loncommon::start_data_table_row()."\n".
@@ -220,13 +218,14 @@ END_SCRIPT
': '.
+ ' />'.
+ &mt('Default ([_1] MB)',$defquota).' '.
' '.
' Mb'."\n".
+ ' /> '.&mt('MB').''."\n".
&Apache::loncommon::end_data_table_row()."\n";
}
}
@@ -241,7 +240,7 @@ sub build_tools_display {
my %lt = &Apache::lonlocal::texthash (
'blog' => "Personal User Blog",
'aboutme' => "Personal Information Page",
- 'webdav' => "WebDAV access to authoring spaces (if SSL and author/co-author)",
+ 'webdav' => "WebDAV access to Authoring Spaces (if SSL and author/co-author)",
'portfolio' => "Personal User Portfolio",
'avai' => "Available",
'cusa' => "availability",
@@ -251,13 +250,14 @@ sub build_tools_display {
'official' => 'Can request creation of official courses',
'unofficial' => 'Can request creation of unofficial courses',
'community' => 'Can request creation of communities',
+ 'textbook' => 'Can request creation of textbook courses',
'requestauthor' => 'Can request author space',
);
if ($context eq 'requestcourses') {
%userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
'requestcourses.official','requestcourses.unofficial',
- 'requestcourses.community');
- @usertools = ('official','unofficial','community');
+ 'requestcourses.community','requestcourses.textbook');
+ @usertools = ('official','unofficial','community','textbook');
@options =('norequest','approval','autolimit','validate');
%validations = &Apache::lonnet::auto_courserequest_checks($ccdomain);
%reqtitles = &courserequest_titles();
@@ -446,12 +446,13 @@ sub coursereq_externaluser {
'official' => 'Can request creation of official courses',
'unofficial' => 'Can request creation of unofficial courses',
'community' => 'Can request creation of communities',
+ 'textbook' => 'Can request creation of textbook courses',
);
%userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
'reqcrsotherdom.official','reqcrsotherdom.unofficial',
- 'reqcrsotherdom.community');
- @usertools = ('official','unofficial','community');
+ 'reqcrsotherdom.community','reqcrsotherdom.textbook');
+ @usertools = ('official','unofficial','community','textbook');
@options = ('approval','validate','autolimit');
%validations = &Apache::lonnet::auto_courserequest_checks($cdom);
my $optregex = join('|',@options);
@@ -531,6 +532,7 @@ sub courserequest_titles {
official => 'Official',
unofficial => 'Unofficial',
community => 'Communities',
+ textbook => 'Textbook',
norequest => 'Not allowed',
approval => 'Approval by Dom. Coord.',
validate => 'With validation',
@@ -568,6 +570,15 @@ sub requestauthor_display {
return %titles;
}
+sub requestchange_display {
+ my %titles = &Apache::lonlocal::texthash (
+ approval => "availability set to 'on' (approval required)",
+ automatic => "availability set to 'on' (automatic approval)",
+ norequest => "availability set to 'off'",
+ );
+ return %titles;
+}
+
sub curr_requestauthor {
my ($uname,$udom,$isadv,$inststatuses,$domconfig) = @_;
return unless ((ref($inststatuses) eq 'ARRAY') && (ref($domconfig) eq 'HASH'));
@@ -1218,6 +1229,7 @@ ENDFORMINFO
}
}
}
+ my $title = '';
if ($newuser) {
my ($portfolioform,$domroleform);
if ((&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) ||
@@ -1225,15 +1237,12 @@ ENDFORMINFO
# Current user has quota or user tools modification privileges
$portfolioform = ' '.&user_quotas($ccuname,$ccdomain);
}
- if (&Apache::lonnet::allowed('cau',$env{'request.role.domain'})) {
+ if ((&Apache::lonnet::allowed('cau',$env{'request.role.domain'})) &&
+ ($ccdomain eq $env{'request.role.domain'})) {
$domroleform = ' '.&domainrole_req($ccuname,$ccdomain);
}
&initialize_authen_forms($ccdomain,$formname);
my %lt=&Apache::lonlocal::texthash(
- 'cnu' => 'Create New User',
- 'ast' => 'as a student',
- 'ame' => 'as a member',
- 'ind' => 'in domain',
'lg' => 'Login Data',
'hs' => "Home Server",
);
@@ -1247,19 +1256,25 @@ $loginscript
// ]]>
-
$lt{'cnu'} "$ccuname" $lt{'ind'} $ccdomain
ENDTITLE
if ($env{'form.action'} eq 'singlestudent') {
if ($crstype eq 'Community') {
- $r->print(' ('.$lt{'ame'}.')');
+ $title = &mt('Create New User [_1] in domain [_2] as a member',
+ '"'.$ccuname.'"','"'.$ccdomain.'"');
} else {
- $r->print(' ('.$lt{'ast'}.')');
+ $title = &mt('Create New User [_1] in domain [_2] as a student',
+ '"'.$ccuname.'"','"'.$ccdomain.'"');
}
+ } else {
+ $title = &mt('Create New User [_1] in domain [_2]',
+ '"'.$ccuname.'"','"'.$ccdomain.'"');
}
- $r->print('
'."\n".'
');
+ $r->print('
'.$title.'
'."\n");
+ $r->print('
');
my $personal_table =
&personal_data_display($ccuname,$ccdomain,$newuser,$context,
$inst_results{$ccuname.':'.$ccdomain});
+ # (Do not offer Disable Safeguard here)
$r->print($personal_table);
my ($home_server_pick,$numlib) =
&Apache::loncommon::home_server_form_item($ccdomain,'hserver',
@@ -1346,35 +1361,25 @@ ENDAUTH
}
$r->print('
');
} else { # user already exists
- my %lt=&Apache::lonlocal::texthash(
- 'cup' => "Modify existing user: ",
- 'ens' => "Enroll one student: ",
- 'enm' => "Enroll one member: ",
- 'id' => "in domain",
- );
- $r->print(<
-ENDCHANGEUSER
+ $r->print($start_page.$forminfo);
if ($env{'form.action'} eq 'singlestudent') {
if ($crstype eq 'Community') {
- $r->print($lt{'enm'});
+ $title = &mt('Enroll one member: [_1] in domain [_2]',
+ '"'.$ccuname.'"','"'.$ccdomain.'"');
} else {
- $r->print($lt{'ens'});
+ $title = &mt('Enroll one student: [_1] in domain [_2]',
+ '"'.$ccuname.'"','"'.$ccdomain.'"');
}
} else {
- $r->print($lt{'cup'});
+ $title = &mt('Modify existing user: [_1] in domain [_2]',
+ '"'.$ccuname.'"','"'.$ccdomain.'"');
}
- $r->print(' "'.$ccuname.'" '.$lt{'id'}.' "'.$ccdomain.'"'.
- "\n".'
');
- my ($personal_table,$showforceid) =
+ $r->print('
'.$title.'
'."\n");
+ $r->print('
');
+ my $personal_table =
&personal_data_display($ccuname,$ccdomain,$newuser,$context,
$inst_results{$ccuname.':'.$ccdomain});
$r->print($personal_table);
- if ($showforceid) {
- $r->print('
');
- }
if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) {
$r->print('
'.&mt('User Can Request Creation of Courses/Communities in this Domain?').'
'.
&Apache::loncommon::start_data_table());
@@ -1392,7 +1397,8 @@ ENDCHANGEUSER
my ($isadv,$isauthor) =
&Apache::lonnet::is_advanced_user($ccuname,$ccdomain);
if ((!$isauthor) &&
- (&Apache::lonnet::allowed('cau',$env{'request.role.domain'}))) {
+ (&Apache::lonnet::allowed('cau',$env{'request.role.domain'}))
+ && ($env{'request.role.domain'} eq $ccdomain)) {
$user_text{'requestauthor'} = &domainrole_req($ccuname,$ccdomain);
}
$user_text{'auth'} = &user_authentication($ccuname,$ccdomain,$formname);
@@ -1404,8 +1410,8 @@ ENDCHANGEUSER
if (!&Apache::lonnet::allowed('mpq',$ccdomain)) {
if (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {
my %lt=&Apache::lonlocal::texthash(
- 'dska' => "Disk quotas for user's portfolio and authoring space",
- 'youd' => "You do not have privileges to modify the portfolio and/or authoring space quotas for this user.",
+ 'dska' => "Disk quotas for user's portfolio and Authoring Space",
+ 'youd' => "You do not have privileges to modify the portfolio and/or Authoring Space quotas for this user.",
'ichr' => "If a change is required, contact a domain coordinator for the domain",
);
$user_text{'quota'} = <print($error.&mt('Unable to determine home server for ').
- $env{'form.ccuname'}.&mt(' in domain ').
- $env{'form.ccdomain'}.'.');
+ $r->print(
+ $error
+ .'
'
+ .&mt('Unable to determine home server for [_1] in domain [_2].',
+ '"'.$env{'form.ccuname'}.'"','"'.$env{'form.ccdomain'}.'"')
+ .'
'
+ .&mt('Unable to successfully change environment for [_1] in domain [_2].',
+ '"'.$env{'form.ccuname'}.'"',
+ '"'.$env{'form.ccdomain'}.'"')
+ .'
');
}
} else { # End of if ($env ... ) logic
# They did not want to change the users name, quota, tool availability,
@@ -3095,13 +3114,14 @@ sub update_user_data {
if ($env{'form.action'} eq 'singlestudent') {
&enroll_single_student($r,$uhome,$amode,$genpwd,$now,$newuser,$context,
$crstype,$showcredits,$defaultcredits);
- $r->print('