--- loncom/interface/lonuserutils.pm 2008/01/20 00:19:11 1.49 +++ loncom/interface/lonuserutils.pm 2008/01/20 22:25:05 1.50 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.49 2008/01/20 00:19:11 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.50 2008/01/20 22:25:05 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1994,19 +1994,30 @@ function username_display_launch(usernam } } if (target == 'modify') { - document.studentform.srchterm.value=username; - document.studentform.srchdomain.value=domain; - document.studentform.phase.value='get_user_info'; - document.studentform.action.value = 'singleuser'; - document.studentform.submit(); + if (document.studentform.userwin.checked == true) { + var url = '/adm/createuser?srchterm='+username+'&srchdomain='+domain+'&phase=get_user_info&action=singleuser&srchin=dom&srchby=uname&srchtype=exact&popup=1'; + var options = 'height=600,width=800,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'; + modifywin = window.open(url,'',options,1); + modifywin.focus(); + return; + } else { + document.studentform.srchterm.value=username; + document.studentform.srchdomain.value=domain; + document.studentform.phase.value='get_user_info'; + document.studentform.action.value = 'singleuser'; + document.studentform.submit(); + } } if (target == 'aboutme') { - document.location.href = '/adm/'+domain+'/'+username+'/aboutme'; - } - if (target == 'aboutmewin') { - var url = '/adm/'+domain+'/'+username+'/aboutme'; - var options = 'height=600,width=800,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'; - aboutmewin = window.open(url,'',options,1); + if (document.studentform.userwin.checked == true) { + var url = '/adm/'+domain+'/'+username+'/aboutme?popup=1'; + var options = 'height=600,width=800,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'; + aboutmewin = window.open(url,'',options,1); + aboutmewin.focus(); + return; + } else { + document.location.href = '/adm/'+domain+'/'+username+'/aboutme'; + } } } @@ -2041,7 +2052,7 @@ END 'ac' => "Action to take for selected users", 'link' => "Behavior of username links", 'aboutme' => "Display a user's personal page", - 'aboutmewin' => "Display a user's personal page in a new window", + 'owin' => "Open in a new window", 'modify' => "Modify a user's information", ); if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { @@ -2098,7 +2109,7 @@ END END $output = '

'; - my @linkdests = ('aboutme','aboutmewin'); + my @linkdests = ('aboutme'); if ($permission->{'cusr'}) { unshift (@linkdests,'modify'); } @@ -2114,7 +2125,11 @@ END } $output .= '  '; } - $output .= '
'; + my $checkwin; + if ($env{'form.userwin'}) { + $checkwin = 'checked = "checked"'; + } + $output .= '    '.$lt{'owin'}.'
'; if ($actionselect) { $output .= <<"END"; $lt{'ac'}: $actionselect