WeBWorK Problems

Promblem Number shown twice

Promblem Number shown twice

by Paul Hermans -
Number of replies: 2
I made a custom problem for adding fractions (yes I know this probably already exists, but I am learning). When I import a promblem from Open Library it works great. The first line in the rendered problem is something like this:
(1 point) Library/SDSU/Discrete/IntegersAndRationals/factorB2.pg

But when I make my custom problem I get the right information, but repeated a second time.

(1 point) Fraction_Operations/addFractions.pg
(1 point) Fraction_Operations/addFractions.pg

rest of problem renders fine.
What I am wondering is where this text is even coming from, and why might I be getting it twice?

Thanks in advance!
In reply to Paul Hermans

Re: Promblem Number shown twice

by Alex Jordan -
Hi Paul,

Look in your problem code for something like:

It sounds like you have that in there twice. Also, you should know that the output from beginproblem() is different for students than for faculty. Typically a student won't see that path to the problem file.

Also, don't fall into a trap I did when I started writing problems, which was to leave out TEXT(beginproblem()); because I didn't want to distract students with that file path. For one thing, as I said, they don't actually see the file path. But there are other reasons why you want that in there, especially for hard copies of problem sets.

In reply to Alex Jordan

Re: Promblem Number shown twice

by Paul Hermans -
Thanks Alex,
I thought it was only in there once, but you were right .... was in there twice.
Much appreciated.