Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Develop a block for Moodle
  2. 2. Project Context <ul><li>Speakers </li></ul><ul><ul><li>Michael de Raadt </li></ul></ul><ul><ul><li>Yajuvendrasinh V Mahida (Masters student) </li></ul></ul><ul><li>Moodle Trial Project </li></ul><ul><li>Moodle as new StudyDesk </li></ul><ul><li>Independent Studies ‘Mini-project’ </li></ul><ul><ul><li>Develop a block for Moodle </li></ul></ul>
  3. 3. Project Context <ul><li>Semester 1 March 2008 - CSC8480 Computing Complementary Studies </li></ul><ul><li>Supervisor Mr. Michael de Raadt </li></ul><ul><li>I was asked to develop block for Moodle </li></ul><ul><li>I went with proposal of E-Commerce Portal </li></ul><ul><li>In initial findings about Moodle I found it interesting and decided to develop block for Moodle </li></ul>
  4. 4. Moodle <ul><li>I found that Moodle is really revolutionary </li></ul><ul><li>e-learning platform </li></ul><ul><li>Moodle is modular. It is having potential for keeping up with the time and new technologies </li></ul><ul><li>Development of Moodle is on going process by diffused network of commercial and non-commercial users which are streamlined by the Moodle company based in Perth, Western Australia </li></ul><ul><li>The following Moodle Statistics are success story of Moodle http://moodle.org/stats/ </li></ul>
  5. 5. Moodle Statistics
  6. 6. Intentions <ul><li>The project was divided in two phases </li></ul><ul><li>1.Research work on Moodle and Block </li></ul><ul><ul><li>To find out what is Moodle, how it works, what is the file structure etc </li></ul></ul><ul><ul><li>Finding a way for creating a block, what is block, how it works and understanding what you find </li></ul></ul><ul><ul><li>2.Creating a block </li></ul></ul><ul><ul><li>Carving the research work to develop block </li></ul></ul>
  7. 7. Discoveries <ul><li>The first difficulty was to find exact information regarding to the development </li></ul><ul><li>The http://docs.moodle.org have very useful documentation for Developer under MoodleDocs. I used this documents as secondary source for the information </li></ul><ul><li>I feel that there is a need of more detailed and practical documentation work for Developer as the current documentation is inadequate </li></ul>
  8. 8. Discoveries <ul><li>For my development work I downloaded the blocks developed by developer from the Moodle website’s Modules and plugins section </li></ul><ul><li>I studied them and tried the Trial and Error method and also used the MoodleDocs for block development </li></ul><ul><li>Many times my Moodle Software was crashed and I learned lot of things through this </li></ul><ul><li>I found that already developed blocks are the best source for developer as starting point </li></ul>
  9. 9. Discoveries <ul><li>After all these findings I developed the simple Ajax Google Search block </li></ul><ul><li>It was just simple block which was showing the Google Web Search results </li></ul><ul><li>I showed to supervisor Mr. Michael de Raadt and he advised me for adding more customization through the Instance Configuration and Global Configuration </li></ul><ul><li>I downloaded and studied the block that have configurations. And I used that finding to add customization feature to my block </li></ul>
  10. 10. Tools <ul><li>1. Eclipse with PHP plugin </li></ul><ul><li>It is really good IDE with powerful features </li></ul><ul><li>You can connect to the CVS repository http://cvs.moodle.org </li></ul><ul><li>I found that it is very complex and not easy to start with </li></ul><ul><li>The setting up Eclipse for Moodle development is good guide to start with http://docs.moodle.org/en/Development:Setting_up_Eclipse </li></ul>
  11. 11. Tools <ul><li>2. fabFORCE DBDesigner 4 </li></ul><ul><li>DBDesigner 4 is a open source visual database design system that integrates database design, modeling, creation and maintenance into a single, seamless environment </li></ul><ul><li>I used this tool to explore the Moodle database system </li></ul><ul><li>This is really good tool for playing around the MySQL database of Moodle </li></ul><ul><li>http://www.fabforce.net/dbdesigner4/downloads.php </li></ul>
  12. 12. Tools <ul><li>3. NuSphere PHP IDE </li></ul><ul><li>It is really good IDE with powerful features like friendly user interface, debugger, code navigator etc </li></ul><ul><li>I used this IDE is as a real time editor for my block http://www.nusphere.com/ </li></ul><ul><li>The other features can be useful but I have never needed to use it </li></ul>
  13. 13. Outcomes <ul><li>Finally I developed the fully customizable Google Search Services block </li></ul><ul><li>I submitted this block on the Moodle’s Modules and Plugins section which was accepted as valid block and can be found at http://moodle.org/mod/data/view.php?d=13&rid=1608 </li></ul><ul><li>Till today’s date I have received some general queries regarding to the block from the Moodle community and some few users across the community have given me positive feedback about the working of the block </li></ul>
  14. 14. Outcomes <ul><li>Through this course and project I had chance for the experience with the real world development </li></ul><ul><li>I learnt lot of things in terms of academic and professional skills </li></ul><ul><li>My supervisor Michael de Raadt kept me on the right track during the project work. This was really important as sometime one can easily lost during the track in absence of proper guidance </li></ul>
  15. 15. Outcomes <ul><li>I have learnt the theoretical aspects of the PHP, HTML, CSS, AJAX through my academic learning </li></ul><ul><li>With this project I put all these theoretical skills into the professional and real world development </li></ul><ul><li>This course has proved worthwhile for me…. </li></ul>
  16. 16. Moodle Google Block
  17. 17. Moodle Google Block File Structure Instance Configuration HTML File Global Configuration HTML File Main Block File Lang directory Cascade Style Sheet Directory Images necessary for Block
  18. 18. Block’s Language File Structure Language File HTML Help files to use with Block’s help buttons
  19. 19. Main Block File block_moodle_google.php
  20. 20. Language File block_moodle_google.php
  21. 21. Global Configuration Source-Code config_global.html
  22. 22. Block’s Global Configuration Global Configuration can be accessed by Site Administration Block This parameters are loaded from the config_global.html file
  23. 23. Instance Configuration Source-Code config_instance.html
  24. 24. Block’s Instance Configuration Press the edit button for Instance Configuration This parameters are loaded from the config_instance.html file
  25. 25. Integrated Help Function <ul><li>The help functionality is implemented using the </li></ul><ul><li>Moodle function helpbutton. This function is defined in weblib.php library. </li></ul><ul><li>helpbutton($page, $title, $module='moodle', $image=true, $linktext=false, $text='', $return=false,$imagetext='') </li></ul>Help button using helpbutton function
  26. 26. Integrated Help Function <ul><li>When you press this button help page (html) is called from the directory </li></ul><ul><li>moodlelangen_utf8helpmoodle_google_help </li></ul>Help Page is displayed as pop up
  27. 27. Integrated Help Function <ul><li>I found all these functions very late during work </li></ul><ul><li>These functions are described with all arguments and required parameters. This can be said the Moodle APIs </li></ul><ul><li>This is really very smart APIs and with few lines of code one can achieve big functionalities within the Moodle </li></ul><ul><li>Use of these functions makes the development work very easy </li></ul>
  28. 28. Integrated Help Function <ul><li>The Moodle Community have defined all these various Moodle functions under various library on http://xref.moodle.org/nav.html?index.html </li></ul>
  29. 29. Potential for Future Students <ul><li>Undergraduates </li></ul><ul><ul><li>Advanced/later-year programming undergrads </li></ul></ul><ul><ul><ul><li>JavaScript in Block </li></ul></ul></ul><ul><ul><ul><li>Simple blocks modifications </li></ul></ul></ul><ul><ul><ul><li>Simple DB access </li></ul></ul></ul><ul><li>Postgrads </li></ul><ul><ul><li>Some groundwork but still steep learning curve </li></ul></ul><ul><ul><li>Block development </li></ul></ul><ul><ul><li>Modifications to existing Moodle code </li></ul></ul><ul><li>Project Clients </li></ul><ul><ul><li>Pseudo-client </li></ul></ul><ul><ul><li>University (lower priority feature requests) </li></ul></ul><ul><ul><li>Moodle Student Projects </li></ul></ul>
  30. 30. Useful Links <ul><li>Moodle Docs </li></ul><ul><li>- Developer Documents for Moodle Developer </li></ul><ul><li>http://docs.moodle.org/en/Developer_documentation </li></ul><ul><li>PHP Cross Reference of Moodle 1.9 </li></ul><ul><li>- Moodle Functions References and other Stuff </li></ul><ul><li>http://xref.moodle.org </li></ul><ul><li>The CVS archive </li></ul><ul><li>- This archive contains all the source code for Moodle </li></ul><ul><li>http://cvs.moodle.org/ </li></ul>
  31. 31. Useful Links <ul><li>Moodle Documentation Development:Block </li></ul><ul><li>Step by step guide to Creating Blocks </li></ul><ul><li> http://docs.moodle.org/en/Development:Blocks </li></ul><ul><li>Moodle Google Block </li></ul><ul><li>This block’s source codes have the comments for each piece of the code. </li></ul><ul><li>I have tried to explain each piece of code and what it does </li></ul><ul><li>This makes easy for any newbie to start developing block </li></ul><ul><li>http://moodle.org/mod/data/view.php?d=13&rid=1608 </li></ul>
  32. 32. Thank you very much…..