--- loncom/interface/loncreateuser.pm 2013/07/03 04:04:13 1.379 +++ loncom/interface/loncreateuser.pm 2017/01/28 03:48:44 1.432 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.379 2013/07/03 04:04:13 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.432 2017/01/28 03:48:44 raeburn 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", ); @@ -162,13 +160,14 @@ END_SCRIPT '

'.$lt{'usrt'}.'

'."\n". &Apache::loncommon::start_data_table(); - if (&Apache::lonnet::allowed('mut',$ccdomain)) { + if ((&Apache::lonnet::allowed('mut',$ccdomain)) || + (&Apache::lonnet::allowed('udp',$ccdomain))) { $output .= &build_tools_display($ccuname,$ccdomain,'tools'); } 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 +188,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,8 +210,8 @@ 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". @@ -220,13 +219,14 @@ END_SCRIPT ':  '. + ' />'. + &mt('Default ([_1] MB)',$defquota).' '. '  '. ' Mb'."\n". + ' /> '.&mt('MB').''."\n". &Apache::loncommon::end_data_table_row()."\n"; } } @@ -241,7 +241,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 +251,16 @@ 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', + 'placement' => 'Can request creation of placement tests', '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', + 'requestcourses.placement'); + @usertools = ('official','unofficial','community','textbook','placement'); @options =('norequest','approval','autolimit','validate'); %validations = &Apache::lonnet::auto_courserequest_checks($ccdomain); %reqtitles = &courserequest_titles(); @@ -265,7 +268,7 @@ sub build_tools_display { $colspan = ' colspan="2"'; %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$ccdomain); - $isadv = &Apache::lonnet::is_advanced_user($ccuname,$ccdomain); + $isadv = &Apache::lonnet::is_advanced_user($ccdomain,$ccuname); } elsif ($context eq 'requestauthor') { %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname, 'requestauthor'); @@ -332,6 +335,7 @@ sub build_tools_display { ' '.$lt{$item}.''."\n". ' '."\n". &Apache::loncommon::start_data_table_row()."\n"; + if (($context eq 'requestcourses') || ($context eq 'requestauthor')) { my ($curroption,$currlimit); my $envkey = $context.'.'.$item; @@ -426,7 +430,9 @@ sub build_tools_display { } $output .= ' '.$custom_access.(' 'x4). $lt{'avai'}.': '.$currdisp.''."\n". - &Apache::loncommon::end_data_table_row()."\n". + &Apache::loncommon::end_data_table_row()."\n"; + unless (&Apache::lonnet::allowed('udp',$ccdomain)) { + $output .= &Apache::loncommon::start_data_table_row()."\n". ' '. $lt{'chse'}.':