data_preprocessing method for enrol plugin

data_preprocessing method for enrol plugin

by Daniele Cordella -
Number of replies: 0
Picture of Core developers Picture of Plugin developers

May I ask how a developer is suposed to call the funtion data_preprocessing for the settings form of an enrol plugin?

Let me explain better. I want to add an htmleditor to the settings page of my entol_xxx plugin.

Htmleditor needs moodle form data_preprocessing to correctly set content and format.

(As instance:

            $filename = 'myhtmleditor';
            $defaults[$filename]['text'] = $defaults['myhtmleditorcontent'];
            $defaults[$filename]['format'] = $defaults['myhtmleditorformat'];
)

In spite of this, as far as I can see, the settings form for enrol plugins, can only be populated by plugin using:
public function edit_instance_form($instance, MoodleQuickForm $mform, $context) {

How is a developer supposed to call the mform data_preprocessing method?

Thanks in advance.



Average of ratings: -