Forum archive 2000-2006

Andy Culham - Edit HTML on problem page

Andy Culham - Edit HTML on problem page

by Arnold Pizer -
Number of replies: 0
inactiveTopicEdit HTML on problem page topic started 7/30/2002; 7:04:45 PM
last post 7/31/2002; 1:48:55 AM
userAndy Culham - Edit HTML on problem page  blueArrow
7/30/2002; 7:04:45 PM (reads: 1073, responses: 1)
I have created a multiple choice problem in which there are 10 separate questions on a single page ($mc1, $mc1, ..., $mc10). Since there is more than one answer being submitted at one time, WeBWorK automatically adds the comment at the bottom - Note: Partial credit is available on this problem. This shows up immediately beneath the tenth question the page. It seems like this may be confusing to students if this comment remains. Does anyone know how to edit what appears on the problem page? Thanks for your help!

Andy Culham, University of Calgary

<| Post or View Comments |>


userArnold K. Pizer - Re: Edit HTML on problem page  blueArrow
7/31/2002; 1:48:55 AM (reads: 1392, responses: 0)
First you might want to think about writing a single sentence at the begining or end of the problem explaining to students that this "problem" actually consists of 10 separate subproblems. Your more preceptive students might understand what is happening and they will be confused if they don't see the message Note: Partial credit is available on this problem.

This phrase is contained in the sub avg_problem_grader (line 3878 of PGanswermacros.pl). Precisely, it's on line 3904

$problem_result{msg} = 'You can earn partial credit on this problem.' if $count >1;

Note that if you change it here, you will change it for all problems using this grader and I would strongly advise against doing that. Rather, look at the examples in setSampleGraders which show you how to write and call custom graders. You can copy and rename avg_problem_grader, then edit it to your liking. You can put this new grader in PGanswermacros.pl or in the individual .pg problem (there are some techical differences if there are escaped characters if the code is placed in the .pg problem --- check the documentation).

Now I'm off to MathFest.

Arnie

<| Post or View Comments |>