--- loncom/interface/loncreateuser.pm 2011/06/20 19:04:42 1.355 +++ loncom/interface/loncreateuser.pm 2011/09/25 23:07:49 1.358 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.355 2011/06/20 19:04:42 www Exp $ +# $Id: loncreateuser.pm,v 1.358 2011/09/25 23:07:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1322,7 +1322,7 @@ ENDNOTOOLSPRIV $addrolesdisplay = &new_coauthor_roles($r,$ccuname,$ccdomain); } if ($context eq 'domain') { - my $add_domainroles = &new_domain_roles($r); + my $add_domainroles = &new_domain_roles($r,$ccdomain); if (!$addrolesdisplay) { $addrolesdisplay = $add_domainroles; } @@ -1765,7 +1765,7 @@ sub new_coauthor_roles { } sub new_domain_roles { - my ($r) = @_; + my ($r,$ccdomain) = @_; my $addrolesdisplay = 0; # # Domain level @@ -1783,6 +1783,7 @@ sub new_domain_roles { foreach my $thisdomain (sort(&Apache::lonnet::all_domains())) { foreach my $role (@allroles) { next if ($role eq 'ad'); + next if (($role eq 'au') && ($ccdomain ne $thisdomain)); if (&Apache::lonnet::allowed('c'.$role,$thisdomain)) { my $plrole=&Apache::lonnet::plaintext($role); my %lt=&Apache::lonlocal::texthash( @@ -4041,6 +4042,10 @@ sub handler { my ($permission,$allowed) = &Apache::lonuserutils::get_permission($context,$crstype); if (!$allowed) { + if ($context eq 'course') { + $r->internal_redirect('/adm/viewclasslist'); + return OK; + } $env{'user.error.msg'}= "/adm/createuser:cst:0:0:Cannot create/modify user data ". "or view user status."; @@ -6208,7 +6213,7 @@ sub course_level_dc { ''. ''; my $courseform=&Apache::loncommon::selectcourse_link - ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course/Community','crstype'); + ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Select','crstype'); my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu','role','Course/Community Browser'); my %lt=&Apache::lonlocal::texthash( 'rol' => "Role", @@ -6227,8 +6232,8 @@ sub course_level_dc { ''.$lt{'scc'}.''.$lt{'rol'}.''.$lt{'grs'}.''.$lt{'sta'}.''.$lt{'end'}.''. &Apache::loncommon::end_data_table_header_row(); my $otheritems = &Apache::loncommon::start_data_table_row()."\n". - '
'. - $courseform.''."\n". + '
'. + $courseform.(' ' x4).''."\n". '