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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 24 Jun 2004 19:17:50 -0000


matthew		Thu Jun 24 15:17:50 2004 EDT

  Modified files:              
    /loncom/interface	lonstatistics.pm 
  Log:
  Bug 2405: CHRT select one student was dumb is now less so.  Added the 
  standard student selection dialogs (section and enrollment status) and an
  'update display' submit button.  Added 'status' to the table of student
  data.
  
  
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.104 loncom/interface/lonstatistics.pm:1.105
--- loncom/interface/lonstatistics.pm:1.104	Tue Jun 15 10:22:45 2004
+++ loncom/interface/lonstatistics.pm	Thu Jun 24 15:17:49 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstatistics.pm,v 1.104 2004/06/15 14:22:45 matthew Exp $
+# $Id: lonstatistics.pm,v 1.105 2004/06/24 19:17:49 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -942,9 +942,31 @@
 sub DisplayClasslist {
     my ($r)=@_;
     #
-    my @Fields = ('fullname','username','domain','id','section');
+    # Output some of the standard interface components
+    my $Str;
+    $Str .= '<p><table cellspacing="5">'."\n";
+    $Str .= '<tr>';
+    $Str .= '<th align="center"><b>'.&mt('Sections').'</b></th>';
+    $Str .= '<th align="center"><b>'.&mt('Enrollment Status').'</b></th>';
+    $Str .= '</tr>'.$/;
+    $Str .= '<tr>';
+    $Str .= '<td>'.
+        &Apache::lonstatistics::SectionSelect('Section','multiple',5).
+        '</td>';
+    $Str .= '<td>'.
+        &Apache::lonhtmlcommon::StatusOptions(undef,undef,5).
+        '</td>';
+    
+    $Str .= '</tr>'.$/;
+    $Str .= '</table></p>';
+    $Str .= '<input type="submit" name="selectstudent" value="'.
+        &mt('Update Display').'" />';
+    $r->print($Str);
+    $r->rflush();
+    #
+    my @Fields = ('fullname','username','domain','id','section','status');
     #
-    my $Str='';
+    $Str = '';
     if (! @Students) {
         if ($SelectedSections[0] eq 'all') { 
             if (lc($ENV{'form.Status'}) eq 'any') {