--- loncom/interface/loncreateuser.pm 2013/07/02 19:04:37 1.378
+++ loncom/interface/loncreateuser.pm 2014/02/28 19:20:06 1.395
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.378 2013/07/02 19:04:37 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.395 2014/02/28 19:20:06 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -126,9 +126,7 @@ sub user_quotas {
my ($ccuname,$ccdomain) = @_;
my %lt = &Apache::lonlocal::texthash(
'usrt' => "User Tools",
- 'cuqu' => "Current quota",
'cust' => "Custom quota",
- 'defa' => "Default",
'chqu' => "Change quota",
);
@@ -168,7 +166,7 @@ END_SCRIPT
my %titles = &Apache::lonlocal::texthash (
portfolio => "Disk space allocated to user's portfolio files",
- author => "Disk space allocated to user's authoring space (if role assigned)",
+ author => "Disk space allocated to user's Authoring Space (if role assigned)",
);
foreach my $name ('portfolio','author') {
my ($currquota,$quotatype,$inststatus,$defquota) =
@@ -189,19 +187,19 @@ END_SCRIPT
$showquota = $currquota;
if ($longinsttype eq '') {
$defaultinfo = &mt('For this user, the default quota would be [_1]'
- .' Mb.',$defquota);
+ .' MB.',$defquota);
} else {
$defaultinfo = &mt("For this user, the default quota would be [_1]".
- " Mb, as determined by the user's institutional".
+ " MB, as determined by the user's institutional".
" affiliation ([_2]).",$defquota,$longinsttype);
}
} else {
if ($longinsttype eq '') {
$defaultinfo = &mt('For this user, the default quota is [_1]'
- .' Mb.',$defquota);
+ .' MB.',$defquota);
} else {
$defaultinfo = &mt("For this user, the default quota of [_1]".
- " Mb, is determined by the user's institutional".
+ " MB, is determined by the user's institutional".
" affiliation ([_2]).",$defquota,$longinsttype);
}
}
@@ -211,22 +209,23 @@ END_SCRIPT
'
'.$titles{$name}.' | '."\n".
' '."\n".
&Apache::loncommon::start_data_table_row()."\n".
- ' '.$lt{'cuqu'}.': '.
- $currquota.' Mb. '.
+ ' | '.
+ &mt('Current quota: [_1] MB',$currquota).' '.
$defaultinfo.' | '."\n".
&Apache::loncommon::end_data_table_row()."\n".
&Apache::loncommon::start_data_table_row()."\n".
' '.$lt{'chqu'}.
': '.
+ 'value="0" '.$custom_off.' onchange="javascript:quota_changes('."'custom','$name'".');"'.
+ ' />'.
+ &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'));
@@ -988,7 +999,7 @@ ENDSCRIPT
$r->print('');
}
}
- $r->print('');
+ $r->print('
');
return;
}
@@ -1805,7 +1813,7 @@ sub display_existing_roles {
}
} else {
$plaintext=
- &mt('Customrole [_1][_2]defined by [_3]',
+ &mt('Custom role [_1][_2]defined by [_3]',
'"'.$croletitle.'"',
'
',
$croleuname.':'.$croleudom);
@@ -1855,7 +1863,7 @@ sub display_existing_roles {
} else {
$contextrole = &mt('Existing Roles in this Domain');
}
- $r->print(''.
+ $r->print('
'.
'