In a lesson an answer attempt is always calculated as entirely correct or entirely incorrect. The administrator of the site can select to use all answers or just the first answer to calculate the score. By default all attempts are used in the calculation. Suppose the weight of the first question in a module makes up 10% of the total weight of the module. If the student answers this question incorrectly, the progress bar will look like this:

The colored part is completely red because all questions were answered incorrectly. When the student answers the question again and now provides the correct answer, the chart will not change as only the first attempt is scored. If all attempts count, the progress changes to this diagram:

The white part has remained the same size (the student has not progressed in the module), while the red part has become smaller as only 50% of the answers is now incorrect.