Additional plugin options - Quiz

Additional plugin options - Quiz

de Paul K -
Número de respuestas: 2

Hi,


I have added some additional functions into quiz activity in moodle. One of the newly added quiz parameters is stored in an int column in the mod_quiz database. I must read this certain parameter directly from the PHP class in the attemptlib.php file. I have found out, that there is a command called get_config('quiz', 'columnname') which probably could be helpful to get this value. However using this command I'm able to get the default global value which is defined for the entire quiz plugin instance, instead of the value of the column of this certain quiz instance. I'm doing something wrong, or maybe I'm using wrong function to get the value of this certain column from the quiz instance?

$branchinggrade = get_config('quiz', 'branchinglevel');
echo "Branching level:"; echo $branchinggrade; echo ("</br>");


Promedio de valoraciones: -
En respuesta a Paul K

Re: Additional plugin options - Quiz

de Tim Hunt -
Imagen de Core developers Imagen de Documentation writers Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers

You probably need to learn more about Moodle development in general. It is clear what you are trying to do, but your guesses about what might be the way to do it do not match how Moodle actually works.

This docs page might help: https://docs.moodle.org/dev/Quiz_access_rules

En respuesta a Tim Hunt

Re: Additional plugin options - Quiz

de Paul K -

Thank you. You are absolutely right, but the development of the Moodle plugins is not my major task at work, therefore sometimes its better to ask to spare some time sonrisa Nevertheless thanks for this link.