File resource in Moodle is another course element that can be used for serving files for students. It’s assumed that there will be only one file per resource, but you can upload multiple files and set one of them as default to be downloaded when student click on the resource.
We’ll be adding multiple resources and multiple files in this example. Doing so using pure php coding would be complicated enough to mess things up very easily, so we’ll use Moodle APIs to do some things for us. And it’ll be additional plus as we will be more Moodle version independent as long as API will remain not changed. Continue reading Moodle: Add (file) resources and upload files into it
Adding lablel to any course is a very simple operation. Label is the most basic element you can add to a course body in Moodle (next to course sections or descripions). Label is basically some text usually surrounded with some html to add formatting. And it does nothing more. You can add, move it or delete it. That’s it.
Altough it’s simple to click around and add an element, adding it automatically on the other hand can be a tricky business. If you do something wrong, you can break course (best case) or mess up whole Moodle database almost beyond repairing (worst case scenario). Continue reading Moodle: Adding label to a course using code
Moodle forms are built on top of PEAR QuickForm lib with some non standard js code and other extensions and modifications. It’s dead simple to generate some standard html forms, but when you have to do some tweaks to it, you’ll have to break some sweat and time. Continue reading Moodle: modify form elements before displaying the form