[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Mon, 07 Jul 2008 16:42:28 -0000


raeburn		Mon Jul  7 12:42:28 2008 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Consumers' Advisory for User Management Logs display.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.247 loncom/interface/loncreateuser.pm:1.248
--- loncom/interface/loncreateuser.pm:1.247	Fri Jul  4 14:30:30 2008
+++ loncom/interface/loncreateuser.pm	Mon Jul  7 12:42:26 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.247 2008/07/04 18:30:30 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.248 2008/07/07 16:42:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3456,8 +3456,9 @@
             $curr{$key} = $defaults{$key};
         }
     }
-    my (%whodunit,%changed);
-    $r->print(&role_display_filter($formname,$cdom,$cnum,\%curr));
+    my (%whodunit,%changed,$version);
+    ($version) = ($r->dir_config('lonVersion') =~ /^([\d\.]+)\-/);
+    $r->print(&role_display_filter($formname,$cdom,$cnum,\%curr,$version));
     my $showntablehdr = 0;
     my $tablehdr = &Apache::loncommon::start_data_table().
                    &Apache::loncommon::start_data_table_header_row().
@@ -3574,7 +3575,7 @@
 }
 
 sub role_display_filter {
-    my ($formname,$cdom,$cnum,$curr) = @_;
+    my ($formname,$cdom,$cnum,$curr,$version) = @_;
     my $context = 'course';
     my $nolink = 1;
     my $output = '<table><tr><td valign="top">'.
@@ -3625,9 +3626,14 @@
             next if (!&Apache::lonnet::auto_run($cnum,$cdom));
         }
         $output .= '<option value="'.$chgtype.'"'.$selstr.'>'.$lt{$chgtype}.'</option>'."\n";
-    } 
+    }
     $output .= '</select></td><td>&nbsp;&nbsp;</td><td valign="middle"><input type="submit" value="'.
-               &mt('Update Display').'" /></tr></table><hr noshade><br />';
+               &mt('Update Display').'" /></tr></table>'.
+               '<span class="LC_roleslog_note">'.
+               &mt('[_1]Note:[_2] Only changes made from servers running LON-CAPA 2.6.99.0 or later are displayed.');
+    if ($version) {
+        $output .= ' '.&mt('This server is version [_3].','<b>','</b>',$version);    }
+    $output .= '</span><hr noshade><br />';
     return $output;
 }