## WeBWorK Main Forum

### 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

### 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

### Re: number of attempts for a problem

by Dave Meng -
Hi Arnie,

Thank you for the help. I appreciate it.

Dave

### 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?

Dave

### 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