--- loncom/interface/loncreateuser.pm 2017/01/18 21:00:05 1.429
+++ loncom/interface/loncreateuser.pm 2017/01/24 05:34:37 1.430
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.429 2017/01/18 21:00:05 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.430 2017/01/24 05:34:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -860,7 +860,7 @@ ENDBLOCK
$output = '
');
$r->print(&personal_data_display($ccuname,$ccdomain,$newuser,$context,
$inst_results{$ccuname.':'.$ccdomain}));
- if ((&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) ||
+ if ((&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) ||
(&Apache::lonnet::allowed('udp',$env{'request.role.domain'}))) {
$r->print('
'.&mt('User Can Request Creation of Courses/Communities in this Domain?').' '.
&Apache::loncommon::start_data_table());
@@ -1455,7 +1455,7 @@ ENDAUTH
if ((!$isauthor) &&
((&Apache::lonnet::allowed('cau',$env{'request.role.domain'})) ||
(&Apache::lonnet::allowed('udp',$env{'request.role.domain'}))) &&
- ($env{'request.role.domain'} eq $ccdomain)) {
+ ($env{'request.role.domain'} eq $ccdomain)) {
$user_text{'requestauthor'} = &domainrole_req($ccuname,$ccdomain);
}
$user_text{'auth'} = &user_authentication($ccuname,$ccdomain,$formname);
@@ -1526,7 +1526,7 @@ ENDNOTOOLSPRIV
} elsif (($context eq 'course') && ((&Apache::lonnet::allowed('vcl',$env{'request.course.id'})) ||
($env{'request.course.sec'} &&
&Apache::lonnet::allowed('vcl',$env{'request.course.id'}.'/'.$env{'request.course.sec'})))) {
- $statuses = ['active'];
+ $statuses = ['active'];
}
if ($env{'form.action'} ne 'singlestudent') {
&display_existing_roles($r,$ccuname,$ccdomain,\%inccourses,$context,
@@ -1760,7 +1760,7 @@ sub display_existing_roles {
if ($active) {
next unless($showall || $showactive);
} else {
- next unless($showall || $showexpired);
+ next unless($showall || $showexpired);
}
# Is this a custom role? Get role owner and title.
my ($croleudom,$croleuname,$croletitle)=
@@ -1905,7 +1905,7 @@ sub display_existing_roles {
} else {
$row.=' ';
}
- $row.= '';
+ $row.= '';
}
my $plaintext='';
if (!$croletitle) {
@@ -4384,7 +4384,6 @@ sub custom_role_editor {
);
my $args = { bread_crumbs => $brcrum,
bread_crumbs_component => 'User Management'};
-
$r->print(&Apache::loncommon::start_page('Custom Role Editor',
$head_script,$args).
$body_top);
@@ -5025,7 +5024,7 @@ sub handler {
} elsif ($env{'form.state'} eq 'done') {
$r->print('
'.&mt('Enrollment request processing').' '."\n");
$r->print(&Apache::loncoursequeueadmin::update_request_queue($context,
- $cdom,$cnum,$coursedesc));
+ $cdom,$cnum,$coursedesc));
}
} else {
$r->print(&header(undef,{'no_nav_bar' => 1}).
@@ -5045,7 +5044,7 @@ sub handler {
&update_helpdeskaccess($r,$permission,$brcrum);
} else {
&print_helpdeskaccess_display($r,$permission,$brcrum);
- }
+ }
} else {
&print_helpdeskaccess_display($r,$permission,$brcrum);
}
@@ -5306,9 +5305,8 @@ sub print_main_menu {
);
if ($linkcontext eq 'domain') {
unless ($permission->{'cusr'}) {
- $links{'domain'}{'singleuser'} = 'View a User';
+ $links{'domain'}{'singleuser'} = 'View a User';
$linktitles{'domain'}{'singleuser'} = 'View information about a user in the domain';
-
}
} elsif ($linkcontext eq 'course') {
unless ($permission->{'cusr'}) {
@@ -6062,7 +6060,7 @@ ENDSCRIPT
} elsif ($item eq 'approval') {
my ($currnotified,$currapproval,%appchecked);
my %selfdescs = &Apache::lonuserutils::selfenroll_default_descs();
- if (ref($currsettings) eq 'HASH') {
+ if (ref($currsettings) eq 'HASH') {
$currnotified = $currsettings->{'selfenroll_notifylist'};
$currapproval = $currsettings->{'selfenroll_approval'};
}
@@ -6596,7 +6594,7 @@ ENDSCRIPT
}
}
if (($context eq 'course') && ($viewablesec ne '')) {
- next if ($roleslog{$id}{'logentry'}{'section'} ne $viewablesec);
+ next if ($roleslog{$id}{'logentry'}{'section'} ne $viewablesec);
}
$count ++;
next if ($count < $minshown);
@@ -7201,7 +7199,7 @@ sub print_helpdeskaccess_display {
my ($numstatustypes,@jsarray);
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($cdom);
if (ref($types) eq 'ARRAY') {
- if (@{$types} > 0) {
+ if (@{$types} > 0) {
$numstatustypes = scalar(@{$types});
push(@accesstypes,'status');
@jsarray = ('bystatus');
@@ -7251,7 +7249,7 @@ sub print_helpdeskaccess_display {
$elements{$role.'_staff_inc'} = 'checkbox';
$elements{$role.'_staff_exc'} = 'checkbox';
}
- $elements{$role.'_override'} = 'checkbox';
+ $elements{$role.'_override'} = 'checkbox';
if (ref($settings{$role}) eq 'HASH') {
if ($settings{$role}{'access'} ne '') {
my $curraccess = $settings{$role}{'access'};
@@ -7315,7 +7313,7 @@ function switchRoleTab(caller,role) {
}
}
return false;
-}
+}
function helpdeskAccess(role) {
var curraccess = null;
@@ -7329,11 +7327,11 @@ function helpdeskAccess(role) {
var shown = Array();
var hidden = Array();
if (curraccess == 'none') {
- hidden = Array ('$hiddenstr');
+ hidden = Array ('$hiddenstr');
} else {
if (curraccess == 'status') {
- shown = Array ('bystatus','privs');
- hidden = Array ('notinc','notexc');
+ shown = Array ('bystatus','privs');
+ hidden = Array ('notinc','notexc');
} else {
if (curraccess == 'exc') {
shown = Array ('notexc','privs');
@@ -7352,7 +7350,7 @@ function helpdeskAccess(role) {
if (hidden.length > 0) {
for (var i=0; i
'All',
'none' => 'None',
'status' => 'Determined based on institutional status',
- 'inc' => 'Include all, but exclude specific personnel',
+ 'inc' => 'Include all, but exclude specific personnel',
'exc' => 'Exclude all, but include specific personnel',
'hel' => 'Helpdesk',
'rpr' => 'Role privileges',
@@ -7445,7 +7443,7 @@ ENDJS
my @roles_by_num = ();
foreach my $item (sort {$a <=> $b } (keys(%ordered))) {
push(@roles_by_num,$ordered{$item});
- }
+ }
$r->print(''.$lt{'tfh'}.': '.join(' , ',map { $description{$_}; } @roles_by_num).' .');
if ($permission->{'owner'}) {
$r->print(' '.$lt{'aco'}.'
');
@@ -7468,7 +7466,7 @@ ENDJS
my $id;
if ($count == 0) {
$id=' id="LC_current_minitab"';
- $visibility{$role} = ' style="display:block"';
+ $visibility{$role} = ' style="display:block"';
} else {
$visibility{$role} = ' style="display:none"';
}
@@ -7488,11 +7486,11 @@ ENDJS
priv => 'block',
);
my (%selected,$overridden,$incrscheck,$indomcheck,$indomvis,$incrsvis);
- if (ref($settings{$role}) eq 'HASH') {
+ if (ref($settings{$role}) eq 'HASH') {
if ($settings{$role}{'access'} ne '') {
$indomvis = ' style="display:none"';
$incrsvis = ' style="display:block"';
- $incrscheck = ' checked="checked"';
+ $incrscheck = ' checked="checked"';
if ($settings{$role}{'access'} ne 'all') {
$usecheck{$settings{$role}{'access'}} = $usecheck{'all'};
delete($usecheck{'all'});
@@ -7519,7 +7517,7 @@ ENDJS
}
} else {
$indomcheck = ' checked="checked"';
- $indomvis = ' style="display:block"';
+ $indomvis = ' style="display:block"';
$incrsvis = ' style="display:none"';
}
$r->print('
'.
@@ -7719,13 +7717,13 @@ sub role_priv_table {
$checked = ' checked="checked"';
}
$customstatus = '
';
- $ineffect = $customstatus;
+ $ineffect = $customstatus;
} elsif ((!$levelscurrent->{'course'}{$priv}) && ($on{$priv})) {
if ($permission->{'owner'}) {
- $checked = ' checked="checked"';
+ $checked = ' checked="checked"';
}
$customstatus = '
';
- $ineffect = $customstatus;
+ $ineffect = $customstatus;
}
if ($permission->{'owner'}) {
$output .= '
';
@@ -7740,7 +7738,7 @@ sub role_priv_table {
}
sub get_adhocrole_settings {
- my ($cid,$accesstypes,$types,$customroles,$settings,$overridden) = @_;
+ my ($cid,$accesstypes,$types,$customroles,$settings,$overridden) = @_;
return unless ((ref($accesstypes) eq 'ARRAY') && (ref($customroles) eq 'HASH') &&
(ref($settings) eq 'HASH') && (ref($overridden) eq 'HASH'));
foreach my $role (split(/,/,$env{'course.'.$cid.'.internal.adhocaccess'})) {
@@ -7869,7 +7867,7 @@ sub update_helpdeskaccess {
push(@incrs,$role);
unless ($current{'access'} eq $access) {
$changed{$role}{'access'} = 1;
- $storehash{'internal.adhoc.'.$role} = $access;
+ $storehash{'internal.adhoc.'.$role} = $access;
}
if ($access eq 'status') {
my @statuses = &Apache::loncommon::get_env_multiple('form.'.$role.'_status');
@@ -7905,7 +7903,7 @@ sub update_helpdeskaccess {
my @currstaff;
foreach my $person (sort(@personnel)) {
if ($domhelpdesk{$person}) {
- push(@stored,$person);
+ push(@stored,$person);
}
}
if (ref($current{$access}) eq 'ARRAY') {
@@ -7951,7 +7949,7 @@ sub update_helpdeskaccess {
&Apache::lonuserutils::custom_role_privs($customroles{$role},\%full,\%levels,\%levelscurrent);
my (@updatedon,@updatedoff,@override);
@override = &Apache::loncommon::get_env_multiple('form.'.$role.'_override');
- if (@override) {
+ if (@override) {
foreach my $priv (sort(keys(%full))) {
next unless ($levels{'course'}{$priv});
if (grep(/^\Q$priv\E$/,@override)) {
@@ -7964,7 +7962,7 @@ sub update_helpdeskaccess {
}
}
if (@updatedon) {
- $newsettings{$role}{'on'} = join('
', map { &Apache::lonnet::plaintext($_,$crstype) } (@updatedon));
+ $newsettings{$role}{'on'} = join(' ', map { &Apache::lonnet::plaintext($_,$crstype) } (@updatedon));
}
if (@updatedoff) {
$newsettings{$role}{'off'} = join(' ', map { &Apache::lonnet::plaintext($_,$crstype) } (@updatedoff));
@@ -8072,13 +8070,13 @@ sub update_helpdeskaccess {
push(@roles_by_num,$ordered{$item});
}
%domusage = &domain_adhoc_access(\%changed,\%domcurrent,\@accesstypes,$usertypes,$othertitle);
- $r->print(&mt('Helpdesk access settings have been changed as follows').' ');
+ $r->print(&mt('Helpdesk access settings have been changed as follows').' ');
$r->print('');
foreach my $role (@roles_by_num) {
next unless (ref($changed{$role}) eq 'HASH');
$r->print(''.&mt('Ad hoc role').': '.$description{$role}.' '.
'');
- if ($changed{$role}{'access'} || $changed{$role}{'status'} || $changed{$role}{'inc'} || $changed{$role}{'exc'}) {
+ if ($changed{$role}{'access'} || $changed{$role}{'status'} || $changed{$role}{'inc'} || $changed{$role}{'exc'}) {
$r->print('');
if ($env{'form.'.$role.'_incrs'}) {
if ($newsettings{$role}{'access'} eq 'all') {
@@ -8088,7 +8086,7 @@ sub update_helpdeskaccess {
} elsif ($newsettings{$role}{'access'} eq 'status') {
if ($newsettings{$role}{'status'}) {
my ($access,$rest) = split(/=/,$storehash{'internal.adhoc.'.$role});
- if (split(/,/,$rest) > 1) {
+ if (split(/,/,$rest) > 1) {
$r->print(&mt('Helpdesk staff can use this role if their institutional type is one of: [_1].',
$newsettings{$role}{'status'}));
} else {
@@ -8123,15 +8121,15 @@ sub update_helpdeskaccess {
$r->print(' '.&mt('Privileges which are available by default for this ad hoc role, but are disabled for this specific '.lc($crstype).':').
''.$newsettings{$role}{'off'}.' ');
} else {
- $r->print(''.&mt('All privileges available by default for this ad hoc role are enabled.').' ');
+ $r->print(''.&mt('All privileges available by default for this ad hoc role are enabled.').' ');
}
}
- if ($changed{$role}{'on'}) {
+ if ($changed{$role}{'on'}) {
if ($newsettings{$role}{'on'}) {
$r->print(''.&mt('Privileges which are not available by default for this ad hoc role, but are enabled for this specific '.lc($crstype).':').
''.$newsettings{$role}{'on'}.' ');
} else {
- $r->print(''.&mt('None of the privileges unavailable by default for this ad hoc role are enabled.').' ');
+ $r->print(''.&mt('None of the privileges unavailable by default for this ad hoc role are enabled.').' ');
}
}
}
@@ -8140,7 +8138,7 @@ sub update_helpdeskaccess {
$r->print(' ');
}
} else {
- $r->print(&mt('No changes made to helpdesk access settings.'));
+ $r->print(&mt('No changes made to helpdesk access settings.'));
}
}
return;
@@ -8619,7 +8617,6 @@ sub build_search_response {
,' '
,' ')
.' ';
-
}
}
}