Credit is awarded to you when you have shown, through assessment, that you have successfully completed a module or a programme by meeting the specific set of learning outcomes for that module or programme.
Statements of learning outcomes outline what you will know, understand and be able to do when you have successfully completed a piece of learning.
It is the achievement of the learning outcomes that is essential for the award of credit, not how or where the learning took place, or how it was assessed, or how long it actually took.

You usually demonstrate that you have achieved the learning outcomes of a module or qualification by successfully completing one or more pieces of assessed work to a minimum standard.
Exceeding the minimum standard does not result in you being awarded more credits, as the credit value is fixed before assessment.