Each school will have its own precise process for this but it usually works along the lines of looking at your ranks and the gaps between the ranks for all the tasks that you do do and some professional judgement from your teacher about where you fall within the class - this allows the teacher the lee-way to bring non-assessment work into the mix and the BOS will back the teacher and the school if the teacher's professional judgement is the determining feature.
They won't use the average as that could be unfair, particularly if you have an exceptionally good or poor result.
My school waits until all the tasks have been completed and then we sit down and look at the marks the student got in completed tasks and the students who are around that student and place the student in the mix accordingly.