fix submission numbering bug

I have fixed the iteration view bug and also provided a corresponding test in test/app/submissions_test. I am not sure if the submissions helper is the best place for the method I added but please let me know what you think.