--- loncom/interface/statistics/lonstathelpers.pm 2004/08/25 17:23:06 1.20
+++ loncom/interface/statistics/lonstathelpers.pm 2004/09/15 21:07:34 1.21
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.20 2004/08/25 17:23:06 matthew Exp $
+# $Id: lonstathelpers.pm,v 1.21 2004/09/15 21:07:34 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -40,7 +40,6 @@ routines that are needed across multiple
=head1 OVERVIEW
-
=over 4
=cut
@@ -170,6 +169,161 @@ sub ProblemSelector {
=pod
+=item &MultpleProblemSelector($navmap,$ResponseTypes,$selected,$inputname)
+
+Generate HTML with checkboxes for problem selection.
+
+Input:
+
+$navmap: a navmap object. If undef, navmaps will be called to create a
+new object.
+
+$ResponseTypes: scalar containing regular expression which matches response
+types. Only those problems which contain the given response type will be
+shown.
+
+$selected: Scalar, Array, or hash reference of currently selected items.
+
+$inputname: The name of the form elements to use for the checkboxs.
+
+Returns: A string containing html for a table which lists the sequences
+and their contents. A checkbox is provided for each problem.
+
+=cut
+
+####################################################
+####################################################
+sub MultipleProblemSelector {
+ my ($navmap,$ReponseTypes,$inputname,$formname)=@_;
+ my $cid = $ENV{'request.course.id'};
+ my $Str;
+ # Massage the input as needed.
+ if (! defined($navmap)) {
+ $navmap = Apache::lonnavmaps::navmap->new();
+ if (! defined($navmap)) {
+ $Str .=
+ '