Hello.
Version: Moodle 2.5.
I am creating a module to upload a single file. I am using the filepicker which is working fine, but instead of the filename being entered into the table, I am seeing the file's number (temporary number?) being added.
I am simply trying to capture the filename. I have been following the instructions and using the functions found here in the documentation:
$name = $mform->get_new_filename('userfile');
http://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms#Obtain_the_chosen_file
However, the module continues to crash as if the function get_new_filename does not exist. I have even checked other modules that upload files, but I'm not finding them to follow their example.
Can you please help? Thanks in advance.