## WeBWorK Problems

### random_list

by Bruce Yoshiwara -
Number of replies: 2
When I acted as a student and tried to view a particular exercise, I saw the message that WeBWorK did not recognize "random_list".

However, when I stop acting as the student, the error message goes away.

I tried acting as two other students and got the same error message.

The exercise is one of Robin Cruz's CollegeOfIdaho exercises:

Bruce Yoshiwara

WeBWorK Error
WeBWorK has encountered a software error while attempting to process this problem. It is likely that there is an error in the problem itself. If you are a student, report this error message to your professor to have it corrected. If you are a professor, please consult the error output below for more information.

Error messages

Error details

Problem21
****************

****************

1 ##DESCRIPTION
2 ## Rational Expressions and Functions: Add and Subtract
3 ##
4 ##ENDDESCRIPTION
5 ## DBsubject('Intermediate Algebra')
6 ## DBchapter('Ch 06: Rational Expressions, Functions and Equations')
7 ## DBsection('Rational Expressions and Functions: Adding and Subtracting')
8 ## KEYWORDS('rational expressions','rational functions')
9 ## TitleText1('Essentials of Intermediate Algebra')
10 ## EditionText1('1')
11 ## AuthorText1('Blitzer')
12 ## Section1('6.2')
13 ## Problem1('')
14 ## Author('RA Cruz')
15 ## Institution('The College of Idaho')
16 ## Date: 2007/11
17
18 DOCUMENT(); # This should be the first executable line in the problem.
19
21
22 "PGstandard.pl",
23
24 "MathObjects.pl",
25
26 "CofIdaho_macros.pl"
27
28 );
29
30 TEXT(beginproblem());
31
32 ######################################
33 # Setup
34 # Form: (x+a)/(x+b) + (x+c)/(x+d)
35 # Note: b neq d, and result numerator is prime
37
38 $b= non_zero_random(-4,4,1); 39$d= non_zero_random(-4,4,1);
40 if ($b==$d) {$d = random_list(-7,-5,5,7);} 41 do { #Keep the numerator prime 42$a= non_zero_random(-3,3,1);
43 $c = random(2,5,1); 44 } until (($a+$b+$c+$d)**2-8*($a*$d+$c*$b)<0); 45 46$f1 = Formula("(x + $a) / (x +$b)")->reduce->TeX;
47 $f2 = Formula("(x +$c) / (x + $d)")->reduce->TeX; 48 49 ###################################### 50 # Main text 51 52 BEGIN_TEXT 53 Perform the indicated operation. Note that the denominators 54 are different. Simplify the result, if possible. 55 $f1 + f2$ 56$PAR
58 END_TEXT
59
60 ######################################
62
63 $answer = "(2*x**2+($a+$b+$c+$d)*x+($a*$d+$c*$b))/((x+$b)*(x+$d))"; 64 ANS(RationalExpEvaluator($answer,"x"));
65
67
68 ######################################
69
70
71 COMMENT('MathObject version');
72 ENDDOCUMENT();

-----
Request information

Time Mon Nov 22 10:39:42 2010
Method GET
URI /webwork2/pierce_math125/Lesson37SkillsWarmUp/21/
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.3
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
X-Forwarded-Host xyzhomework.com
X-Forwarded-For 204.102.252.106
Connection Keep-Alive
X-Real-IP 204.102.252.106
Accept-Encoding gzip,deflate,sdch
X-Forwarded-SSL off
Accept-Language en-US,en;q=0.8
Host xyzhomework.com
Edit this problem

### Re: random_list

by Paul Pearson -
Hi Bruce,

The fix should be this simple: change random_list() to list_random(). Let us know if this doesn't fix it. I've updated the NationalProblemLibrary on subversion trunk with this change.

It is also possible to submit bug reports for things like this. While logged in as instructor (possibly acting as a student), open the set and the problem. Near the "Submit Answers" button you will see a link "Edit this problem". Click that link and you'll get a text box with the problem source code in it. Near the top right corner of that text box is a link "report problem bugs". This will take you to the "bugzilla" bug reporting software, which requires that you create an account and log in. After you log in to bugzilla, you'll be presented with a fairly straightforward form to fill out. Giving a very complete description of how the bug arises helps greatly. The main benefit of bugzilla is that it provides the bugfixers with more detailed technical information (where is the problem source code found? etc.) about how the bug arose, and removes from you some of the burden of trying to report technical info on the bug.

Thanks for reporting the bug, and please keep reporting them as they arise, whether in this forum or via bugzilla.

Best Regards,

Paul Pearson