[LON-CAPA-cvs] cvs: loncom /auth roles.tab /interface loncreateuser.pm
raeburn
raeburn@source.lon-capa.org
Mon, 15 Dec 2008 00:12:38 -0000
raeburn Mon Dec 15 00:12:38 2008 EDT
Modified files:
/loncom/auth roles.tab
/loncom/interface loncreateuser.pm
Log:
- Correct display of privileges for "Templates" for Course Coordinator and Instructor, in Custom Role Editor.
- Need to check for domain-based or system-based privs for course privs.
- Need to check for system-based privs for domain privs.
- sma priv is domain based for cr, but system based for cc, in
- bre priv is system based only for cc.
- Add las, pac, and dch privs to cc:c.
Index: loncom/auth/roles.tab
diff -u loncom/auth/roles.tab:1.55 loncom/auth/roles.tab:1.56
--- loncom/auth/roles.tab:1.55 Mon Dec 8 22:49:19 2008
+++ loncom/auth/roles.tab Mon Dec 15 00:12:31 2008
@@ -2,7 +2,7 @@
dc:s bre:sma:adv:mcr:srm
dc:d cli&UIK:cau&UIK:cca&UIK:caa&UIK:cdg&UIK:mau:ccc&U:cin&UIK:cta&UIK:cep&UIK:ccr&UIK:cst&UIK:cad&UIK:csc&UIK:dro:mky:psa:usc:mpq:mut
cc:s bre:sma:mcr:vsa:adv:vcl
-cc:c cin&IK:cta&IK:cep&IK:ccr&IK:cst&IK:are:cre:ere:vgr:gan:dcm:evb:srm:dff:opa:mgr:mqg:mgq:rin:pch:plc:mdc:usc:vsa:vcl:mdg:vcg:pav:pfo:whn
+cc:c cin&IK:cta&IK:cep&IK:ccr&IK:cst&IK:are:cre:ere:vgr:gan:dcm:evb:srm:dff:opa:mgr:mqg:mgq:rin:pch:plc:mdc:usc:vsa:vcl:mdg:vcg:pav:pfo:whn:las:pac:dch
in:s sma:vgr:adv
in:c vgr:mgr:mqg:mgq:gan:dcm:evb:srm:pch&C:plc&C:dch:pac:rin:las:opa:bre:vcl:vcg:pav:pfo:whn:dff
ta:d sma
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.268 loncom/interface/loncreateuser.pm:1.269
--- loncom/interface/loncreateuser.pm:1.268 Sun Dec 14 14:36:18 2008
+++ loncom/interface/loncreateuser.pm Mon Dec 15 00:12:38 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.268 2008/12/14 14:36:18 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.269 2008/12/15 00:12:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2928,34 +2928,35 @@
my ($priv_item, $dummy) = split(/\&/,$priv);
$role_c{$priv_item} = 1;
}
+ my %role_d;
+ @temp = split(/:/,$Apache::lonnet::pr{$role.':d'});
+ foreach my $priv(@temp) {
+ my ($priv_item, $dummy) = split(/\&/,$priv);
+ $role_d{$priv_item} = 1;
+ }
+ my %role_s;
+ @temp = split(/:/,$Apache::lonnet::pr{$role.':s'});
+ foreach my $priv(@temp) {
+ my ($priv_item, $dummy) = split(/\&/,$priv);
+ $role_s{$priv_item} = 1;
+ }
foreach my $priv_item (keys(%full_c)) {
my ($priv, $dummy) = split(/\&/,$priv_item);
- if (exists($role_c{$priv})) {
+ if ((exists($role_c{$priv})) || (exists($role_d{$priv})) ||
+ (exists($role_s{$priv}))) {
$return_script .= "document.form1.$priv"."_c.checked = true;\n";
} else {
$return_script .= "document.form1.$priv"."_c.checked = false;\n";
}
}
- my %role_d;
- @temp = split(/:/,$Apache::lonnet::pr{$role.':d'});
- foreach my $priv(@temp) {
- my ($priv_item, $dummy) = split(/\&/,$priv);
- $role_d{$priv_item} = 1;
- }
foreach my $priv_item (keys(%full_d)) {
my ($priv, $dummy) = split(/\&/,$priv_item);
- if (exists($role_d{$priv})) {
+ if ((exists($role_d{$priv})) || (exists($role_s{$priv}))) {
$return_script .= "document.form1.$priv"."_d.checked = true;\n";
} else {
$return_script .= "document.form1.$priv"."_d.checked = false;\n";
}
}
- my %role_s;
- @temp = split(/:/,$Apache::lonnet::pr{$role.':s'});
- foreach my $priv(@temp) {
- my ($priv_item, $dummy) = split(/\&/,$priv);
- $role_s{$priv_item} = 1;
- }
foreach my $priv_item (keys(%full_s)) {
my ($priv, $dummy) = split(/\&/,$priv_item);
if (exists($role_s{$priv})) {