--- loncom/interface/statistics/lonstathelpers.pm 2020/08/31 14:36:19 1.77
+++ loncom/interface/statistics/lonstathelpers.pm 2020/09/12 20:21:30 1.79
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.77 2020/08/31 14:36:19 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.79 2020/09/12 20:21:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -188,7 +188,7 @@ sub problem_selector {
$rowspan = ' rowspan="'.$totalresps.'"';
}
$seq_str .= &Apache::loncommon::start_data_table_row().
- '
'.
+ ' | '.
'';
my $link = $res->link.'?symb='.&escape($res->shown_symb);
@@ -210,7 +210,9 @@ sub problem_selector {
my $resptype = $response_types[$i];
if ($resptype =~ m/$AcceptedResponseTypes/) {
if ($byres) {
- unless (exists($partsseen{$part})) {
+ if (exists($partsseen{$part})) {
+ $seq_str .= &Apache::loncommon::continue_data_table_row();
+ } else {
my $parttitle = $part;
if ($part eq '0') {
$parttitle = '';
@@ -222,7 +224,11 @@ sub problem_selector {
$seq_str .= &Apache::loncommon::continue_data_table_row();
}
unless ($partsseen{$part}) {
- $seq_str .= ' | '.
+ my $resprowspan;
+ if (scalar(@response_ids) > 1) {
+ $resprowspan = ' rowspan="'.scalar(@response_ids).'"';
+ }
+ $seq_str .= ' | '.
$parttitle.' | ';
$partsseen{$part} = scalar(@response_ids);
}
@@ -256,8 +262,8 @@ sub problem_selector {
$seq_str .= (' 'x2).
''.&mt('view').'';
$seq_str .= "". &Apache::loncommon::end_data_table_row()."\n";
- $rb_count++;
}
+ $rb_count++;
}
}
}
@@ -284,6 +290,15 @@ sub problem_selector {
}
}
$Str .= &Apache::loncommon::end_data_table().&Apache::loncommon::end_scrollbox()."\n";
+ if (!$rb_count) {
+ if ($byres) {
+ $Str = ''.&mt('No gradable problems found').'
';
+ } elsif ($AcceptedResponseTypes eq '.') {
+ $Str = ''.&mt('No problems found').'
';
+ } else {
+ $Str = ''.&mt('No analyzable problems found').'
';
+ }
+ }
return $Str;
}