I'm afraid I can't. I'm unfamiliar with this function and also don't know what object/class is $quiz1 supposed to be from this single line of code.
Maybe you could try and familiarize yourself with the quiz or just the course module structure, or look for another place the uses this function and see how it's done there.
Maybe you could try and familiarize yourself with the quiz or just the course module structure, or look for another place the uses this function and see how it's done there.