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

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 17 Mar 2004 19:56:47 -0000


matthew		Wed Mar 17 14:56:47 2004 EDT

  Modified files:              
    /loncom/interface	londropadd.pm 
  Log:
  Added count column to classlist output.
  
  
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.107 loncom/interface/londropadd.pm:1.108
--- loncom/interface/londropadd.pm:1.107	Mon Mar  8 12:31:37 2004
+++ loncom/interface/londropadd.pm	Wed Mar 17 14:56:47 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.107 2004/03/08 17:31:37 www Exp $
+# $Id: londropadd.pm,v 1.108 2004/03/17 19:56:47 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1218,7 +1218,8 @@
 <input type="hidden" name="sdom"   value="" />
 <p>
 <table border=2>
-<tr><th>
+<tr><th>Count
+    </th><th>
        <a href="javascript:document.studentform.sortby.value='username';document.studentform.submit();">$lt{'usrn'}</a>
     </th><th>
        <a href="javascript:document.studentform.sortby.value='domain';document.studentform.submit();">$lt{'dom'}</a>
@@ -1296,6 +1297,7 @@
             ||
         lc($classlist->{$a}->[$third]) cmp lc($classlist->{$b}->[$third])
         } (keys(%$classlist));
+    my $studentcount = 0;
     foreach my $student (@Sorted_Students) {
         my $username = $classlist->{$student}->[$index{'username'}];
         my $domain   = $classlist->{$student}->[$index{'domain'}];
@@ -1305,7 +1307,7 @@
         my $status   = $classlist->{$student}->[$index{'status'}];
         next if (($statusmode ne 'Any') && ($status ne $statusmode));
         if ($mode eq 'view') {
-            $r->print("<tr>\n    <td>\n        ");
+            $r->print("<tr>\n    <td>".(++$studentcount)."</td><td>\n    ");
             if ($linkto eq 'nothing') {
                 $r->print($username);
             } elsif ($linkto eq 'aboutme') {