--- loncom/interface/loncreateuser.pm 2010/10/08 01:59:39 1.351 +++ loncom/interface/loncreateuser.pm 2011/01/05 18:42:53 1.353 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.351 2010/10/08 01:59:39 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.353 2011/01/05 18:42:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -638,7 +638,6 @@ END sub entry_form { my ($dom,$srch,$forcenewuser,$context,$responsemsg,$crstype) = @_; - my %domconf = &Apache::lonnet::get_dom('configuration',['usercreation'],$dom); my ($usertype,$inexact); if (ref($srch) eq 'HASH') { if (($srch->{'srchin'} eq 'dom') && @@ -646,9 +645,10 @@ sub entry_form { ($srch->{'srchtype'} eq 'exact') && ($srch->{'srchdomain'} ne '') && ($srch->{'srchterm'} ne '')) { + my (%curr_rules,%got_rules); my ($rules,$ruleorder) = &Apache::lonnet::inst_userrules($srch->{'srchdomain'},'username'); - $usertype = &Apache::lonuserutils::check_usertype($srch->{'srchdomain'},$srch->{'srchterm'},$rules); + $usertype = &Apache::lonuserutils::check_usertype($srch->{'srchdomain'},$srch->{'srchterm'},$rules,\%curr_rules,\%got_rules); } else { $inexact = 1; } @@ -942,7 +942,8 @@ sub print_user_modification_page { my ($rules,$ruleorder) = &Apache::lonnet::inst_userrules($ccdomain,'username'); $usertype = - &Apache::lonuserutils::check_usertype($ccdomain,$ccuname,$rules); + &Apache::lonuserutils::check_usertype($ccdomain,$ccuname,$rules, + \%curr_rules,\%got_rules); my $cancreate = &Apache::lonuserutils::can_create_user($ccdomain,$context, $usertype); @@ -1346,7 +1347,7 @@ ENDNOTOOLSPRIV } $r->print(&Apache::lonhtmlcommon::echo_form_input(['phase','userrole','ccdomain','prevphase','currstate','ccuname','ccdomain'])); $r->print(''); - $r->print(''); + $r->print(''); return; } @@ -3929,21 +3930,22 @@ sub set_custom_role { .$jsback."\n" .'// ]]>'."\n" .''."\n"; - my $brcrum = [{href => "javascript:backPage(document.customresult,'pickrole','')", - text => "Pick custom role", - faq => 282, - bug => 'Instructor Interface',}, - {href => "javascript:backPage(document.customresult,'selected_custom_edit','')", - text => "Edit custom role", - faq => 282, - bug => 'Instructor Interface',}, - {href => "javascript:backPage(document.customresult,'set_custom_roles','')", - text => "Result", - faq => 282, - bug => 'Instructor Interface', - help => 'Course_Editing_Custom_Roles'}, - ]; - my $args = { bread_crumbs => $brcrum, + push(@{$brcrum}, + {href => "javascript:backPage(document.customresult,'pickrole','')", + text => "Pick custom role", + faq => 282, + bug => 'Instructor Interface',}, + {href => "javascript:backPage(document.customresult,'selected_custom_edit','')", + text => "Edit custom role", + faq => 282, + bug => 'Instructor Interface',}, + {href => "javascript:backPage(document.customresult,'set_custom_roles','')", + text => "Result", + faq => 282, + bug => 'Instructor Interface', + help => 'Course_Editing_Custom_Roles'}, + ); + my $args = { bread_crumbs => $brcrum, bread_crumbs_component => 'User Management'}; $r->print(&Apache::loncommon::start_page('Save Custom Role',$jscript,$args));