Moodle Custom Course Field

Moodle Custom Course Field

by Fernando Muñoz -
Number of replies: 2

Hi, I'm using moodle 3.8, I created a new course and added two custom fields (coursecode and sencecode) and these two I need to get in my custom block. In that block I got the user id by doing $USER->id and the course id by doing $COURSE->id, but I can't seem to find how to extract the values from the custom fields I added.

Average of ratings: -
In reply to Fernando Muñoz

Re: Moodle Custom Course Field

by Benjamin Ellis -
Picture of Particularly helpful Moodlers

Hi,

Off the top of my head, I think $COURSE->customfields, and if not look at an example in /course/tests/customfield_test.php.