--- loncom/interface/loncreateuser.pm 2007/05/29 17:48:44 1.149
+++ loncom/interface/loncreateuser.pm 2007/06/07 23:11:05 1.152
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.149 2007/05/29 17:48:44 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.152 2007/06/07 23:11:05 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -751,7 +751,7 @@ END
$row.=' ';
}
my $plaintext='';
- unless ($croletitle) {
+ if (!$croletitle) {
$plaintext=&Apache::lonnet::plaintext($role_code,$class)
} else {
$plaintext=
@@ -1574,7 +1574,7 @@ sub build_roles {
} else {
foreach my $sec (@secnums) {
$sec =~ ~s/\W//g;
- unless ($sec eq "") {
+ if (!($sec eq "")) {
if (exists($$sections{$sec})) {
$$sections{$sec} ++;
} else {
@@ -1607,15 +1607,31 @@ sub custom_role_editor {
$rolename=~s/[^A-Za-z0-9]//gs;
- unless ($rolename) {
+ if (!$rolename) {
&print_username_entry_form($r);
return;
}
-
- $r->print(&Apache::loncommon::start_page('Custom Role Editor'));
+ my $head_script = "\n";
+ $head_script .= ''."\n";
+ $r->print(&Apache::loncommon::start_page('Custom Role Editor',$head_script));
my $syspriv='';
my $dompriv='';
my $coursepriv='';
+ my ($disp_dummy,$disp_roles) = &Apache::lonnet::get('roles',["st"]);
my ($rdummy,$roledef)=
&Apache::lonnet::get('roles',["rolesdef_$rolename"]);
# ------------------------------------------------------- Does this role exist?
@@ -1633,9 +1649,11 @@ sub custom_role_editor {
my %full=();
my %courselevel=();
my %courselevelcurrent=();
+ my @roles = ("ta:c","ta:d","ta:s");
foreach my $item (split(/\:/,$Apache::lonnet::pr{'cr:c'})) {
+
my ($priv,$restrict)=split(/\&/,$item);
- unless ($restrict) { $restrict='F'; }
+ if (!$restrict) { $restrict='F'; }
$courselevel{$priv}=$restrict;
if ($coursepriv=~/\:$priv/) {
$courselevelcurrent{$priv}=1;
@@ -1646,7 +1664,7 @@ sub custom_role_editor {
my %domainlevelcurrent=();
foreach my $item (split(/\:/,$Apache::lonnet::pr{'cr:d'})) {
my ($priv,$restrict)=split(/\&/,$item);
- unless ($restrict) { $restrict='F'; }
+ if (!$restrict) { $restrict='F'; }
$domainlevel{$priv}=$restrict;
if ($dompriv=~/\:$priv/) {
$domainlevelcurrent{$priv}=1;
@@ -1657,7 +1675,7 @@ sub custom_role_editor {
my %systemlevelcurrent=();
foreach my $item (split(/\:/,$Apache::lonnet::pr{'cr:s'})) {
my ($priv,$restrict)=split(/\&/,$item);
- unless ($restrict) { $restrict='F'; }
+ if (!$restrict) { $restrict='F'; }
$systemlevel{$priv}=$restrict;
if ($syspriv=~/\:$priv/) {
$systemlevelcurrent{$priv}=1;
@@ -1668,10 +1686,11 @@ sub custom_role_editor {
'prv' => "Privilege",
'crl' => "Course Level",
'dml' => "Domain Level",
- 'ssl' => "System Level"
- );
+ 'ssl' => "System Level");
+ $r->print('Select a Template
');
+ $r->print('