[LON-CAPA-cvs] cvs: loncom /homework grades.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 19 Nov 2007 10:57:28 -0000
foxr Mon Nov 19 05:57:28 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
BZ4074 - Label bubble lines in scantron_bubble_selector with the
scantron sheet line number rather than labelling a group
with the question number.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.495 loncom/homework/grades.pm:1.496
--- loncom/homework/grades.pm:1.495 Fri Nov 16 03:55:02 2007
+++ loncom/homework/grades.pm Mon Nov 19 05:57:23 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.495 2007/11/16 08:55:02 albertel Exp $
+# $Id: grades.pm,v 1.496 2007/11/19 10:57:23 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6669,17 +6669,16 @@
if ($scmode eq 'number' || $scmode eq 'letter') { $max=10; }
my $response = $quest-1;
- my $lines = $bubble_lines_per_response{$response};
+ my $lines = $bubble_lines_per_response{$response};
+ my $line_number = $first_bubble_line{$response} +1;
my $total_lines = $lines*2;
my @alphabet=('A'..'Z');
- $r->print("<table border='1'><tr><td rowspan='".$total_lines."'>$quest</td>");
+ $r->print("<table border='1'>\n");
for (my $l = 0; $l < $lines; $l++) {
- if ($l != 0) {
- $r->print('<tr>');
- }
+ $r->print("<tr><td></td>\n");
my @selected = split(//,$lines[$l]);
for (my $i=0;$i<$max;$i++) {
$r->print("\n".'<td align="center">');
@@ -6701,11 +6700,10 @@
}
- $r->print('</tr><tr>');
+ $r->print("</tr><tr><td>$line_number</td>");
# FIXME: This may have to be a bit more clever for
# multiline questions (different values e.g..).
-
for (my $i=0;$i<$max;$i++) {
my $value = "$l:$i"; # Relative bubble line #: Bubble in line.
$r->print("\n".
@@ -6713,7 +6711,7 @@
$quest.'" value="'.$value.'" />'.$alphabet[$i]."</label></td>");
}
$r->print('</tr>');
-
+ $line_number++;
}
$r->print('</table>');