WeBWorK Problems

How HW Sets workI

How HW Sets workI

by Paul Hermans -
Number of replies: 2
I am new to WW, so may be asking silly questions.

I noticed that some problems in OPL have a "solution" provided, others don't.
When I author my own problems I have included a solution (or at least I am planning to).

I was wondering if it is possible to make the solution only visible after the max attempts has been reached?

Also, is there a way to show "hints" instead of a full solution but lower the grade for using too many hints?

Thanks in advance
In reply to Paul Hermans

Re: How HW Sets workI

by Alex Jordan -
When you write a problem, you optionally write sections:


or if you are not using PGML, then:


The existence of such a sections in a problem is the first factor for whether a solution is displayed. The default behavior is to make these solutions available to students after the due date.

The course configuration menu, permissions tab, has an item that would allow you to display solutions to students before a due date, but it's only rare situations that one would want this.

I know of no way to make solutions available before the due date but only after enough attempts have been used. I think it could be done with some light editing of the code block that controls whether solutions are displayed. However, if you worry about these kinds of things, you might worry about one student intentionally using their attempts up and then sharing walk-through solutions with classmates.

Along with SOLUTION, you can also make HINT. Like:


or if you are not using PGML, then:


Perhaps someone else can explain how to control when hints are available to students though. I don't use these, so I am unfamiliar with them. I think there is an environment variable called $showHints that somehow controls them, but I'm unclear on how it works or how accessing a hint might impact a score.