Moodle Block Presentation

Embed Size (px)

Citation preview

  • 8/6/2019 Moodle Block Presentation

    1/32

    Develop a block for Moodle

  • 8/6/2019 Moodle Block Presentation

    2/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    2 of 32

    Project Context

    Speakers Michael de Raadt

    Yajuvendrasinh V Mahida (Masters student)

    Moodle Trial Project

    Moodle as new StudyDesk

    Independent Studies Mini-project Develop a block for Moodle

  • 8/6/2019 Moodle Block Presentation

    3/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    3 of 32

    Project Context

    Semester 1 March 2008 - CSC8480 ComputingComplementary Studies

    Supervisor Mr. Michael de Raadt

    I was asked to develop block for Moodle

    I went with proposal of E-Commerce Portal

    In initial findings about Moodle I found itinteresting and decided to develop block forMoodle

  • 8/6/2019 Moodle Block Presentation

    4/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    4 of 32

    Moodle

    I found that Moodle is really revolutionarye-learning platform

    Moodle is modular. It is having potential forkeeping up with the time and new technologies

    Development of Moodle is on going process bydiffused network of commercial and non-commercial users which are streamlined by theMoodle company based in Perth, WesternAustralia

    The following Moodle Statistics are successstory of Moodle http://moodle.org/stats/

  • 8/6/2019 Moodle Block Presentation

    5/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    5 of 32

    Moodle Statistics

  • 8/6/2019 Moodle Block Presentation

    6/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    6 of 32

    Intentions

    The project was divided in two phases

    1.Research work on Moodle and Block

    To find out what is Moodle, how it works, what is thefile structure etc

    Finding a way for creating a block, what is block,how it works and understanding what you find

    2.Creating a block

    Carving the research work to develop block

  • 8/6/2019 Moodle Block Presentation

    7/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    7 of 32

    Discoveries

    The first difficulty was to find exactinformation regarding to the development

    The http://docs.moodle.org have very useful

    documentation for Developer underMoodleDocs. I used this documents as secondarysource for the information

    I feel that there is a need of more detailed andpractical documentation work for Developer asthe current documentation is inadequate

  • 8/6/2019 Moodle Block Presentation

    8/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    8 of 32

    Discoveries

    For my development work I downloaded theblocks developed by developer from the Moodlewebsites Modules and plugins section

    I studied them and tried the Trial and Errormethod and also used the MoodleDocs for blockdevelopment

    Many times my Moodle Software was crashed

    and I learned lot of things through this

    I found that already developed blocks are thebest source for developer as starting point

  • 8/6/2019 Moodle Block Presentation

    9/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    9 of 32

    Discoveries

    After all these findings I developed the simpleAjax Google Search block

    It was just simple block which was showing theGoogle Web Search results

    I showed to supervisor Mr. Michael de Raadt andhe advised me for adding more customizationthrough the Instance Configuration and GlobalConfiguration

    I downloaded and studied the block that haveconfigurations. And I used that finding to addcustomization feature to my block

  • 8/6/2019 Moodle Block Presentation

    10/32

    Proj. ContextMoodleIntentionDiscoveriesToolsOutcomesMy BlockPotential

    10 of 32

    Tools

    1. Eclipse with PHP plugin

    It is really good IDE with powerful features

    You can connect to the CVS repositoryhttp://cvs.moodle.org

    I found that it is very complex and not easy to

    start with

    The setting up Eclipse for Moodle developmentis good guide to start withhttp://docs.moodle.org/en/Development:Setting_up_Eclipse

  • 8/6/2019 Moodle Block Presentation

    11/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    11 of 32

    Tools

    2. fabFORCE DBDesigner 4

    DBDesigner 4 is a open source visual databasedesign system that integrates database design,modeling, creation and maintenance into asingle, seamless environment

    I used this tool to explore the Moodle databasesystem

    This is really good tool for playing around theMySQL database of Moodle

    http://www.fabforce.net/dbdesigner4/downloads.php

  • 8/6/2019 Moodle Block Presentation

    12/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    12 of 32

    Tools

    3. NuSphere PHP IDE

    It is really good IDE with powerful features likefriendly user interface, debugger, codenavigator etc

    I used this IDE is as a real time editor for myblock http://www.nusphere.com/

    The other features can be useful but I havenever needed to use it

  • 8/6/2019 Moodle Block Presentation

    13/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    13 of 32

    Outcomes

    Finally I developed the fully customizableGoogle Search Services block

    I submitted this block on the Moodles Modulesand Plugins section which was accepted as validblock and can be found athttp://moodle.org/mod/data/view.php?d=13&rid=1608

    Till todays date I have received some general

    queries regarding to the block from the Moodlecommunity and some few users across thecommunity have given me positive feedbackabout the working of the block

  • 8/6/2019 Moodle Block Presentation

    14/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    14 of 32

    Outcomes

    Through this course and project I had chancefor the experience with the real worlddevelopment

    I learnt lot of things in terms of academic andprofessional skills

    My supervisor Michael de Raadt kept me on theright track during the project work. This was

    really important as sometime one can easilylost during the track in absence of properguidance

  • 8/6/2019 Moodle Block Presentation

    15/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    15 of 32

    Outcomes

    I have learnt the theoretical aspects of thePHP, HTML, CSS, AJAX through my academiclearning

    With this project I put all these theoreticalskills into the professional and real worlddevelopment

    This course has proved worthwhile for me.

  • 8/6/2019 Moodle Block Presentation

    16/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    16 of 32

    Moodle Google Block

  • 8/6/2019 Moodle Block Presentation

    17/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    17 of 32

    Moodle Google Block File Structure

    Instance Configuration

    HTML File

    Global Configuration

    HTML File Main Block File

    Lang directory

    Cascade Style SheetDirectory

    Images necessary

    for Block

  • 8/6/2019 Moodle Block Presentation

    18/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    18 of 32

    Blocks Language File Structure

    Language File

    HTML Help files to use with Blocks help buttons

  • 8/6/2019 Moodle Block Presentation

    19/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    19 of 32

    Main Block File block_moodle_google.php

  • 8/6/2019 Moodle Block Presentation

    20/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    20 of 32

    Language File block_moodle_google.php

  • 8/6/2019 Moodle Block Presentation

    21/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    21 of 32

    Global Configuration Source-Code

    config_global.html

  • 8/6/2019 Moodle Block Presentation

    22/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    22 of 32

    Blocks Global Configuration

    Global Configuration

    can be accessed

    by

    Site Administration

    Block

    This parameters are loaded from the config_global.html file

  • 8/6/2019 Moodle Block Presentation

    23/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    23 of 32

    Instance Configuration Source-Code

    config_instance.html

  • 8/6/2019 Moodle Block Presentation

    24/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    24 of 32

    Blocks Instance Configuration

    Press the edit button

    for

    Instance Configuration

    This parameters are loaded from the config_instance.html file

  • 8/6/2019 Moodle Block Presentation

    25/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    25 of 32

    Integrated Help Function

    The help functionality is implemented using theMoodle function helpbutton. This function isdefined in weblib.php library.

    helpbutton($page, $title, $module='moodle', $image=true,

    $linktext=false, $text='', $return=false,$imagetext='')

    Help button using helpbutton function

  • 8/6/2019 Moodle Block Presentation

    26/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    26 of 32

    Integrated Help Function

    When you press this button help page (html) iscalled from the directory

    \moodle\lang\en_utf8\help\moodle_google_help

    Help Page is displayed as pop up

  • 8/6/2019 Moodle Block Presentation

    27/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    27 of 32

    Integrated Help Function

    I found all these functions very late during work

    These functions are described with allarguments and required parameters. This can

    be said the Moodle APIs

    This is really very smart APIs and with few linesof code one can achieve big functionalities

    within the Moodle

    Use of these functions makes the developmentwork very easy

  • 8/6/2019 Moodle Block Presentation

    28/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    28 of 32

    Integrated Help Function

    The Moodle Community have defined all thesevarious Moodle functions under various libraryon http://xref.moodle.org/nav.html?index.html

  • 8/6/2019 Moodle Block Presentation

    29/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    29 of 32

    Potential for Future Students

    Undergraduates Advanced/later-year programming undergrads JavaScript in Block

    Simple blocks modifications

    Simple DB access

    Postgrads Some groundwork but still steep learning curve

    Block development

    Modifications to existing Moodle code

    Project Clients Pseudo-client

    University (lower priority feature requests)

    Moodle Student Projects

  • 8/6/2019 Moodle Block Presentation

    30/32

  • 8/6/2019 Moodle Block Presentation

    31/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    31 of 32

    Useful Links

    4. Moodle Documentation Development:Block

    Step by step guide to Creating Blocks

    http://docs.moodle.org/en/Development:Blocks

    5. Moodle Google Block

    This blocks source codes have the comments for eachpiece of the code.

    I have tried to explain each piece of code and what it

    does

    This makes easy for any newbie to start developing block

    http://moodle.org/mod/data/view.php?d=13&rid=1608

  • 8/6/2019 Moodle Block Presentation

    32/32

    Proj. ContextMoodleIntentionDiscoveriesTools

    OutcomesMy BlockPotential

    32 of 32

    Thank you very much..