Moodle 3.3 and Essential 3.3.1.5.
I got to create a new inputfield in the form using $mform->addelement(). In addtition I used filemanager to upload images.
Also, I created a new column in the table of the course to save the paths of my images. I just need to know how I can save the images in the database. While you answer, I will be reading documentation.
Thank you so much!!!
I show you the function that I used to show the new inputfield below:
$mform->addElement('filemanager', 'attachments', get_string('headerimage'), null,
array('subdirs' => 0, 'maxbytes' => 1000000, 'areamaxbytes' => 1000000, 'maxfiles' => 1,
'accepted_types' => array('.jpg','.jpeg','.png')));