help in understanding files in moodle

help in understanding files in moodle

by Mia Moa -
Number of replies: 1

hi i am creating a new block .i am having some difficulty understanding a couple of things. correct me if i am wrong

with my block i would like it to perform various functions (so i sectioned it). from what i understand out block base holds the class definition and is use to manage the plugin and they are given definitions. so therefore i use this just to switch the views and call the other functions that i would like to display (my sections).

 

in the lib file i have all my lib functions thats like my methods (i don't understand the lib what goes in here?) and the form i have the forms such as addElement etc. (so this is where i put the permission?)

i created a seperate file (for actions) of what i really what the user to do with the section of block. like add things, enter things. 

could someone please assist me in understanding this please.

thanks in adv

Average of ratings: -
In reply to Mia Moa

Re: help in understanding files in moodle

by Rosario Carcò -

I fear that nobody understands what you are willing to do. In which version of Moodle? 1.9.x or 2.x?

Programming an own block starts in the Developer Docs of Moodle.

Programming with the Moodle-API is a very steep learning courve.

The best approach is to look for a block that does more or less what you want to do yourself. If such a block is not present in your Moodle, you have to search in the modules & plugins Database on moodle.org

If you find something, you install it as a copy and start modifying line by line, until the code does what you like it to do.

Or you look for someone expert in Moodle-Programming that does it for you, even if you go to continue developing the code yourself after the biggest and hardest job has been done. This person could also teach you the most important tricks.

I did so when I developed my own myCourses, siteNavigation Blocks and uploadusersandcourse.php, it took me at least 3 months to learn only the basics, and since I am learning and developing while maintaining my code step by step, for 3 years or so.

Rosario