The effect of photoionisation feedback on star formation in giant molecular clouds