## Forum archive 2000-2006

### William Hart - Errors in Rochester Problem Set

by Arnold Pizer -
Number of replies: 0
 Errors in Rochester Problem Set topic started 1/25/2006; 7:29:49 PMlast post 2/7/2006; 6:05:32 PM
 William Hart - Errors in Rochester Problem Set  1/25/2006; 7:29:49 PM (reads: 728, responses: 12) Hi, WebWorks is reporting that there are errors in a number of the standard problems in the Rochester Problem set. Possibly we have something configured incorrectly. For example: rochester_problib/setVectors1space3D/UR_VC_1_4.pg reports "Error: "x" does not make sense here. There is an error in WeBWorK's answer to this problem..." All of the questions in this section that require an expression as an answer seem to have this problem. This particular question requires the student to input the equation of a given sphere. Here is the relevant problem code, which in fact seems correct to me, going by what is in the problem writing tutorial: =========================================================== DOCUMENT(); TEXT(beginproblem()); $showPartialCorrectAnswers = 0;$a = random(1, 10); $b = random(-10, 10);$c = random(-10, 10); $a2 = -2 *$a; $b2 = -2 *$b; $c2 = -2 *$c; $ans = "x^2 + y^2 + z^2 + ($a2*x + $b2*y +$c2*z)"; BEGIN_TEXT $PAR Find an equation of the sphere that passes through the origin and whose center is ($a, $b,$c). $PAR { ans_rule(60) } = 0$BR Note that you must put everything on the left hand side of the equation and that we desire the coefficients of the quadratic terms to be 1. END_TEXT ANS(fun_cmp($ans, vars=>3)); ENDDOCUMENT(); =================================================================== Any ideas what might be wrong here? Are the standard problems supposed to be error free? Regards, Bill Hart. <| Post or View Comments |>  Arnold K. Pizer - Re: Errors in Rochester Problem Set 1/25/2006; 8:07:06 PM (reads: 807, responses: 1) Hi Bill, I'm not sure what's going on here. It sounds like a problem with the parser. I just checked and the above problem works fine at Rochester with e.g. x^2+y^2+z^2-18x+2y-8z accepted as a correct answer. Obviously that doesn't help you but it means it's not a bug in the current version of WeBWorK. We switched the default over to using the new parser (which is probably what you are using) so it is possible there was a bug in the new parser that has since been fixed. Davide is this a possibility? Any other ideas? Arnie <| Post or View Comments |>  Davide P. Cervone - Re: Errors in Rochester Problem Set 1/26/2006; 8:06:47 AM (reads: 884, responses: 0) I don't know what has gone wrong, but I can tell you that the error message is from the original answer checkers, not the Parser (the wording is different in the Parser). In any case, the Parser-based answer checker and the traditional ones both call the same routine to get the variable names from the vars=>3, so my initial thought that there was going to be a difference there isn't the issue, either. So I'm not sure what to suggest, other than to make sure your version of pg/macros/PGanswermacros.pl is up to date. Also, since you seem to be using the older answer checkers, you might want to change the setting of$useOldAnswerMacros to 0 in your global.conf so that you use the Parser-based ones, but I don't think that is the issue, here. Davide <| Post or View Comments |>

 Davide P. Cervone - Re: Errors in Rochester Problem Set  1/26/2006; 8:13:53 AM (reads: 809, responses: 0) PS, I don't have any trouble with this problem using either the Parser-based or traditional answer checkers. So it does sound like your version of WW may be out of date. Davide <| Post or View Comments |>

 William Hart - Re: Errors in Rochester Problem Set  1/26/2006; 2:41:27 PM (reads: 795, responses: 0) Hi, Thanks. I'll pass this on to our systems administrator and see what version of things he installed. We've had numerous difficulties since starting, and I suspect something went wrong during install. For example, I cannot edit a problem due to the directory not having permissions, so I save the problem to another file, but then WebWork gives some strange error message about it having a problem when concatenating. This happens even for problems that work perfectly before I save them elsewhere to be edited. Don't know if that gives any hints as to what might have gone wrong in our case, but I am guessing it is just an incomplete, corrupted, out of date or incorrect install. Regards, Bill Hart. <| Post or View Comments |>

 Jonathan Manton - Re: Errors in Rochester Problem Set  1/26/2006; 4:38:48 PM (reads: 787, responses: 0) I am the system administrator working with Bill. We are using Webwork 2.1.3, and pg 2.1.3. Both were downloaded and installed from the website in early November, 2005. It is installed on a minimal install of Debian 3.1, using the installation instructions (with lots of changes to make it actually work) from this Wiki. It would be good if you could provide some guidance for where we could find log messages or somesuch that would help to pinpoint the problem. I looked at global.conf (and all the other config files and all the perl files I could find) for the string useOldAnswerMacros, but could not find it, so I'm assuming this is misspelled, or for a different version of webwork. Fell free to e-mail me directly if you'd like more details, such as the exact configuration files and such in our webwork installation. Thanks for your help, Jonathan <| Post or View Comments |>

 Arnold K. Pizer - Re: Errors in Rochester Problem Set  1/26/2006; 8:54:46 PM (reads: 774, responses: 0) Hi Jonathan, In Global.conf, you want $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0; When you downloaded the system, this was set to 1 by default. Actually I'm assuming you installed things from CVS since the above code was added to Global.conf on Thu Aug 25 2005. Off hand, I don't know the date of the latest tar ball (a new tar ball is in the works as we speak). Maybe the new parser will give an error message that will point to the problem. Arnie <| Post or View Comments |>  Jonathan Manton - Re: Errors in Rochester Problem Set 1/31/2006; 3:50:54 PM (reads: 741, responses: 0) Sorry, but I'm having difficulty finding the file you are talking about. In the 2.1.3 distribution, the Webwork conf/global.conf (note difference in case) does not have this entry (set to 1 or otherwise), and adding this line in does not fix the problem. I downloaded the 2.1.4 tarball, and the conf/global.conf file included in 2.1.4 does not have that line either. 2.1.4 is the latest tarball that I can see for download on your site. If it was added to CVS on August 25th, I would assume you included it in the tarball. Could the problem be that all of you guys are using files from the CVS tree, but that the tarballs were not created correctly? Please let me know - this problem is preventing Bill from being able to use Webwork for his classes. <| Post or View Comments |>  Jonathan Manton - Re: Errors in Rochester Problem Set 1/31/2006; 4:03:31 PM (reads: 725, responses: 0) Well, it appears that the "2.2 pre2" version DOES have this in the global.conf file. Which raises an issue - is there a working version of the product that isn't considered a "pre-release" version? I would prefer not to run a "pre-release" version on my servers - I don't have the personnel to update the software frequently. I'd like to have something that is sort of a "fire and forget" that instructors can use throughout the department. <| Post or View Comments |>  Davide P. Cervone - Re: Errors in Rochester Problem Set 2/1/2006; 6:47:16 PM (reads: 708, responses: 0) OK, I loaded WW 2.1.4 and pg 2.1.3 and can reproduce the problem. You are right, the Parser-based versions of the answer macros are not available in this version, as they were not written at the time pg 2.1.3 was released. So they will not be a release version until 2.2 is out. It turns out to be an error in PGanswermacros.pl that I corrected during the summer while working on the Parser-based checkers, but that was after the 2.1.3 release. The fix is in version 1.35 of the PGanswermacros file, but you will not be able to use that file without loading additional parts of the post-2.1.4 files. But you can easily correct the PGanswermacros.pl file. It is only one line: 1378. Change  unless ( ref($out_options{var}) eq 'ARRAY') { to  unless ( ref($out_options{var}) eq 'ARRAY' ||$out_options{var} =~ m/^\d+$/) { In context, this is  # allow var => 'x' as an abbreviation for var => ['x'] my %out_options = %opt; unless ( ref($out_options{var}) eq 'ARRAY' || $out_options{var} =~ m/^\d+$/) { $out_options{var} = [$out_options{var}]; } I had forgotten that I had fixed this. As you say, most of us are running later versions of the software, and it is not always easy to remember when things were corrected. As for a "working version" of the product, there is no such thing -- there are always bugs to be fixed. The use of vars => 3 is relatively rare in the problem library, and it is unfortunate that the ones you wanted relied on this. (Personally, I never liked that approach to declaring variables, and think it would have been better to have used vars => ['x','y','z'] instead, but I didn't write the problem.) Anyway, hope this fix works for you. Davide <| Post or View Comments |>

 Michael Gage - Re: Errors in Rochester Problem Set  2/1/2006; 8:41:05 PM (reads: 692, responses: 0) Thanks very much for helping out on this Davide. Let me add my 2 cents about using the CVS version of the software code: Once you are connected to the CVS code it is pretty easy to update -- a matter of typing "cvs update" and then checking that any new items added to global.conf.dist are transferred by hand to global.conf. (http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKCVSReadOnly) Individual items can be updated with "cvs update itemName" Updating the pg code can be done separately and is almost always painless. Updating fixes for a single problem is also easy. You shouldn't update an entire library during the semester unless you are sure that no problems have been removed or renamed. Updating the main software code should be also be done cautiously, but there are many times, such as now, when the code is changing very slowly with only bug fixes. The "pre release" code is running the 100 or so courses on our hosted.webwork.rochester.edu server with very few problems. (none in the last 48 hours ;-) ) As Davide points out if you are reasonably close to the code currently being developed and used (and we are all using some version of this code at our own schools) you get faster response since we are pretty familiar with any recent problems. Things we fixed last year have already gotten a bit hazy. :-) Take care, Mike <| Post or View Comments |>

 William Hart - Re: Errors in Rochester Problem Set  2/7/2006; 4:55:02 PM (reads: 668, responses: 1) Thankyou very much for taking the time to help us sort this out. I see that is was a non-trivial exercise to load the stable branch and replicate the problem, let alone solve it for us. It is now working for us, however, the Perl code you posted is perhaps not quite correct. Instead of $out_options{var} =~ m/^d+$/ you apparently want $out_options{var} =~ m/^\d+$/ Regards, Bill Hart. P.S: I see why it came out wrong. When you post in here, backslashes are special characters and get omitted if inserted on their own. <| Post or View Comments |>

 Davide P. Cervone - Re: Errors in Rochester Problem Set  2/7/2006; 6:05:32 PM (reads: 740, responses: 0) I see why it came out wrong. When you post in here, backslashes are special characters and get omitted if inserted on their own. Right. I knew that, but forgot about it for this example. Thanks for pointing out the mistake. I'll correct my earlier message (in case anyone else need to use it). Davide <| Post or View Comments |>