--- loncom/interface/loncreateuser.pm 2014/02/12 21:29:03 1.391 +++ loncom/interface/loncreateuser.pm 2014/03/03 17:11:41 1.396 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.391 2014/02/12 21:29:03 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.396 2014/03/03 17:11:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1271,11 +1271,9 @@ ENDTITLE } $r->print('
'); if ($crstype eq 'Community') { - $r->print(&mt('If the member is currently logged-in to LON-CAPA, the new role will be available when the member next logs in.')); + $r->print(&mt('If the member is currently logged-in to LON-CAPA, the new role can be displayed by using the "Check for changes" link on the Roles/Courses page.')); } else { - $r->print(&mt('If the student is currently logged-in to LON-CAPA, the new role will be available when the student next logs in.')); + $r->print(&mt('If the student is currently logged-in to LON-CAPA, the new role can be displayed by using the "Check for changes" link on the Roles/Courses page.')); } $r->print('
'); } @@ -4177,6 +4185,7 @@ sub custom_role_editor { my $dompriv=''; my $coursepriv=''; my $body_top; + my $newrole; my ($rdummy,$roledef)= &Apache::lonnet::get('roles',["rolesdef_$rolename"]); # ------------------------------------------------------- Does this role exist? @@ -4189,6 +4198,7 @@ sub custom_role_editor { $syspriv =~ s/bre\&S//; } } else { + $newrole = 1; $body_top .= &mt('New Role').' "'; $roledef=''; } @@ -4458,6 +4468,7 @@ sub set_custom_role { bread_crumbs_component => 'User Management'}; $r->print(&Apache::loncommon::start_page('Save Custom Role',$jscript,$args)); + my $newrole; my ($rdummy,$roledef)= &Apache::lonnet::get('roles',["rolesdef_$rolename"]); @@ -4468,6 +4479,7 @@ sub set_custom_role { } else { $r->print(&mt('New Role').' "'); $roledef=''; + $newrole = 1; } $r->print($rolename.'"'); # ------------------------------------------------------- What can be assigned? @@ -4810,26 +4822,47 @@ sub handler { if (ref($domconfig{'usercreation'}) eq 'HASH') { if (ref($domconfig{'usercreation'}{'cancreate'}) eq 'HASH') { if (ref($domconfig{'usercreation'}{'cancreate'}{'emailusername'}) eq 'HASH') { - my $count = scalar(keys(%{$domconfig{'usercreation'}{'cancreate'}{'emailusername'}})); my %info = &Apache::lonnet::get('nohist_requestedusernames',[$uname],$dom,$domconfiguser); if (ref($info{$uname}) eq 'HASH') { - if ((ref($infofields) eq 'ARRAY') && (ref($infotitles) eq 'HASH')) { - $r->print('