WeBWorK Main Forum

number of attempts for a problem

number of attempts for a problem

by Dave Meng -
Number of replies: 5
Hi,

Is there an easy to change the number of attempts for all the problems at once?
Similarly, is there an easy way to change the due date for all the sets?
I searched through the Q&A sections. I did not see any answers.

Thanks,

Dave Meng


In reply to Dave Meng

Re: number of attempts for a problem

by Arnold Pizer -
Hi Dave,

You can change the default maximum allowed number of attempts for all problems.  This is controlled by $problemDefaults{max_attempts}.  The default is $problemDefaults{max_attempts} = -1 which means unlimited attempts.  If you change this in localOverrides.conf (for which you need access to the server) it will make the change for all courses on your server. If you change it in course.conf (which a course professor can do) it will make the change for that course only. In either case you need to add the line
$problemDefaults{max_attempts} = 10; 
if e.g. you want to set the maximum allowed number of attempts  to 10.

Arnie
In reply to Arnold Pizer

Re: number of attempts for a problem

by Dave Meng -
Hi Arnie,

I added the line you mentioned in course.conf. But how can I make the change effective right away? Do I need to refresh somewhere or do I need to regenerate the course?

Thanks again for your help.

Dave
In reply to Dave Meng

Re: number of attempts for a problem

by Arnold Pizer -
Hi Dave,

Sorry, my error.  Adding that line will effect newly created sets but not sets already created.  If students have not yet begun to work on the sets, you could delete the current sets and then rebuild them.  If students have already begun to work on sets, you can use the Hmwk sets editor to reset Max attempts problem by problem.

Arnie
In reply to Arnold Pizer

Re: number of attempts for a problem

by Dave Meng -
Hi Arnie,

Thanks again for your help. I was hoping a quick fix. If I need to rebuild the sets, it seems easier to me to reset Max attempts problem by problem because I have to go through those problems anyway.

Dave