[ww-bugs] Bug 3412: Interpreting vector answers incorrectly

bugzilla-daemon at webwork.maa.org bugzilla-daemon at webwork.maa.org
Fri Sep 4 17:42:22 EDT 2015


http://bugs.webwork.maa.org/show_bug.cgi?id=3412





--- Comment #2 from Sara Malec <malec at hood.edu>  2015-09-04 17:42:22 ---
(In reply to comment #1)
We're running 2.10, but we've figured out the issue. There were just a few
typos. A fix is below:

## DESCRIPTION
## Linear Algebra
## ENDDESCRIPTION

## Tagged by cmd6a 5/3/06

## DBsubject(Linear algebra)
## DBchapter(Euclidean spaces)
## DBsection(Linear combinations)
## Date(July 2013)
## Institution(Rochester and Hope College)
## Author(Paul Pearson)
## Level(2)
## MO(1)
## TitleText1('Linear Algebra with Applications')
## AuthorText1('Jeffrey Holt')
## EditionText1('1')
## Section1('2.1')
## Problem1('')

DOCUMENT() ;        

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"parserVectorUtils.pl",
"PGcourse.pl"
) ;

$showPartialCorrectAnswers = 1 ;

TEXT(beginproblem());

Context('Matrix');

foreach $i (1..6) { 
    $a[$i] = non_zero_random(-6,6,1);
} 

$tag = random(1,6,1);
$a[$tag] = 0;

$a[7] = random(2,7,1);

$x = Matrix([[$a[1]], [$a[2]], [$a[3]]]);
$y = Matrix([[$a[4]], [$a[5]], [$a[6]]]);

$u = $a[7] * $x;
$v = $x + $y;
$w = $a[7] * $x + $y;

Context()->texStrings;
BEGIN_TEXT
Let \(\vec{x}= $x\) and \(\vec{y}= $y\). 
Find the vectors \(\vec{u}=$a[7] \vec{x}\), \(\vec{v}= \vec{x} + \vec{y}\), and
\(\vec{w}=$a[7] \vec{x} + \vec{y}\). 
$BR
$BR
\(\vec{u} = \) \{ $u->ans_array \}   
$BR
\(\vec{v} = \) \{ $v->ans_array \}   
$BR
\(\vec{w} = \) \{ $w->ans_array \}   

END_TEXT
Context()->normalStrings;

ANS( $u->cmp );
ANS( $v->cmp );
ANS( $w->cmp );

COMMENT('MathObject version');
ENDDOCUMENT();       # This should be the last executable line in the problem.



> I believe this may be a bug that was fixed in 2013:
> 
>    
> https://github.com/openwebwork/pg/commit/0275572006afacf909299d1411039cae00a946bf
> 
> which was part of pg v2.7 and above.  What version of pg are you using?
> 
> In any case, the problem works with current versions of WeBWorK.

-- 
Configure bugmail: http://bugs.webwork.maa.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the webwork-bugs mailing list