[LON-CAPA-cvs] cvs: loncom /homework optionresponse.pm
raeburn
raeburn@source.lon-capa.org
Wed, 01 Sep 2010 21:29:51 -0000
raeburn Wed Sep 1 21:29:51 2010 EDT
Modified files:
/loncom/homework optionresponse.pm
Log:
- Bug 6354.
- Modifying changes in rev. 1.165 (to address bug 3268).
- Prevent text in multi line options list generated in exam mode from
overlapping with each other or with foil text.
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.170 loncom/homework/optionresponse.pm:1.171
--- loncom/homework/optionresponse.pm:1.170 Mon Aug 23 11:54:31 2010
+++ loncom/homework/optionresponse.pm Wed Sep 1 21:29:51 2010
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.170 2010/08/23 11:54:31 raeburn Exp $
+# $Id: optionresponse.pm,v 1.171 2010/09/01 21:29:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -695,12 +695,12 @@
$current_length += (length($opt[$ind])+length($alphabet[$ind])+4)*2;
if ($current_length<($textwidth-$leftmargin) and $ind!=$number_of_bubbles) {
- $line.='\hskip 1pc {\small \textbf{'.$alphabet[$ind].'}}$\bigcirc$\hskip -1 mm & \hskip -3 mm {\small '.$opt[$ind].'} & ';
+ $line.='\hskip 4 mm {\small \textbf{'.$alphabet[$ind].'}}$\bigcirc$\hskip -1 mm & \hskip -3 mm {\small '.$opt[$ind].'} & ';
$head.='lr';
} else {
$line=~s/\&\s*$//;
- $result.='\vskip -2 mm\noindent\setlength{\tabcolsep}{2 mm}\begin{tabular}{'.$head.'}'.$line.'\\\\\end{tabular}\vskip 0 mm';
- $line = '\hskip -1 mm {\small \textbf{'.$alphabet[$ind].'}}$\bigcirc$\hskip -1 mm & \hskip -3 mm {\small '.$opt[$ind].'} & ';;
+ $result.='\vskip -1 mm\noindent\setlength{\tabcolsep}{2 mm}\renewcommand{\arraystretch}{1.25}\begin{tabular}{'.$head.'}'.$line.'\\\\\end{tabular}\vskip 0 mm';
+ $line = '\hskip 4 mm {\small \textbf{'.$alphabet[$ind].'}}$\bigcirc$\hskip -1 mm & \hskip -3 mm {\small '.$opt[$ind].'} & ';;
$head ='lr';
$current_length = (length($opt[$ind])+length($alphabet[$ind]))*2;
}