--- loncom/interface/loncreateuser.pm 2017/03/26 23:33:46 1.406.2.13 +++ loncom/interface/loncreateuser.pm 2017/01/28 21:35:49 1.433 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.406.2.13 2017/03/26 23:33:46 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.433 2017/01/28 21:35:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -252,13 +252,15 @@ sub build_tools_display { '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','requestcourses.textbook'); - @usertools = ('official','unofficial','community','textbook'); + '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(); @@ -333,6 +335,7 @@ sub build_tools_display { '
' - .&mt('You need to be a privileged user to display user access logs for [_1]', - &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom), - $uname,$udom)) - .'
'); - if ($env{'form.popup'}) { - $r->print(''); - } else { - $r->print(&earlyout_accesslog_form($formname,$prevphasestr,$udom)); - } - return; - } - } - # set defaults my $now = time(); my $defstart = $now - (7*24*3600); @@ -6859,7 +6851,7 @@ ENDSCRIPT $showntableheader = 1; } my ($shown,$extra); - my ($event,$data) = split(/\s+/,&unescape($event),2); + my ($event,$data) = split(/\s+/,&unescape($event)); if ($event eq 'Role') { my ($rolecode,$extent) = split(/\./,$data,2); next if ($extent eq ''); @@ -6911,17 +6903,8 @@ ENDSCRIPT $shown = &mt('Role selection: [_1]',$rolename); } else { $shown = &mt($event); - if ($data =~ /^webdav/) { - my ($path,$clientip) = split(/\s+/,$data,2); - $path =~ s/^webdav//; - if ($clientip ne '') { - $extra = &mt('Client IP address: [_1]',$clientip); - } - if ($path ne '') { - $shown .= ' '.&mt('(WebDAV access to [_1])',$path); - } - } elsif ($data ne '') { - $extra = &mt('Client IP address: [_1]',$data); + if ($data ne '') { + $extra = &mt('Client IP address: [_1]',$data); } } $r->print( @@ -7224,7 +7207,7 @@ sub print_helpdeskaccess_display { my $confname = $cdom.'-domainconfig'; my $crstype = &Apache::loncommon::course_type(); - my @accesstypes = ('all','dh','da','none'); + my @accesstypes = ('all','anydh','anyda','none'); my ($numstatustypes,@jsarray); my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($cdom); if (ref($types) eq 'ARRAY') { @@ -7434,8 +7417,8 @@ ENDJS 'whi' => 'Which helpdesk personnel may use this role?', 'udd' => 'Use domain default', 'all' => 'All with domain helpdesk or helpdesk assistant role', - 'dh' => 'All with domain helpdesk role', - 'da' => 'All with domain helpdesk assistant role', + 'anydh' => 'All with domain helpdesk role', + 'anyda' => 'All with domain helpdesk assistant role', 'none' => 'None', 'status' => 'Determined based on institutional status', 'inc' => 'Include all, but exclude specific personnel', @@ -7678,9 +7661,9 @@ sub domain_adhoc_access { } } elsif ($access eq 'none') { $domusage{$role} = &mt('No one in the domain'); - } elsif ($access eq 'dh') { + } elsif ($access eq 'anydh') { $domusage{$role} = &mt('Any user in domain with active [_1] role',&Apache::lonnet::plaintext('dh')); - } elsif ($access eq 'da') { + } elsif ($access eq 'anyda') { $domusage{$role} = &mt('Any user in domain with active [_1] role',&Apache::lonnet::plaintext('da')); } elsif ($access eq 'all') { $domusage{$role} = &mt('Any user in domain with active [_1] or [_2] role', @@ -7869,7 +7852,7 @@ sub update_helpdeskaccess { $r->print(''.&mt('You do not have permission to change helpdesk access.').'
'); return; } - my @accesstypes = ('all','dh','da','none','status','inc','exc'); + my @accesstypes = ('all','anydh','anyda','none','status','inc','exc'); my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; my $confname = $cdom.'-domainconfig'; @@ -8120,10 +8103,10 @@ sub update_helpdeskaccess { if ($env{'form.'.$role.'_incrs'}) { if ($newsettings{$role}{'access'} eq 'all') { $r->print(&mt('All helpdesk staff can access '.lc($crstype).' with this role.')); - } elsif ($newsettings{$role}{'access'} eq 'dh') { + } elsif ($newsettings{$role}{'access'} eq 'anydh') { $r->print(&mt('Helpdesk staff can use this role if they have an active [_1] role', &Apache::lonnet::plaintext('dh'))); - } elsif ($newsettings{$role}{'access'} eq 'da') { + } elsif ($newsettings{$role}{'access'} eq 'anyda') { $r->print(&mt('Helpdesk staff can use this role if they have an active [_1] role', &Apache::lonnet::plaintext('da'))); } elsif ($newsettings{$role}{'access'} eq 'none') {