SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




          Mahara Development for Moodle Developers

                         Penny Leach <penny@catalyst.net.nz>
                                            MoodleMoot Barcelona


                                            October 24 2008




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction
            Where the similarities come from
            Mahara’s General approach

      2   Key Similarities
            DML & XMLDB
            Upgrades
            Language Packs
            config.php




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      3   Key Differences
            Database
            Input and Output
            Error handling and debugging
            Miscellaneous differences
      4   Other main components
            Signalling
      5   Plugin Types
            Introduction to Plugins
            Artefact Plugins
            Other Plugins
            Themes

Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      6   Code flow layout



      7   A typical Mahara Page




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction
            Where the similarities come from
            Mahara’s General approach

      2   Key Similarities

      3   Key Differences

      4   Other main components

      5   Plugin Types

      6   Code flow layout
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Where the similarities come from


History




           • A very rushed first 3 months
           • A lot of code taken from Moodle by me
           • Over time we diverged and broke compatibility




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Mahara’s General approach


General approach



          • PHP5 from the start
          • Much stricter approach
          • Much more OO and later PHP features.
          • For example, plugin definitions are all abstract classes




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities
            DML & XMLDB
            Upgrades
            Language Packs
            config.php

      3   Key Differences

      4   Other main components

      5   Plugin Types
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara6   Code flow layout
      Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




DML & XMLDB


DDL & XMLDB



          • No UI to generate XML or upgrade PHP
          • Learn the API and write it yourself
          • Learn the XML and write it yourself
          • Offset by removal of NEXT/PREV checking
          • Added some changes back into Moodle early on




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Upgrades


Upgrades



           • version.php and database version number
           • db/upgrade.php and db/install.xml as usual
           • Upgrades require administrative login
           • disablelogin & minupgradefrom




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Language Packs


Language Packs


          • get string
          • $string array of keys to values
          • Use of sprintf and %s rather than eval and $a
          • Slightly different get string function contract (variable
              arguments rather than one mixed argument)
          • Helpfiles are more often automatically detected based on
              form element, page and section



Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




config.php


config.php


            • Very similar beginning - db details
                • docroot is detected
                • dataroot the same
                • wwwroot optional (detected but not perfect)
            • Then divergence begins
            • One big difference:
                • config.php
                • config-dist.php
                • config-defaults.php




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities

      3   Key Differences
            Database
            Input and Output
            Error handling and debugging
            Miscellaneous differences

      4   Other main components

      5   Plugin Types
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara6   Code flow layout
      Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Database


DML

           • Same starting point but a few divergences:
           • Prepared statements and placeholders (select * from
              {table} where field = ?)
           • No get records anymore, get records array and
              get records assoc instead
           • Some function contracts changed to suit $values array
              between $sql and other things like $limit
           • 138 lines of diff in grep function between Moodle and
              Mahara but really it’s not that different


Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Database


More DB differences



           • Referential Integrity - there in XMLDB but disabled in
              Moodle for now
           • Proper date fields rather than integers
           • Much more use of transactions
           • No magic id field on every table




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Input and Output


Forms


           • Completely different to Moodle, they were developed about
              the same time
           • Pieforms, written by a Mahara developer, Nigel.
           • Maintained as a separate library on sourceforge
           • Array based form definitions with callback functions
           • Much simpler than QuickForms and easier to customise




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Input and Output


Parameter Input

           • Completely different approach
           • Moodle will clean parameters to match rules
           • Mahara will reject anything that doesn’t match
           • Moodle:
              • $id = required param(’id’, PARAM INT);
              • $id = optional param(’id’, 0, PARAM INT);
           • Mahara:
              • $id = param integer(’id’);
              • $id = param integer(’id’, 0);



Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Error handling and debugging


Error handling and debugging


           • Exceptions from the start
           • Throw specifically, catch generally in most cases
           • Clearly defined Exception hierarchy, which defines the
              handling of errors
           • Logging targets (screen/logs), could be more later (eg
              email to developers)
           • Logging levels: debug, warn, environment




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Miscellaneous differences


Cron




           • Proper scheduler
           • Database example




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Miscellaneous differences


Miscellaneous differences




           • less use of globals - get config rather than global $CFG
           • Contentious - use of Smarty for templates
           • Mochikit rather than YUI




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities

      3   Key Differences

      4   Other main components
            Signalling

      5   Plugin Types

      6   Code flow layout

      7   A typical Mahara Page
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Signalling


Event handling



             • Similar to Moodle
             • handle event
             • Core throws events, plugins can subscribe
             • They register which events they want at install/upgrade
             • Processed at cron




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Signalling


Activity handling



             • Like events, but for user activity
             • Eg, feedback on a view
             • activity occurred
             • Notifies all relevant users




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities

      3   Key Differences

      4   Other main components

      5   Plugin Types
            Introduction to Plugins
            Artefact Plugins
            Other Plugins
            Themes
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara6   Code flow layout
      Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Introduction to Plugins


Introduction to Plugins



            • Registers at installation time:
                • Cronjobs
                • Event subscriptions
            • Also exports config form
            • Exactly the same way to install and upgrade as Moodle




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Introduction to Plugins


The Plugin base class


            • get cron
            • get event subscriptions
            • postinst
            • has config
            • get activity types
            • Subtypes can enforce their own abstract methods




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Artefact Plugins


Artefact

           • Richest plugin type
           • Two new classes
               • PluginArtefact
                         •   get artefact types
                         •   get block types
                         •   get plugin name
                         •   menu items
                         •   group tabs
                   • ArtefactType
                        • get icon
                        • is singular
                        • public feedback allowed
                        • has config

Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Artefact Plugins


More on Artefacts


           • Generally plugins will write a new ArtefactType base class
           • Example: artefact plugin Foo will make PluginArtefactFoo
               and ArtefactTypeFoo
           • For each artefact type that get artefact types returns,
               ArtefactTypeFoo subclass
           • Should be fairly obvious that the API is quite flexible




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Other Plugins


Blocktype



           • Blocktypes define how artefacts are displayed in a view
           • Probably the most simple Mahara plugin
           • We’ll have a go at writing one this afternoon
           • Bound to either an artefact plugin or ’system’ level




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Other Plugins


Blocktype classes

           • New subclass: PluginBlocktype extends Plugin
           • single only
           • get title
           • get description
           • get categories
           • get viewtypes
           • render instance
           • artefactchooser element
           • ... more

Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Other Plugins


Notification



           • PluginNotification extends Plugin
           • one new method: notify user
           • Current: internal messages, email, emaildigest
           • Could be: jabber plugin, for example




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Other Plugins


Interaction


           • Used for adding things like Forums to Groups
           • Two new subclass:
           • PluginInteraction extends Plugin
               • instance config form
               • instance config save
           • InteractionInstance
               • get plugin
               • interaction remove user




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Other Plugins


Other plugins




           • Authentication - internal, ldap, xmlrpc (MNET), imap
           • Search - internal (sql), solr
           • Grouptype - standard, course




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Themes


Themes



          • theme directory contains:
              • config.php - parent theme, theme name
              • static - stylesheets, images
              • templates - smarty templates




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities

      3   Key Differences

      4   Other main components

      5   Plugin Types

      6   Code flow layout

      7   A typical Mahara Page
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Layout




          • Switch to code




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities

      3   Key Differences

      4   Other main components

      5   Plugin Types

      6   Code flow layout

      7   A typical Mahara Page
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




A typical Mahara Page




          • Switch to code




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




      1   Introduction

      2   Key Similarities

      3   Key Differences

      4   Other main components

      5   Plugin Types

      6   Code flow layout

      7   A typical Mahara Page
Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers
Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page




Ideas?


Ideas?



          • Themes
          • Blocktypes
              • Twitter
              • Last.fm
              • Dopplr
              • Facebook
              • Flickr




Penny Leach <penny@catalyst.net.nz>                                                            MoodleMoot Barcelona
Mahara Development for Moodle Developers

Contenu connexe

En vedette

The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)
The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)
The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)Muchiu (Henry) Chang, PhD. Cantab
 
The archived Canadian US Patent Competitive Intelligence Database (2015/10/27)
The archived Canadian US Patent Competitive Intelligence Database (2015/10/27) The archived Canadian US Patent Competitive Intelligence Database (2015/10/27)
The archived Canadian US Patent Competitive Intelligence Database (2015/10/27) Muchiu (Henry) Chang, PhD. Cantab
 
Keep Walking
Keep  WalkingKeep  Walking
Keep Walkingmammoth67
 
Eenk ijkje in het huis van de Bloemenarbeiders
Eenk ijkje in het huis van de BloemenarbeidersEenk ijkje in het huis van de Bloemenarbeiders
Eenk ijkje in het huis van de BloemenarbeidersABVV
 
Presentatie Hans Vaneerdewegh (ABVV-Metaal)
Presentatie Hans Vaneerdewegh (ABVV-Metaal)Presentatie Hans Vaneerdewegh (ABVV-Metaal)
Presentatie Hans Vaneerdewegh (ABVV-Metaal)ABVV
 
The Archived Canadian Patent Competitive Intelligence (December 28, 2010)
The Archived Canadian Patent Competitive Intelligence (December 28, 2010)The Archived Canadian Patent Competitive Intelligence (December 28, 2010)
The Archived Canadian Patent Competitive Intelligence (December 28, 2010)Muchiu (Henry) Chang, PhD. Cantab
 
Exquisite solutionz
Exquisite solutionzExquisite solutionz
Exquisite solutionzNidhi
 
The Archived Canadian Patent Competitive Intelligence (2011/8/2)
The Archived Canadian Patent Competitive Intelligence (2011/8/2)The Archived Canadian Patent Competitive Intelligence (2011/8/2)
The Archived Canadian Patent Competitive Intelligence (2011/8/2)Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (February 15, 2011)
The Archived Canadian Patent Competitive Intelligence (February 15, 2011)The Archived Canadian Patent Competitive Intelligence (February 15, 2011)
The Archived Canadian Patent Competitive Intelligence (February 15, 2011)Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (November 9, 2010)
The Archived Canadian Patent Competitive Intelligence (November 9, 2010)The Archived Canadian Patent Competitive Intelligence (November 9, 2010)
The Archived Canadian Patent Competitive Intelligence (November 9, 2010)Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (January 4, 2011)
The Archived Canadian Patent Competitive Intelligence (January 4, 2011)The Archived Canadian Patent Competitive Intelligence (January 4, 2011)
The Archived Canadian Patent Competitive Intelligence (January 4, 2011)Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (June 28, 2011)
The Archived Canadian Patent Competitive Intelligence (June 28, 2011)The Archived Canadian Patent Competitive Intelligence (June 28, 2011)
The Archived Canadian Patent Competitive Intelligence (June 28, 2011)Muchiu (Henry) Chang, PhD. Cantab
 
The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)
The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)
The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (2013/7/9)
The Archived Canadian Patent Competitive Intelligence (2013/7/9)The Archived Canadian Patent Competitive Intelligence (2013/7/9)
The Archived Canadian Patent Competitive Intelligence (2013/7/9)Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (May 31, 2011)
The Archived Canadian Patent Competitive Intelligence (May 31, 2011)The Archived Canadian Patent Competitive Intelligence (May 31, 2011)
The Archived Canadian Patent Competitive Intelligence (May 31, 2011)Muchiu (Henry) Chang, PhD. Cantab
 
The archived Canadian US Patent Competitive Intelligence Database (2015/4/21)
The archived Canadian US Patent Competitive Intelligence Database (2015/4/21) The archived Canadian US Patent Competitive Intelligence Database (2015/4/21)
The archived Canadian US Patent Competitive Intelligence Database (2015/4/21) Muchiu (Henry) Chang, PhD. Cantab
 
The Archived Canadian Patent Competitive Intelligence (May 24, 2011)
The Archived Canadian Patent Competitive Intelligence (May 24, 2011)The Archived Canadian Patent Competitive Intelligence (May 24, 2011)
The Archived Canadian Patent Competitive Intelligence (May 24, 2011)Muchiu (Henry) Chang, PhD. Cantab
 
The archived Canadian US Patent Competitive Intelligence Database (2015/11/3)
The archived Canadian US Patent Competitive Intelligence Database (2015/11/3) The archived Canadian US Patent Competitive Intelligence Database (2015/11/3)
The archived Canadian US Patent Competitive Intelligence Database (2015/11/3) Muchiu (Henry) Chang, PhD. Cantab
 

En vedette (20)

Nas ruas | Jardin
Nas ruas | JardinNas ruas | Jardin
Nas ruas | Jardin
 
The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)
The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)
The Archived Canadian Patent Competitive Intelligence (2013/8/13) (correction)
 
Market Watch Media Kit
Market Watch Media KitMarket Watch Media Kit
Market Watch Media Kit
 
The archived Canadian US Patent Competitive Intelligence Database (2015/10/27)
The archived Canadian US Patent Competitive Intelligence Database (2015/10/27) The archived Canadian US Patent Competitive Intelligence Database (2015/10/27)
The archived Canadian US Patent Competitive Intelligence Database (2015/10/27)
 
Keep Walking
Keep  WalkingKeep  Walking
Keep Walking
 
Eenk ijkje in het huis van de Bloemenarbeiders
Eenk ijkje in het huis van de BloemenarbeidersEenk ijkje in het huis van de Bloemenarbeiders
Eenk ijkje in het huis van de Bloemenarbeiders
 
Presentatie Hans Vaneerdewegh (ABVV-Metaal)
Presentatie Hans Vaneerdewegh (ABVV-Metaal)Presentatie Hans Vaneerdewegh (ABVV-Metaal)
Presentatie Hans Vaneerdewegh (ABVV-Metaal)
 
The Archived Canadian Patent Competitive Intelligence (December 28, 2010)
The Archived Canadian Patent Competitive Intelligence (December 28, 2010)The Archived Canadian Patent Competitive Intelligence (December 28, 2010)
The Archived Canadian Patent Competitive Intelligence (December 28, 2010)
 
Exquisite solutionz
Exquisite solutionzExquisite solutionz
Exquisite solutionz
 
The Archived Canadian Patent Competitive Intelligence (2011/8/2)
The Archived Canadian Patent Competitive Intelligence (2011/8/2)The Archived Canadian Patent Competitive Intelligence (2011/8/2)
The Archived Canadian Patent Competitive Intelligence (2011/8/2)
 
The Archived Canadian Patent Competitive Intelligence (February 15, 2011)
The Archived Canadian Patent Competitive Intelligence (February 15, 2011)The Archived Canadian Patent Competitive Intelligence (February 15, 2011)
The Archived Canadian Patent Competitive Intelligence (February 15, 2011)
 
The Archived Canadian Patent Competitive Intelligence (November 9, 2010)
The Archived Canadian Patent Competitive Intelligence (November 9, 2010)The Archived Canadian Patent Competitive Intelligence (November 9, 2010)
The Archived Canadian Patent Competitive Intelligence (November 9, 2010)
 
The Archived Canadian Patent Competitive Intelligence (January 4, 2011)
The Archived Canadian Patent Competitive Intelligence (January 4, 2011)The Archived Canadian Patent Competitive Intelligence (January 4, 2011)
The Archived Canadian Patent Competitive Intelligence (January 4, 2011)
 
The Archived Canadian Patent Competitive Intelligence (June 28, 2011)
The Archived Canadian Patent Competitive Intelligence (June 28, 2011)The Archived Canadian Patent Competitive Intelligence (June 28, 2011)
The Archived Canadian Patent Competitive Intelligence (June 28, 2011)
 
The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)
The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)
The archived Canadian US Patent Competitive Intelligence Database (2016/8/2)
 
The Archived Canadian Patent Competitive Intelligence (2013/7/9)
The Archived Canadian Patent Competitive Intelligence (2013/7/9)The Archived Canadian Patent Competitive Intelligence (2013/7/9)
The Archived Canadian Patent Competitive Intelligence (2013/7/9)
 
The Archived Canadian Patent Competitive Intelligence (May 31, 2011)
The Archived Canadian Patent Competitive Intelligence (May 31, 2011)The Archived Canadian Patent Competitive Intelligence (May 31, 2011)
The Archived Canadian Patent Competitive Intelligence (May 31, 2011)
 
The archived Canadian US Patent Competitive Intelligence Database (2015/4/21)
The archived Canadian US Patent Competitive Intelligence Database (2015/4/21) The archived Canadian US Patent Competitive Intelligence Database (2015/4/21)
The archived Canadian US Patent Competitive Intelligence Database (2015/4/21)
 
The Archived Canadian Patent Competitive Intelligence (May 24, 2011)
The Archived Canadian Patent Competitive Intelligence (May 24, 2011)The Archived Canadian Patent Competitive Intelligence (May 24, 2011)
The Archived Canadian Patent Competitive Intelligence (May 24, 2011)
 
The archived Canadian US Patent Competitive Intelligence Database (2015/11/3)
The archived Canadian US Patent Competitive Intelligence Database (2015/11/3) The archived Canadian US Patent Competitive Intelligence Database (2015/11/3)
The archived Canadian US Patent Competitive Intelligence Database (2015/11/3)
 

Similaire à Mahara Development for Moodle Developers

Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--devaltsav
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsSuite Solutions
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101Mathew Beane
 
Magento 2 Development Best Practices
Magento 2 Development Best PracticesMagento 2 Development Best Practices
Magento 2 Development Best PracticesBen Marks
 
Create Your Own Starter Files
Create Your Own Starter FilesCreate Your Own Starter Files
Create Your Own Starter FilesEmily Lewis
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreDan Poltawski
 
DrupalCon LA 2015 Review
DrupalCon LA 2015 ReviewDrupalCon LA 2015 Review
DrupalCon LA 2015 ReviewlittleMAS
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101Mathew Beane
 
Drupal for programmers
Drupal for programmersDrupal for programmers
Drupal for programmersMichael Shahov
 
Pythonsevilla2019 - Introduction to MLFlow
Pythonsevilla2019 - Introduction to MLFlowPythonsevilla2019 - Introduction to MLFlow
Pythonsevilla2019 - Introduction to MLFlowFernando Ortega Gallego
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!netzwelt12345
 
aOS Canadian Tour Share point migration tips
aOS Canadian Tour Share point migration tipsaOS Canadian Tour Share point migration tips
aOS Canadian Tour Share point migration tipsMike Maadarani
 
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Steve Kessler
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017Marc D Anderson
 

Similaire à Mahara Development for Moodle Developers (20)

Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--dev
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
Developing better PHP projects
Developing better PHP projectsDeveloping better PHP projects
Developing better PHP projects
 
72d5drupal
72d5drupal72d5drupal
72d5drupal
 
Magento 2 Development Best Practices
Magento 2 Development Best PracticesMagento 2 Development Best Practices
Magento 2 Development Best Practices
 
Create Your Own Starter Files
Create Your Own Starter FilesCreate Your Own Starter Files
Create Your Own Starter Files
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
Software development
Software  development Software  development
Software development
 
DrupalCon LA 2015 Review
DrupalCon LA 2015 ReviewDrupalCon LA 2015 Review
DrupalCon LA 2015 Review
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Drupal for programmers
Drupal for programmersDrupal for programmers
Drupal for programmers
 
Django Documentation
Django DocumentationDjango Documentation
Django Documentation
 
Pythonsevilla2019 - Introduction to MLFlow
Pythonsevilla2019 - Introduction to MLFlowPythonsevilla2019 - Introduction to MLFlow
Pythonsevilla2019 - Introduction to MLFlow
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
aOS Canadian Tour Share point migration tips
aOS Canadian Tour Share point migration tipsaOS Canadian Tour Share point migration tips
aOS Canadian Tour Share point migration tips
 
Miami2015
Miami2015Miami2015
Miami2015
 
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
 
Codeigniter framework
Codeigniter framework Codeigniter framework
Codeigniter framework
 

Plus de Mahara E-Portfolio Project (7)

State of the Mahara Nation
State of the Mahara NationState of the Mahara Nation
State of the Mahara Nation
 
Uso de Moodle con Mahara
Uso de Moodle con MaharaUso de Moodle con Mahara
Uso de Moodle con Mahara
 
Using Moodle with Mahara
Using Moodle with MaharaUsing Moodle with Mahara
Using Moodle with Mahara
 
Usant Moodle amb Mahara
Usant Moodle amb MaharaUsant Moodle amb Mahara
Usant Moodle amb Mahara
 
ePortfolios and Mahara
ePortfolios and MaharaePortfolios and Mahara
ePortfolios and Mahara
 
Mahara: An overview of the ePortfolio application
Mahara: An overview of the ePortfolio applicationMahara: An overview of the ePortfolio application
Mahara: An overview of the ePortfolio application
 
Mahara: Celebrating Learning
Mahara: Celebrating LearningMahara: Celebrating Learning
Mahara: Celebrating Learning
 

Dernier

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Dernier (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

Mahara Development for Moodle Developers

  • 1. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Mahara Development for Moodle Developers Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona October 24 2008 Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 2. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction Where the similarities come from Mahara’s General approach 2 Key Similarities DML & XMLDB Upgrades Language Packs config.php Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 3. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 3 Key Differences Database Input and Output Error handling and debugging Miscellaneous differences 4 Other main components Signalling 5 Plugin Types Introduction to Plugins Artefact Plugins Other Plugins Themes Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 4. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 6 Code flow layout 7 A typical Mahara Page Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 5. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction Where the similarities come from Mahara’s General approach 2 Key Similarities 3 Key Differences 4 Other main components 5 Plugin Types 6 Code flow layout Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 6. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Where the similarities come from History • A very rushed first 3 months • A lot of code taken from Moodle by me • Over time we diverged and broke compatibility Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 7. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Mahara’s General approach General approach • PHP5 from the start • Much stricter approach • Much more OO and later PHP features. • For example, plugin definitions are all abstract classes Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 8. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities DML & XMLDB Upgrades Language Packs config.php 3 Key Differences 4 Other main components 5 Plugin Types Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara6 Code flow layout Development for Moodle Developers
  • 9. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page DML & XMLDB DDL & XMLDB • No UI to generate XML or upgrade PHP • Learn the API and write it yourself • Learn the XML and write it yourself • Offset by removal of NEXT/PREV checking • Added some changes back into Moodle early on Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 10. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Upgrades Upgrades • version.php and database version number • db/upgrade.php and db/install.xml as usual • Upgrades require administrative login • disablelogin & minupgradefrom Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 11. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Language Packs Language Packs • get string • $string array of keys to values • Use of sprintf and %s rather than eval and $a • Slightly different get string function contract (variable arguments rather than one mixed argument) • Helpfiles are more often automatically detected based on form element, page and section Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 12. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page config.php config.php • Very similar beginning - db details • docroot is detected • dataroot the same • wwwroot optional (detected but not perfect) • Then divergence begins • One big difference: • config.php • config-dist.php • config-defaults.php Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 13. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities 3 Key Differences Database Input and Output Error handling and debugging Miscellaneous differences 4 Other main components 5 Plugin Types Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara6 Code flow layout Development for Moodle Developers
  • 14. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Database DML • Same starting point but a few divergences: • Prepared statements and placeholders (select * from {table} where field = ?) • No get records anymore, get records array and get records assoc instead • Some function contracts changed to suit $values array between $sql and other things like $limit • 138 lines of diff in grep function between Moodle and Mahara but really it’s not that different Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 15. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Database More DB differences • Referential Integrity - there in XMLDB but disabled in Moodle for now • Proper date fields rather than integers • Much more use of transactions • No magic id field on every table Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 16. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Input and Output Forms • Completely different to Moodle, they were developed about the same time • Pieforms, written by a Mahara developer, Nigel. • Maintained as a separate library on sourceforge • Array based form definitions with callback functions • Much simpler than QuickForms and easier to customise Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 17. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Input and Output Parameter Input • Completely different approach • Moodle will clean parameters to match rules • Mahara will reject anything that doesn’t match • Moodle: • $id = required param(’id’, PARAM INT); • $id = optional param(’id’, 0, PARAM INT); • Mahara: • $id = param integer(’id’); • $id = param integer(’id’, 0); Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 18. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Error handling and debugging Error handling and debugging • Exceptions from the start • Throw specifically, catch generally in most cases • Clearly defined Exception hierarchy, which defines the handling of errors • Logging targets (screen/logs), could be more later (eg email to developers) • Logging levels: debug, warn, environment Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 19. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Miscellaneous differences Cron • Proper scheduler • Database example Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 20. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Miscellaneous differences Miscellaneous differences • less use of globals - get config rather than global $CFG • Contentious - use of Smarty for templates • Mochikit rather than YUI Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 21. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities 3 Key Differences 4 Other main components Signalling 5 Plugin Types 6 Code flow layout 7 A typical Mahara Page Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 22. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Signalling Event handling • Similar to Moodle • handle event • Core throws events, plugins can subscribe • They register which events they want at install/upgrade • Processed at cron Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 23. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Signalling Activity handling • Like events, but for user activity • Eg, feedback on a view • activity occurred • Notifies all relevant users Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 24. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities 3 Key Differences 4 Other main components 5 Plugin Types Introduction to Plugins Artefact Plugins Other Plugins Themes Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara6 Code flow layout Development for Moodle Developers
  • 25. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Introduction to Plugins Introduction to Plugins • Registers at installation time: • Cronjobs • Event subscriptions • Also exports config form • Exactly the same way to install and upgrade as Moodle Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 26. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Introduction to Plugins The Plugin base class • get cron • get event subscriptions • postinst • has config • get activity types • Subtypes can enforce their own abstract methods Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 27. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Artefact Plugins Artefact • Richest plugin type • Two new classes • PluginArtefact • get artefact types • get block types • get plugin name • menu items • group tabs • ArtefactType • get icon • is singular • public feedback allowed • has config Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 28. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Artefact Plugins More on Artefacts • Generally plugins will write a new ArtefactType base class • Example: artefact plugin Foo will make PluginArtefactFoo and ArtefactTypeFoo • For each artefact type that get artefact types returns, ArtefactTypeFoo subclass • Should be fairly obvious that the API is quite flexible Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 29. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Other Plugins Blocktype • Blocktypes define how artefacts are displayed in a view • Probably the most simple Mahara plugin • We’ll have a go at writing one this afternoon • Bound to either an artefact plugin or ’system’ level Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 30. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Other Plugins Blocktype classes • New subclass: PluginBlocktype extends Plugin • single only • get title • get description • get categories • get viewtypes • render instance • artefactchooser element • ... more Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 31. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Other Plugins Notification • PluginNotification extends Plugin • one new method: notify user • Current: internal messages, email, emaildigest • Could be: jabber plugin, for example Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 32. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Other Plugins Interaction • Used for adding things like Forums to Groups • Two new subclass: • PluginInteraction extends Plugin • instance config form • instance config save • InteractionInstance • get plugin • interaction remove user Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 33. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Other Plugins Other plugins • Authentication - internal, ldap, xmlrpc (MNET), imap • Search - internal (sql), solr • Grouptype - standard, course Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 34. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Themes Themes • theme directory contains: • config.php - parent theme, theme name • static - stylesheets, images • templates - smarty templates Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 35. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities 3 Key Differences 4 Other main components 5 Plugin Types 6 Code flow layout 7 A typical Mahara Page Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 36. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Layout • Switch to code Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 37. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities 3 Key Differences 4 Other main components 5 Plugin Types 6 Code flow layout 7 A typical Mahara Page Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 38. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page A typical Mahara Page • Switch to code Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 39. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page 1 Introduction 2 Key Similarities 3 Key Differences 4 Other main components 5 Plugin Types 6 Code flow layout 7 A typical Mahara Page Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers
  • 40. Introduction Key Similarities Key Differences Other main components Plugin Types Code flow layout A typical Mahara Page Ideas? Ideas? • Themes • Blocktypes • Twitter • Last.fm • Dopplr • Facebook • Flickr Penny Leach <penny@catalyst.net.nz> MoodleMoot Barcelona Mahara Development for Moodle Developers