[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonuserutils.pm
raeburn
raeburn@source.lon-capa.org
Mon, 08 Nov 2010 21:08:28 -0000
raeburn Mon Nov 8 21:08:28 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/interface lonuserutils.pm
Log:
- Customization for GCI_3.
- Fix typo in 1.109.2.5.
- Checking if usertype can be created accommodates case insensitivity of
usernames.
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.109.2.5 loncom/interface/lonuserutils.pm:1.109.2.6
--- loncom/interface/lonuserutils.pm:1.109.2.5 Mon Sep 20 00:26:44 2010
+++ loncom/interface/lonuserutils.pm Mon Nov 8 21:08:27 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.109.2.5 2010/09/20 00:26:44 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.109.2.6 2010/11/08 21:08:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4150,7 +4150,7 @@
my (%curr_rules,%got_rules,%alerts,%cancreate);
my %customroles = &my_custom_roles($crstype);
my @permitted_roles =
- &roles_on_upload($context,$setting,$crstype,%customroles);
+ &roles_on_upload($context,$setting,$crstype,%customroles);
my %longtypes = &Apache::lonlocal::texthash(
official => 'Institutional',
unofficial => 'Non-institutional',
@@ -4351,18 +4351,17 @@
}
}
}
- }
- my $usertype = 'unofficial';
- if (ref($rulematch{$user}) eq 'HASH') {
- if ($rulematch{$user}{'username'}) {
- $usertype = 'official';
+ my $usertype = 'unofficial';
+ if (ref($rulematch{$user}) eq 'HASH') {
+ if ($rulematch{$user}{'username'}) {
+ $usertype = 'official';
+ }
+ }
+ if (!$cancreate{$usertype}) {
+ $r->print('<br />'.
+ &mt("[_1]: The user does not exist, and you are not permitted to create users of type: $longtypes{$usertype}.",'<b>'.$username.'</b>'));
+ next;
}
- }
- if (!$cancreate{$usertype}) {
- r->print('<br />'.
- &mt("[_1]: The user does not exist, and you are not permitted to create users of type: $longtypes{$usertype}.",'<b>'.$username.'</b>'));
- next;
- }
} else {
if ($context eq 'course' || $context eq 'author') {
if ($userdomain eq $domain ) {
@@ -5119,7 +5118,7 @@
accr => 'A course coordinator role will be added with access to all sections.',
acor => 'A coordinator role will be added with access to all sections',
inea => 'In each course, each user may only have one student role at a time.',
- inco => 'In each community, each user may only have on member role at a time.',
+ inec => 'In each community, each user may only have on member role at a time.',
youh => 'You had selected ',
secs => 'sections.',
plmo => 'Please modify your selections so they include no more than one section.',
@@ -5184,7 +5183,7 @@
if (crstype == 'Community') {
alert("$alerts{'inea'} $alerts{'youh'} "+numsec+" $alerts{'secs'}\\n$alerts{'plmo'}");
} else {
- alert("$alerts{'inco'} $alerts{'youh'} "+numsec+" $alerts{'secs'}\\n$alerts{'plmo'}");
+ alert("$alerts{'inec'} $alerts{'youh'} "+numsec+" $alerts{'secs'}\\n$alerts{'plmo'}");
}
return;
}