Quiz Attempts:
The number of "attempts" on a quiz refers to the number of times you can submit a completed quiz.
For example, if a quiz has two "attempts," then you can submit your answers for the quiz, and if you're unhappy with the grade you get on the quiz as a result, you can try again, one more time.
Whether or not your best grade on a quiz is used in the calculation of your course grade, or your latest grade on a quiz is used in the calculation of your course grade, depends on the course you are taking.
Leanpub will warn you if you are about to submit your last remaining quiz attempt.
Course Attempts:
The number of "attempts" on a course refers to the number of times you can submit a completed course.
For example, if a course has two "attempts," then you can complete all of the quizzes in the course, and if you're unhappy with the course grade that results, you can try again, one more time.
Whether or not your best course grade is used as your official course grade, or your latest course grade is used as your official course grade, depends on the course you are taking.
Leanpub will warn you if you are about to submit your last remaining course attempt.
In the Manual
Here is the relevant section of the manual
On a quiz, you would set an attribute like this:
{quiz, attempts: 3}