--- loncom/interface/lonuserutils.pm	2008/01/07 03:00:00	1.47
+++ loncom/interface/lonuserutils.pm	2008/01/20 00:19:11	1.49
@@ -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.49 2008/01/20 00:19:11 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);
+    }
 }
 </script>
 $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
 <input type="hidden" name="srchdomain" value="" /> 
 END
             $output = '<p>';
-            my @linkdests = ('aboutme');
+            my @linkdests = ('aboutme','aboutmewin');
             if ($permission->{'cusr'}) {
-                push (@linkdests,'modify');
-                $output .= '<span class="LC_nobreak">'.$lt{'link'}.':&nbsp;';
-                my $usernamelink = $env{'form.usernamelink'};
-                if ($usernamelink eq '') {
-                    $usernamelink = 'aboutme';
-                }
-                foreach my $item (@linkdests) {
-                    my $checkedstr = '';
-                    if ($item eq $usernamelink) {
-                        $checkedstr = ' checked="checked" ';
-                    }
-                    $output .= '<label><input type="radio" name="usernamelink" value="'.$item.'"'.$checkedstr.'>&nbsp;'.$lt{$item}.'</label>&nbsp;&nbsp;';
+                unshift (@linkdests,'modify');
+            }
+            $output .= '<span class="LC_nobreak">'.$lt{'link'}.':&nbsp;';
+            my $usernamelink = $env{'form.usernamelink'};
+            if ($usernamelink eq '') {
+                $usernamelink = 'aboutme';
+            }
+            foreach my $item (@linkdests) {
+                my $checkedstr = '';
+                if ($item eq $usernamelink) {
+                    $checkedstr = ' checked="checked" ';
                 }
-                $output .= '</span><br />';
-            } else {
-                $output .= &mt("Click on a username to view the user's personal page.").'<br />';
+                $output .= '<label><input type="radio" name="usernamelink" value="'.$item.'"'.$checkedstr.'>&nbsp;'.$lt{$item}.'</label>&nbsp;&nbsp;';
             }
+            $output .= '</span><br />';
             if ($actionselect) {
                 $output .= <<"END";
 $lt{'ac'}:&nbsp;$actionselect <input type="button" value="$lt{'go'}" onclick="javascript:opendatebrowser(this.form,'studentform','go')" /></p>
@@ -2463,8 +2467,7 @@ END
             }
             foreach my $item (@cols) {
                 if ($item eq 'username') {
-                    $r->print('<td>'.&print_username_link($mode,$permission,
-                                                          \%in).'</td>');
+                    $r->print('<td>'.&print_username_link($mode,\%in).'</td>');
                 } elsif (($item eq 'start' || $item eq 'end') && ($actionselect)) {
                     $r->print('<td>'.$in{$item}.'<input type="hidden" name="'.$checkval.'_'.$item.'" value="'.$sdata->[$index{$item}].'" /></td>'."\n");
                 } else {
@@ -2548,14 +2551,10 @@ END
 }
 
 sub print_username_link {
-    my ($mode,$permission,$in) = @_;
+    my ($mode,$in) = @_;
     my $output;
     if ($mode eq 'autoenroll') {
         $output = $in->{'username'};
-    } elsif (!$permission->{'cusr'}) {
-        $output = &Apache::loncommon::aboutmewrapper($in->{'username'},
-                                                     $in->{'username'},
-                                                     $in->{'domain'});
     } else {
         $output = '<a href="javascript:username_display_launch('.
                   "'$in->{'username'}','$in->{'domain'}'".')" />'.
@@ -2666,20 +2665,14 @@ sub select_actions {
 
 sub date_section_javascript {
     my ($context,$setting) = @_;
-    my $title;
-    if (($context eq 'course') || ($context eq 'domain' && $setting eq 'course'))  {
-        $title = &mt('Date and Section selector');
-    } else {
-        $title = &mt('Date selector');
-    }
+    my $title = 'Date_And_Section_Selector';
     my %nopopup = &Apache::lonlocal::texthash (
         revoke => "Check the boxes for any users for whom roles are to be revoked, and click 'Proceed'",
         delete => "Check the boxes for any users for whom roles are to be deleted, and click 'Proceed'",
         none   => "Choose an action to take for selected users",
     );  
     my $output = '
-<script type="text/javascript">
-    var stdeditbrowser;'."\n";
+<script type="text/javascript">'."\n";
     $output .= <<"ENDONE";
     function opendatebrowser(callingform,formname,calledby) {
         var bulkaction = callingform.bulkaction.options[callingform.bulkaction.selectedIndex].value;