[LON-CAPA-cvs] cvs: loncom /auth rolesplain.tab /lonnet/perl lonnet.pm
www
www at source.lon-capa.org
Fri May 18 11:31:41 EDT 2012
www Fri May 18 15:31:41 2012 EDT
Modified files:
/loncom/auth rolesplain.tab
/loncom/lonnet/perl lonnet.pm
Log:
Some documentation
Index: loncom/auth/rolesplain.tab
diff -u loncom/auth/rolesplain.tab:1.42 loncom/auth/rolesplain.tab:1.43
--- loncom/auth/rolesplain.tab:1.42 Fri Oct 21 16:03:11 2011
+++ loncom/auth/rolesplain.tab Fri May 18 15:31:35 2012
@@ -19,6 +19,7 @@
ta:Teaching Assistant:Assistant Leader
ep:Exam Proctor
cr:Course Custom Role:Community Custom Role
+gr:Course Group Member:Community Group Member
st:Student:Member
ad:Administrator
li:Librarian
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1167 loncom/lonnet/perl/lonnet.pm:1.1168
--- loncom/lonnet/perl/lonnet.pm:1.1167 Wed May 16 21:19:33 2012
+++ loncom/lonnet/perl/lonnet.pm Fri May 18 15:31:40 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1167 2012/05/16 21:19:33 droeschl Exp $
+# $Id: lonnet.pm,v 1.1168 2012/05/18 15:31:40 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4674,7 +4674,9 @@
my ($area,$role)=split(/=/,$entry);
$area=~s/\_\w\w$//;
my ($trole,$tend,$tstart,$group_privs);
- if ($role=~/^cr/) {
+ if ($role=~/^cr/) {
+# Custom role, defined by a user
+# e.g., user.role.cr/msu/smith/mynewrole
if ($role=~m|^(cr/$match_domain/$match_username/[a-zA-Z0-9]+)_(.*)$|) {
($trole,my $trest)=($role=~m|^(cr/$match_domain/$match_username/[a-zA-Z0-9]+)_(.*)$|);
($tend,$tstart)=split('_',$trest);
@@ -4682,11 +4684,14 @@
$trole=$role;
}
} elsif ($role =~ m|^gr/|) {
+# Role of member in a group, defined within a course/community
+# e.g., user.role.gr/msu/04935610a19ee4a5fmsul1/leopards
($trole,$tend,$tstart) = split(/_/,$role);
next if ($tstart eq '-1');
($trole,$group_privs) = split(/\//,$trole);
$group_privs = &unescape($group_privs);
} else {
+# Just a normal role, defined in roles.tab
($trole,$tend,$tstart)=split(/_/,$role);
}
my %new_role = &set_arearole($trole,$area,$tstart,$tend,$domain,
@@ -4698,10 +4703,13 @@
my $spec=$trole.'.'.$area;
my ($tdummy,$tdomain,$trest)=split(/\//,$area);
if ($trole =~ /^cr\//) {
+# Custom role, defined by a user
&custom_roleprivs(\%allroles,$trole,$tdomain,$trest,$spec,$area);
} elsif ($trole eq 'gr') {
+# Role of a member in a group, defined within a course/community
&group_roleprivs(\%allgroups,$area,$group_privs,$tend,$tstart);
} else {
+# Normal role, defined in roles.tab
&standard_roleprivs(\%allroles,$trole,$tdomain,$spec,$trest,$area);
}
if ($trole ne 'gr') {
More information about the LON-CAPA-cvs
mailing list