Starting Developing

Starting Developing

by Martin Makšin -
Number of replies: 20

Hi,

I'm new here and I would like to hear some advices when I should start with developing. I would like what software is good for it (I saw Eclipse tutorial, but i cannot setup it properly. - Eclipse Kepler ). Also i would like to know, where I find some examples of codes written for Moodle to see how to access data, etc.

Im doing school project . It will be timetable for students and profesors at my university. 

Looking forward to see your advices.

Thanks,Martin

Average of ratings: -
In reply to Martin Makšin

Re: Starting Developing

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

That is a hard question to answer without knowing more. Moodle is developed in PHP so do you have experience with PHP programming? If you do then as Moodle comes with the source you can read through the source to see how things work. You might also look at this

http://dev.moodle.org/mod/page/view.php?id=1

 

In reply to Marcus Green

Re: Starting Developing

by Martin Makšin -

Thanks for your post. Im learning PHP just for few weeks, but I know Java, so it could be something like this. What would you recommend me as good software for Moodle Development?  

In reply to Martin Makšin

Re: Starting Developing

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I use Netbeans with Xampp and the xdebug debugger. Other people use Eclipse, but I could never get on with it. 

In reply to Marcus Green

Re: Starting Developing

by Martin Makšin -

I have XAMP installed on my computer. I'll try it with Netbeans and xdebug, Thanks.

In reply to Martin Makšin

Re: Starting Developing

by Darko Miletić -

If you decide to go with Eclipse here is a decent tutorial

http://docs.moodle.org/dev/Setting_up_Eclipse

 

The best IDE for PHP dev that I tried so far is PHPStrom but it is paid software.

In reply to Darko Miletić

Re: Starting Developing

by Martin Makšin -

I found that tutorial. But I had problem with setting Eclipse for Moodle development. I cannot find for example PHP Source file under General-> Content Types. And stuff about PHP eclipse. I've go Eclipse Kepler 4.3 so I installed Part 1 just part from previous chapter, and that may cause a problem. Because I just skipped Part 2.

In reply to Martin Makšin

Re: Starting Developing

by Valery Fremaux -
Picture of Plugin developers

Whatever you choose as editing software, you will actually be able to read all moodle code from a download tarball of Moodle as it is fully open and natively "readable" (not compiled)

I suggest you starting there : 

http://docs.moodle.org/dev/Main_Page

As architecture startup knowledge, or you might seek a lot in more than 15 M code lines !

Personally, i tried lot of well-known IDEs, never with so great experience to get rid of my UltraEdit editor. As UltraEdit (ICM) is paid software, an alternative is SUperNotTab, well known by students, that have also powerfull enough code editing oriented tools. What may just lack in those rich pro editors is the code completion, instant help binders, and class navigators, but PHP does not (well, maybe my experience is a bit oldie now....) allow often real "code navigation" experience suvh in Java because of the dynamic source linking by include/require references.... (script tehnique related issue)

In reply to Valery Fremaux

Re: Starting Developing

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I have heard good things of PHPStorm, I used to use their Java editor and it was awesome. I believe there is a trial version and although it is commercial the license costs are very reasonable. You should also look at notepad++ as a stripped down basic editor.

In reply to Marcus Green

Re: Starting Developing

by Martin Makšin -

I did some stuff in PHP using Sublime 2. So its not mainly about editor, just need to get into Moodle PHP code, right? I'll look at links you all posted. Thanks for help.

In reply to Marcus Green

Re: Starting Developing

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I spent several years developing Moodle code with Emacs. A few years back I switched to PHPStorm and I'm very happy with it (especially when paired up with xdebug for the step-through debugger).

Note the licence for PHPStorm for students is only £21 (or equivalent local currency), according to their website, so that's a pretty good deal in my book smile

 

In reply to Martin Makšin

Re: Starting Developing

by Martin Makšin -

Hi,

i will need local plugin for my work. I read Local Plugins in documentation. I installed Tim Hunt local_greet example, but i dont know how to use it. I mean, how can I use or acces local plugins? Can I add them to course like activity modules somehow?

In reply to Martin Makšin

Re: Starting Developing

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Martin,

'local' plugins cannot be added to courses - they are plugins that don't match any other sort of plugins in the site (e.g. adding something to the admin menu, or holding code used by core modifications).

It sounds like you'd be better off developing an 'activity' plugin type, if you want to be adding an activity to a course.

In reply to Davo Smith

Re: Starting Developing

by Martin Makšin -

Thanks for reply.

And how can I access local plugins? By URL

And Im going to make something like timetable visualizer, but i didnt know which activity module should i choose for that. Any suggestions? It should display timetable data from DB to the users only with some notes. I would like to use table for timetable, can I use HTML tags <table> or i need to use new html_table()?

In reply to Martin Makšin

Re: Starting Developing

by Martin Makšin -

I found out that new html_table outputs html <table> format using Output API. But I have another question, how can i process data from CSV file? Has moodle some functionality for it or can I use my own PHP script for that? I have answers from questionaire exported as CSV and I would like to save them in more useful way. 

In reply to Martin Makšin

Re: Starting Developing

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Martin "I have answers from questionaire exported as CSV and I would like to save them in more useful way. "

Are you talking about the Questionnaire add-on plugin? May I ask why you find the CSV exported data not "useful"?

Joseph

In reply to Joseph Rézeau

Re: Starting Developing

by Martin Makšin -

Yes, Im talking about this Questionaire. But I have sometimes questions, which are dependant on previous answer and I skip some other questions  (for example Yes/No question 1 - if yes go on question 2, in no go on question 1a and then question 2) so in CSV I have then empty columns then. And I dont want to create table, where number of columns is equal number of columns in CSV. I mean if question was skipped I want to skip these columns in CSV too and dont want to save them in table as empty or I want to save more columns as one (process answers to get what i need).