Hey everyone,
I'm completely new to Moodle and I'm kinda trying to develop a simple modul to get into it all. Had PHP experience, not much but enough, still this system and its "size" confuses me a bit
This may have been asked by somebody before, I Googled and Googled for hours but didn't find an answer I could understand, so I apologize from start to be asking a dumb question like this...
My problem is that I'm trying to add a file upload to my module so that for example teacher could upload a file as part of a bigger task and that file could be viewed by students. Now I tryed to look at similiar modules but simply could not find my way ... problem is, I have no clue how to fetch the file, save it, and display it ... all I managed to dig out from documentation so far was the upload function in mform:
$mform->addElement('file', 'attachment', get_string('attachment', 'forum'));
$mform->addRule('attachment', null, 'required');
Now if somebody can help me where to go from here in order to actually get that file, and save it so I can display it in the module?
Any suggestions are really appreciated!