--- loncom/interface/statistics/lonstathelpers.pm 2004/09/15 21:07:34 1.21 +++ loncom/interface/statistics/lonstathelpers.pm 2004/10/04 19:11:38 1.28 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstathelpers.pm,v 1.21 2004/09/15 21:07:34 matthew Exp $ +# $Id: lonstathelpers.pm,v 1.28 2004/10/04 19:11:38 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -118,6 +118,7 @@ sub ProblemSelector { my ($AcceptedResponseTypes) = @_; my $Str; $Str = "\n\n"; + my $rb_count =0; foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess('all')) { next if ($seq->{'num_assess'}<1); my $seq_str = ''; @@ -141,16 +142,17 @@ sub ProblemSelector { if (! defined($title) || $title eq '') { ($title) = ($res->{'src'} =~ m:/([^/]*)$:); } - $seq_str .= ''. + qq{}. + ''. + '\n"; + $rb_count++; } } } @@ -169,7 +171,7 @@ sub ProblemSelector { =pod -=item &MultpleProblemSelector($navmap,$ResponseTypes,$selected,$inputname) +=item &MultipleProblemSelector($navmap,$selected,$inputname) Generate HTML with checkboxes for problem selection. @@ -178,10 +180,6 @@ 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. @@ -194,7 +192,7 @@ and their contents. A checkbox is provi #################################################### #################################################### sub MultipleProblemSelector { - my ($navmap,$ReponseTypes,$inputname,$formname)=@_; + my ($navmap,$inputname,$formname)=@_; my $cid = $ENV{'request.course.id'}; my $Str; # Massage the input as needed. @@ -209,12 +207,20 @@ sub MultipleProblemSelector { my $selected = {map { ($_,1) } (&get_selected_symbs($inputname))}; # Header $Str .= <<"END"; -
'. - ''. - ''. - $resptype.''. - ''.$title.' '; -# ''.$resptype.' '.$res->{'title'}.' '; + $seq_str .= '
'; if (scalar(@{$partdata->{'ResponseIds'}}) > 1) { $seq_str .= &mt('response').' '.$respid; } + $seq_str .= (' 'x2). + qq{view}; $seq_str .= "