For my work, I must slightly edit Moodle from its standard...
I added my own new several custom form fields for Course Setting. So, when I press Create Course and "/course/edit.php" is opened, my custom form fields are also shown in addition to standard "Course Fullname, Shortname, Category, Visible" and so on.
When I fill in all fields, and press "Save", all the data is stored succesfully to DB tables: all standard fields' values are saved to standard table like 'course', and my own custom fields' values are saved to my custom DB table successfully.
Now the topic question:
When a course is created, and I want to edit its settings, the 'course/edit.php&id=..' is loaded again. And all standard fields are already filled with values from DB, and my custom fields are empty.
How do I fill my own custom fields when editing the existing course, taking into account that all needed values data is saved in my custom table? Which function is used to fill standard field's values?
I am looking through 'course/edit.php' code, and some 'course_form', 'get_data' etc, but can't find the code of retrieving data itself...