[LON-CAPA-cvs] cvs: loncom /interface londropadd.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Wed, 16 Oct 2002 15:02:28 -0000
matthew Wed Oct 16 11:02:28 2002 EDT
Modified files:
/loncom/interface londropadd.pm
Log:
Fixed a bug which did not allow attempts to modify students if the list had
been sorted.
CSV printout of classlist now includes an extra column specifying the users
status if the status mode is set to 'any'. If it is set to 'expired' a
brief message stating such will be printed out at the top of the sheet.
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.57 loncom/interface/londropadd.pm:1.58
--- loncom/interface/londropadd.pm:1.57 Wed Oct 16 09:00:57 2002
+++ loncom/interface/londropadd.pm Wed Oct 16 11:02:28 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.57 2002/10/16 13:00:57 matthew Exp $
+# $Id: londropadd.pm,v 1.58 2002/10/16 15:02:28 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -762,7 +762,7 @@
my $status_select = &Apache::lonhtmlcommon::StatusOptions
($ENV{'form.Status'},'studentform');
$r->print(<<END);
-<input type="hidden" name="action" value="classlist" />
+<input type="hidden" name="action" value="$ENV{'form.action'}" />
<input type="hidden" name="state" value="" />
<p>
<font size="+1">Current Classlist</font>
@@ -838,8 +838,16 @@
</tr>
END
} elsif ($mode eq 'csv') {
- $r->print('"'.join('","',("username","domain","ID","student name",
- "section")).'"'."\n");
+ if($statusmode eq 'Expired') {
+ $r->print('"Students with expired roles"');
+ }
+ if ($statusmode eq 'Any') {
+ $r->print('"'.join('","',("username","domain","ID","student name",
+ "section","status")).'"'."\n");
+ } else {
+ $r->print('"'.join('","',("username","domain","ID","student name",
+ "section")).'"'."\n");
+ }
}
#
# Sort the students
@@ -893,6 +901,9 @@
my @line = ();
foreach ($username,$domain,$id,$name,$section) {
push @line,&Apache::loncommon::csv_translate($_);
+ }
+ if ($statusmode eq 'Any') {
+ push @line,&Apache::loncommon::csv_translate($status);
}
my $tmp = $";
$" = '","';