--- loncom/interface/loncreateuser.pm 2003/07/17 19:40:39 1.59
+++ loncom/interface/loncreateuser.pm 2003/07/18 13:45:14 1.60
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.59 2003/07/17 19:40:39 www Exp $
+# $Id: loncreateuser.pm,v 1.60 2003/07/18 13:45:14 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,7 +46,7 @@
# 05/10,10/16 Gerd Kortemeyer
# 02/11/02 Matthew Hall
#
-# $Id: loncreateuser.pm,v 1.59 2003/07/17 19:40:39 www Exp $
+# $Id: loncreateuser.pm,v 1.60 2003/07/18 13:45:14 www Exp $
###
package Apache::loncreateuser;
@@ -264,7 +264,7 @@ ENDNEWUSER
$dochead
Change User Privileges
$forminfo
-User "$ccuname" in domain $ccdomain
+User "$ccuname" in domain "$ccdomain"
ENDCHANGEUSER
# Get the users information
my %userenv = &Apache::lonnet::get('environment',
@@ -875,6 +875,7 @@ sub custom_role_editor {
'Create Users, Change User Privileges').'');
my ($rdummy,$roledef)=
&Apache::lonnet::get('roles',["rolesdef_$rolename"]);
+# ------------------------------------------------------- Does this role exist?
if (($rdummy ne 'con_lost') && ($roledef ne '')) {
$r->print('Existing Role "');
} else {
@@ -882,6 +883,28 @@ sub custom_role_editor {
$roledef='';
}
$r->print($rolename.'"
');
+# ------------------------------------------------------- What can be assigned?
+ my %full=();
+ my %courselevel=();
+ foreach (split(/\:/,$Apache::lonnet::pr{'cr:c'})) {
+ my ($priv,$restrict)=split(/\&/,$_);
+ unless ($restrict) { $restrict='F'; }
+ $courselevel{$priv}=$restrict;
+ $full{$priv}=1;
+ }
+ my %domainlevel=();
+ foreach (split(/\:/,$Apache::lonnet::pr{'cr:d'})) {
+ my ($priv,$restrict)=split(/\&/,$_);
+ unless ($restrict) { $restrict='F'; }
+ $domainlevel{$priv}=$restrict;
+ $full{$priv}=1;
+ }
+ $r->print('Privilege | Course Level | Domain Level |
');
+ foreach (sort keys %full) {
+ $r->print(''.&Apache::lonnet::plaintext($_).' | '.
+ $courselevel{$_}.' | '.$domainlevel{$_}.' |
');
+ }
+ $r->print('
');
$r->print('Not yet implemented.');
}