--- loncom/interface/loncreateuser.pm 2007/12/14 00:20:53 1.209 +++ loncom/interface/loncreateuser.pm 2007/12/14 21:27:07 1.211 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.209 2007/12/14 00:20:53 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.211 2007/12/14 21:27:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -295,7 +295,7 @@ $userpicker ENDBLOCK - if ($cancreate) { + if ($cancreate && $env{'form.phase'} eq '') { my $defdom=$env{'request.role.domain'}; my $domform = &Apache::loncommon::select_dom_form($defdom,'srchdomain'); my $helpcrt=&Apache::loncommon::help_open_topic('Course_Change_Privileges'); @@ -738,8 +738,8 @@ $loginscript ENDTITLE $r->print('
'); my $personal_table = - &personal_data_display($ccuname,$ccdomain,$newuser, - $context,%inst_results); + &personal_data_display($ccuname,$ccdomain,$newuser,$context, + $inst_results{$ccuname.':'.$ccdomain}); $r->print($personal_table); my ($home_server_pick,$numlib) = &Apache::loncommon::home_server_form_item($ccdomain,'hserver', @@ -819,8 +819,8 @@ $forminfo ENDCHANGEUSER $r->print('
'); my ($personal_table,$showforceid) = - &personal_data_display($ccuname,$ccdomain,$newuser, - $context,%inst_results); + &personal_data_display($ccuname,$ccdomain,$newuser,$context, + $inst_results{$ccuname.':'.$ccdomain}); $r->print($personal_table); if ($showforceid) { $r->print(&Apache::lonuserutils::forceid_change($context)); @@ -1353,7 +1353,7 @@ sub modify_login_block { } sub personal_data_display { - my ($ccuname,$ccdomain,$newuser,$context,%inst_results) = @_; + my ($ccuname,$ccdomain,$newuser,$context,$inst_results) = @_; my ($output,$showforceid,%userenv,%domconfig); if (!$newuser) { # Get the users information @@ -1394,8 +1394,12 @@ sub personal_data_display { } $output .= &Apache::lonhtmlcommon::row_title($rowtitle,undef,'LC_oddrow_value')."\n"; if ($newuser) { - if ($inst_results{$item} ne '') { - $output .= ''.$inst_results{$item}; + if (ref($inst_results) eq 'HASH') { + if ($inst_results->{$item} ne '') { + $output .= ''.$inst_results->{$item}; + } else { + $output .= ''; + } } else { $output .= ''; } @@ -3351,8 +3355,18 @@ sub crumb_utilities { my $jsback .= qq| function backPage(formname,prevphase,prevstate) { - formname.phase.value = prevphase; - formname.currstate.value = prevstate; + if (typeof prevphase == 'undefined') { + formname.phase.value = ''; + } + else { + formname.phase.value = prevphase; + } + if (typeof prevstate == 'undefined') { + formname.currstate.value = ''; + } + else { + formname.currstate.value = prevstate; + } formname.submit(); } |;