The instructions say to use "indefinido" but the indicitive mood examples use imperfecto. Also, the question asked on the quiz only has imperfecto and futuro simple as options. I went with imperfecto and it was marked correct.
-----
If the main clause uses a tense that implies a past action, for example El Pretérito Indefinido or El Pretérito Pluscuamperfecto, then the por si/por si acaso clause uses a past tense.
Le di el dinero que le debía por si acaso se me olvidaba después.I gave him the money I owed him just in case I forgot later.Nos pusimos las botas de agua por si el camino estaba muy enfangado.We put our wellies [US: rain boots] on in case the path was very muddy.