--- loncom/interface/lonuserutils.pm 2008/01/07 03:00:00 1.47 +++ loncom/interface/lonuserutils.pm 2008/01/17 00:14:49 1.48 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.47 2008/01/07 03:00:00 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.48 2008/01/17 00:14:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2000,9 +2000,14 @@ function username_display_launch(usernam document.studentform.action.value = 'singleuser'; document.studentform.submit(); } - else { + 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); + } } $date_sec_selector @@ -2036,6 +2041,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", 'modify' => "Modify a user's information", ); if ($context eq 'domain' && $env{'form.roletype'} eq 'course') { @@ -2092,25 +2098,23 @@ END END $output = '
';
- my @linkdests = ('aboutme');
+ my @linkdests = ('aboutme','aboutmewin');
if ($permission->{'cusr'}) {
- push (@linkdests,'modify');
- $output .= ''.$lt{'link'}.': ';
- my $usernamelink = $env{'form.usernamelink'};
- if ($usernamelink eq '') {
- $usernamelink = 'aboutme';
- }
- foreach my $item (@linkdests) {
- my $checkedstr = '';
- if ($item eq $usernamelink) {
- $checkedstr = ' checked="checked" ';
- }
- $output .= ' ';
+ unshift (@linkdests,'modify');
+ }
+ $output .= ''.$lt{'link'}.': ';
+ my $usernamelink = $env{'form.usernamelink'};
+ if ($usernamelink eq '') {
+ $usernamelink = 'aboutme';
+ }
+ foreach my $item (@linkdests) {
+ my $checkedstr = '';
+ if ($item eq $usernamelink) {
+ $checkedstr = ' checked="checked" ';
}
- $output .= '
';
- } else {
- $output .= &mt("Click on a username to view the user's personal page.").'
';
+ $output .= ' ';
}
+ $output .= '
';
if ($actionselect) {
$output .= <<"END";
$lt{'ac'}: $actionselect