submit quiz function

submit quiz function

by Sara ALkafri -
Number of replies: 2
Hi all....

I am working on modifying add quiz activity
there is 2 button viewed in course/modedit.php page
the buttons are (save and return to course , save and display)

i'd like to find the function that submit the page field and add it

to database .

i found where the button added in the form
but i really want to know where the data is added to DB

can any body help me..... please????

thanks....

Average of ratings: -
In reply to Sara ALkafri

Re: submit quiz function

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The way Moodle modules work, there are two functions defined in mod/quiz/lib.php, quiz_add_instance and quiz_update_instance, that are called when the editing form is submitted. (Which one is called depends on whether you are adding a new quiz, or editing an existing one.)

Of course, you will have noticed, from the URL in your web browser, that the editing form is processed by the course/modedit.php form. That is what calls the appropriate quiz function.
Average of ratings: Useful (1)