$fileurl = moodle_url::make_file_url('/pluginfile.php/123/mod_resource/content', array()); echo "Download file";
$thumburl = moodle_url::make_file_url('/pluginfile.php/456/mod_resource/thumbnail.png', array()); echo "";This will create an image tag that displays the thumbnail image for the file resource with ID 456. The package library used in this example is Moodle Core. In summary, the make_file_url function in the moodle_url utility function allows Moodle developers to easily create URLs pointing to file resources within their Moodle courses. The package library used is Moodle Core.