[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface/statistics lonstathelpers.pm

raeburn raeburn at source.lon-capa.org
Sun Sep 6 22:58:25 EDT 2020


raeburn		Mon Sep  7 02:58:25 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface/statistics	lonstathelpers.pm 
  Log:
  - For 2.11
    Backport 1.78
  
  
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.76.2.2 loncom/interface/statistics/lonstathelpers.pm:1.76.2.3
--- loncom/interface/statistics/lonstathelpers.pm:1.76.2.2	Tue Sep  1 15:11:02 2020
+++ loncom/interface/statistics/lonstathelpers.pm	Mon Sep  7 02:58:25 2020
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.76.2.2 2020/09/01 15:11:02 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.76.2.3 2020/09/07 02:58:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -181,7 +181,7 @@
                     $rowspan = ' rowspan="'.$totalresps.'"';
                 }
                 $seq_str .= &Apache::loncommon::start_data_table_row().
-                            '<td'.$rowspan.' style="vertical-align:middle">'.
+                            '<td'.$rowspan.' style="vertical-align:top">'.
                             '<label><input type="radio" name="symb" value="'.$value.'"'.$checked.' />'.
                             $title.'</label>';
                 my $link = $res->link.'?symb='.&escape($res->shown_symb);
@@ -197,7 +197,9 @@
                     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 = '';
@@ -209,7 +211,11 @@
                                     $seq_str .= &Apache::loncommon::continue_data_table_row();
                                 }
                                 unless ($partsseen{$part}) {
-                                    $seq_str .= '<td rowspan="'.scalar(@response_ids).'" style="vertical-align:middle">'.
+                                    my $resprowspan;
+                                    if (scalar(@response_ids) > 1) {
+                                        $resprowspan = ' rowspan="'.scalar(@response_ids).'"';
+                                    }
+                                    $seq_str .= '<td'.$resprowspan.' style="vertical-align:top">'.
                                                 $parttitle.'</td>';
                                     $partsseen{$part} = scalar(@response_ids);
                                 }




More information about the LON-CAPA-cvs mailing list