SlideShare a Scribd company logo
1 of 31
Download to read offline
Dan Poltawski
Integrator
Moodle HQ
How to guarantee your change is
integrated to Moodle core
@dan_p
Who am I?
• Core developer in Moodle community since 2005
• Worked with schools, universities and businesses
around UK
• Moved to Australia and joined Moodle HQ in 2012 as
an Integrator and Developer
• Since joining HQ, i’ve spent a lot of my time
complaining about the price of beer in Perth...
$10!
£7
€8
(http://www.quora.com/Beer/Does-Perth-Australia-have-the-most-expensive-beer-prices-in-the-world)
Who am I
I’m also part of the Integration Team..
• Experienced group of Moodle developers at HQ, who
act as the final ‘gatekeepers’
• Conducting final checks before code makes it into
Moodle release
• Bring historical context and try to facilitate
communication between interested parties
• Consider the whole communities point of view
• http://docs.moodle.org/dev/Integration_Review
How to guarantee your change is
integrated to Moodle core
How to guarantee your change is
integrated to Moodle core
You can’t!
Why not..
• The Moodle community is diverse and we need to support a
large community in a generic way
• We’re maintaining a ‘platform’ with core tools
• We don’t have unlimited resources to maintain every feature
anyone can think of
..use moodle.org/plugins/
• Plugins to support as many types of customisations as possible
• Tightly integrated to Moodle for easy install and upgrades
[DEMO]
• Infrastructure will continue to be improved in this direction
Why contribute anything to core?
• It’s a bug
• You can’t fix core bugs in
plugins!
• There isn’t an appropriate
plugin point
• You’re confident the Moodle
community will be on board
• Its rewarding!
• Dan core contributors
• (we’ve got 2800 open bugs and
appreciate help)
0
25
50
75
100
28
51
76
84
93
2.1 2.2 2.3 2.4 2.5
Non-Moodle HQ core contributors
per release
But if you fit the bill..
Here are some ways to increase your chances of success..
1. Process
• Same for any developer, even Moodle
HQ
Simplified:
• Make code available as a git branch
• Multiple rounds of code review
• Pulled into main Moodle repository and
tested
• If successful, closed and change is
deployed
http://docs.moodle.org/dev/Process
1. Process
Pitfalls:
• Learning the ropes can be daunting, don’t be afraid to
ask for help!
• Some aspects of the process involve waiting for
feedback
• Other parts of the process request your feedback
quickly, in a time limited way (e.g. ‘testing failed’ state)
2. Tracker
• All developments start with a tracker
issue. The ‘home’ of developers, lots of
knowledge recorded on issues
• Be sure to search for and link together
related issues
• Record your thoughts/decisions while
developing code, is useful reference
• Be sure to link to related forum
discussions, docs and materials which
are relevant, else a developer may not
aware of this
2. Tracker
Pitfalls:
• Commenting on an already closed issue
• Useful in some cases, but if new work is required, a
new issue is needed
• Creating duplicate issues
• Please search, make use of component fields to
narrow down issues
• Some actions need additional permissions, see Moodle
Docs: Tracker Guide
3. Community support
• Gather support from the community for your
changes:
• Announce and publicise on forums, twitter,
moots etc.
• For major changes, construct a specification on
the developer docs wiki and solicit feedback
• Be sure to consider use cases other than your
own
• Once you’ve gathered tracker votes, comments
and support, be sure to link from the tracker
3. Community support
Pitfalls
• Not soliciting any feedback
• Bumping forum posts to get attention
• If you are not getting interest it may actually indicate that
nobody else is interested.. which might not be a good
fit.
• Ignoring a use case which doesn’t fit with yours
• We can’t ignore specific use cases in core
4. Coding Style
• Moodle has nearly 1 million lines of code which have
evolved over 10+ years from hundreds of developers
• The Moodle coding style was created to improve
consistency and should be followed for all new code:
http://docs.moodle.org/dev/Coding_style
• Lots of old code sucks, don’t copy it!
• The codechecker and moodlecheck plugins allow
you to check your code against coding style rules
automatically.
• Try to take a sensible approach to any code you are
modifying. Its often sensible to match the surrounding
style for better readability
4. Coding Style
Common Pitfalls
• Not checked against code checker at all
• Gives suggestion of poor attention to detail, don’t give us that
excuse!
• Use of underscores in variable names
• Incorrect spacing on control statements
• Developing without DEBUG_DEVELOPER
5. Code Review
• All Moodle Code is reviewed multiple times before making it into the
final release
• Moodle is so huge and has been evolving for so long that no one person
knows everything
• The code review serves as a way to both improve the code and to share
the historical context which might apply to each change
• Ideally, for the best chance of success, someone experienced with the
area you are coding would review the code (e.g. component maintainer)
• Code review is a two way process, don’t be afraid to justify your
decisions (an important part of the process is to extract the rationale for
others to see)
5. Code Review
Pitfalls:
• Difficulty finding a peer reviewer
• Try to be patient and when your patience runs out, consider campaigning
politely on the forums
• Reviewers can be critical and sometimes frank
• Try not to take it personally, the goal of everyone is to find the best
technical solution for each issue
• Disagreement with reviewer
• Feel free to state your case and if necessary, disregard their advice. But
be sure to justify your rationale for final integration
6. Cross-DB Compatibility
• Moodle supports PostgreSQL, MySQL, Oracle and MS SQL.
Please try to test against another db to your usual environment as
a minimum
• Pay special attention when writing custom SQL
• At this time, transactions cannot be relied upon in core, because
we still support myisam
• Can be useful for constructing complex queries against different
engines: http://sqlfiddle.com/
6. Cross-DB Compatibility
Common pitfalls:
• Forgetting $DB->sql_compare_text() or $DB->sql_concat()
• Using DISTINCT on text columns (not compatible with Oracle)
• Adding LIMIT clauses, rather than using the function params
• Not including all GROUP BY items in the SELECT field-list (MySQL vs
PostgreSQL)
• Not using placeholders for user input
• Not using the XMLDB editor for creating schema definitions
7. Performance
• Don’t decrease performance!
• Database queries are by far one of the most expensive things you
can do, try not to increase them, ensure that they are constant.
• If you improve performance, please record and share your results on
the tracker. We love integrating performance improvements!
• profile, profile, profile (see Tim Hunt’s recent blogpost: Performance-
testing Moodle )
• Make use of the Cache API for adding caching, don’t create your
own caches: http://docs.moodle.org/dev/Cache_API
7. Performance
Common pitfalls
• DB Queries in loops or widely called functions
foreach ($courseids as $courseid) {
//... do stuff..
foreach ($studentids as $studentid) {
$DB->get_record('user', array('id' => $studentid);
// Could be called 50,0000 times even on small sites!
}
}
• Loading a large amount of data into RAM
• Try to use $DB->get_recordset*() on large datasets
• Be mindful with file inclusions
8. Security
• You should know and be using, at least:
• optional_param()/ required_param() or formslib to validate
user input
• PARAM_xxx types for cleaning user input
• XSRF protection using session keys
• s(), p(), format_string() and format_text() for
outputting user-inputted text
• How to control access using capabilities, the context hierarchy and
require_login() etc
• Our process for dealing with security bugs is different, in order to
achieve responsible disclosure.
8. Security
Common pitfalls:
• Forgetting session keys
• Handled for you by formslib, else you need to do it!
• Often missed when simple toggle functions
• Incorrect use of PARAM_ types
• Study the top of lib/moodlelib.php
• Careful with FORMAT_TEXT - it’s name is misleading due to
multilang
9. Internationalisation
• Moodle 2.5 has over 100 language packs and is a strong multilingual
community
• Use get_string() for strings, don’t hardcode english!
• Consider carefully the time of translators in creation of your strings
(tricky tradeoff)
• Remember to use userdate() for times, we provide a number of
standard time formats as standard.
• Not all languages use ‘.’ for floating point numbers! Remember to use
format_float() and unformat_float() to recieve and output
floating point numbers in the users locale
• Consider Right To Left (RTL) languages in CSS/design [.dir-rtl]
9. Internationalisation
Common pitfalls:
• Concatenating strings, this breaks badly for rtl languages or when
its impossible to translate correctly
• Using the same string in different contexts
• Use AMOS SCRIPT in git commits to do an AMOS CPY to make
the translators life easier http://docs.moodle.org/dev/Languages/
AMOS#AMOS_script
• Using PARAM_FLOAT for user input
10. Testing
• A big focus for Moodle over the last two years
• Unit testing with phpunit
• Tests written in php and executed in a sandboxed ‘per unit’ environment.
• Much more powerful than the old simpletest environment
• Test environment is reset between tests
• Data generators allow test data to be easily constructed
• Extensive range of assertions
• Automated acceptance testing, using behat
• Tests written in English and executed automatically in a browser environment
• Used for UI testing in multiple environments
• Manual tests for situations which are not possible to automate
• All automated tests are being run and verified on a weekly basis to check for
regressions
10. Behat Demo
Scenario: Login to course and add forum
Given the following "users" exists:
| username | firstname | lastname | email |
| presenter1 | Presenter | Dan | dan@moodle.com |
And the following "courses" exists:
| fullname | shortname |
| iMoot Course | imoot |
And the following "course enrolments" exists:
| user | course | role |
| presenter1 | imoot | editingteacher |
And I log in as "presenter1"
And I follow "iMoot Course"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | iMoot Forum |
| Forum type | Standard forum for general use |
| Description | Test forum description |
When I follow "iMoot Course"
Then I should see "iMoot Forum"
10. Testing
Pitfalls
• No tests at all
• Consider using TDD for new code (its likely to be helpful
for you too!)
• We will become stricter about this over time (no excuses)
• Adding complex logic into tests and other ‘test smells’
• http://xunitpatterns.com/Test%20Smells.html is
recommended reading
• Learning curve setting up the tools
• Please post on the forums and help us improve our tools!
Grab bag..
• Knowledge of git and how to create a git branch is essential. As are
good commit messages (see http://docs.moodle.org/dev/
Commit_cheat_sheet )
• Backwards compatibility must be maintained for for core code,
ensure that your changes don’t break backwards compatibility
• When fixing bugs, we generally need to support the last 3 versions
currently in support, as specified in http://docs.moodle.org/dev/
Releases
• Don’t be put off from contributing your code if you can’t do all of
what I suggest. Moodle HQ can help prepare code for integration
(and appreciate any effort you are able to give).
Questions?
?

More Related Content

What's hot

Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Vietnam Open Infrastructure User Group
 
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATSDeploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATSNATS
 
Tsn farkas-intro-0318-v01
Tsn farkas-intro-0318-v01Tsn farkas-intro-0318-v01
Tsn farkas-intro-0318-v01Jörgen Gade
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutronvivekkonnect
 
Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Marco Pas
 
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.ioTHE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.ioDevOpsDays Tel Aviv
 
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...Vietnam Open Infrastructure User Group
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Brian Brazil
 
OVN - Basics and deep dive
OVN - Basics and deep diveOVN - Basics and deep dive
OVN - Basics and deep diveTrinath Somanchi
 
OVN Controller Incremental Processing
OVN Controller Incremental ProcessingOVN Controller Incremental Processing
OVN Controller Incremental ProcessingHan Zhou
 
VictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - PreviewVictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - PreviewVictoriaMetrics
 
Scaling WebRTC applications with Janus
Scaling WebRTC applications with JanusScaling WebRTC applications with Janus
Scaling WebRTC applications with JanusLorenzo Miniero
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaArvind Kumar G.S
 
How To Monetise & Bill CloudStack - A Practical Open Approach
How To Monetise & Bill CloudStack - A Practical Open ApproachHow To Monetise & Bill CloudStack - A Practical Open Approach
How To Monetise & Bill CloudStack - A Practical Open ApproachShapeBlue
 
Ceph Tech Talk -- Ceph Benchmarking Tool
Ceph Tech Talk -- Ceph Benchmarking ToolCeph Tech Talk -- Ceph Benchmarking Tool
Ceph Tech Talk -- Ceph Benchmarking ToolCeph Community
 
Observability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing PrimerObservability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing PrimerVMware Tanzu
 

What's hot (20)

Directory services
Directory servicesDirectory services
Directory services
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
 
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATSDeploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
 
Tsn farkas-intro-0318-v01
Tsn farkas-intro-0318-v01Tsn farkas-intro-0318-v01
Tsn farkas-intro-0318-v01
 
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStackMeetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStack
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
 
Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)
 
Logstash
LogstashLogstash
Logstash
 
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.ioTHE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
 
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
Micro Service Architect in K8S in ZaloPay Merchant Platform | Châu Nguyễn Nhậ...
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
 
OVN - Basics and deep dive
OVN - Basics and deep diveOVN - Basics and deep dive
OVN - Basics and deep dive
 
OVN Controller Incremental Processing
OVN Controller Incremental ProcessingOVN Controller Incremental Processing
OVN Controller Incremental Processing
 
VictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - PreviewVictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - Preview
 
Scaling WebRTC applications with Janus
Scaling WebRTC applications with JanusScaling WebRTC applications with Janus
Scaling WebRTC applications with Janus
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
How To Monetise & Bill CloudStack - A Practical Open Approach
How To Monetise & Bill CloudStack - A Practical Open ApproachHow To Monetise & Bill CloudStack - A Practical Open Approach
How To Monetise & Bill CloudStack - A Practical Open Approach
 
Jwt Security
Jwt SecurityJwt Security
Jwt Security
 
Ceph Tech Talk -- Ceph Benchmarking Tool
Ceph Tech Talk -- Ceph Benchmarking ToolCeph Tech Talk -- Ceph Benchmarking Tool
Ceph Tech Talk -- Ceph Benchmarking Tool
 
Observability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing PrimerObservability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing Primer
 

Similar to How to increase your chances of getting code integrated into the Moodle core platform

Create Your Own Starter Files
Create Your Own Starter FilesCreate Your Own Starter Files
Create Your Own Starter FilesEmily Lewis
 
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel ZikmundNDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel ZikmundKarel Zikmund
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Molieremfrancis
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)Mike Harris
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedAlexander Makarov
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
 
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
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanSuite Solutions
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentSuzanne Dergacheva
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentationBhavin Gandhi
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!pixelonion
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Mirco Hering
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Derek Jacoby
 
Connecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and BeyondConnecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and BeyondDon Day
 

Similar to How to increase your chances of getting code integrated into the Moodle core platform (20)

Create Your Own Starter Files
Create Your Own Starter FilesCreate Your Own Starter Files
Create Your Own Starter Files
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Software development fundamentals
Software development fundamentalsSoftware development fundamentals
Software development fundamentals
 
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel ZikmundNDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
Movingto moodle2 v1 1
Movingto moodle2 v1 1Movingto moodle2 v1 1
Movingto moodle2 v1 1
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
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
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project Plan
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
Connecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and BeyondConnecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and Beyond
 

More from Dan Poltawski

Adding Global Search to your Moodle #mootieuk17
Adding Global Search to your Moodle #mootieuk17Adding Global Search to your Moodle #mootieuk17
Adding Global Search to your Moodle #mootieuk17Dan Poltawski
 
Moodle 3.3 - API Change Overview #mootieuk17
Moodle 3.3 - API Change Overview #mootieuk17Moodle 3.3 - API Change Overview #mootieuk17
Moodle 3.3 - API Change Overview #mootieuk17Dan Poltawski
 
Lifecycle of a Moodle Bug - #mootus16
Lifecycle of a Moodle Bug - #mootus16Lifecycle of a Moodle Bug - #mootus16
Lifecycle of a Moodle Bug - #mootus16Dan Poltawski
 
Tools and Tips for Moodle Developers - #mootus16
 Tools and Tips for Moodle Developers - #mootus16 Tools and Tips for Moodle Developers - #mootus16
Tools and Tips for Moodle Developers - #mootus16Dan Poltawski
 
Continuous Integration: Improving Quality in Moodle
Continuous Integration: Improving Quality in Moodle Continuous Integration: Improving Quality in Moodle
Continuous Integration: Improving Quality in Moodle Dan Poltawski
 
How integrators bring you a better Moodle
How integrators bring you a better MoodleHow integrators bring you a better Moodle
How integrators bring you a better MoodleDan Poltawski
 
Preparing For Moodle 2.0
Preparing For Moodle 2.0Preparing For Moodle 2.0
Preparing For Moodle 2.0Dan Poltawski
 
Moodle for 1000 Schools
Moodle for 1000 SchoolsMoodle for 1000 Schools
Moodle for 1000 SchoolsDan Poltawski
 

More from Dan Poltawski (8)

Adding Global Search to your Moodle #mootieuk17
Adding Global Search to your Moodle #mootieuk17Adding Global Search to your Moodle #mootieuk17
Adding Global Search to your Moodle #mootieuk17
 
Moodle 3.3 - API Change Overview #mootieuk17
Moodle 3.3 - API Change Overview #mootieuk17Moodle 3.3 - API Change Overview #mootieuk17
Moodle 3.3 - API Change Overview #mootieuk17
 
Lifecycle of a Moodle Bug - #mootus16
Lifecycle of a Moodle Bug - #mootus16Lifecycle of a Moodle Bug - #mootus16
Lifecycle of a Moodle Bug - #mootus16
 
Tools and Tips for Moodle Developers - #mootus16
 Tools and Tips for Moodle Developers - #mootus16 Tools and Tips for Moodle Developers - #mootus16
Tools and Tips for Moodle Developers - #mootus16
 
Continuous Integration: Improving Quality in Moodle
Continuous Integration: Improving Quality in Moodle Continuous Integration: Improving Quality in Moodle
Continuous Integration: Improving Quality in Moodle
 
How integrators bring you a better Moodle
How integrators bring you a better MoodleHow integrators bring you a better Moodle
How integrators bring you a better Moodle
 
Preparing For Moodle 2.0
Preparing For Moodle 2.0Preparing For Moodle 2.0
Preparing For Moodle 2.0
 
Moodle for 1000 Schools
Moodle for 1000 SchoolsMoodle for 1000 Schools
Moodle for 1000 Schools
 

Recently uploaded

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

How to increase your chances of getting code integrated into the Moodle core platform

  • 1. Dan Poltawski Integrator Moodle HQ How to guarantee your change is integrated to Moodle core @dan_p
  • 2. Who am I? • Core developer in Moodle community since 2005 • Worked with schools, universities and businesses around UK • Moved to Australia and joined Moodle HQ in 2012 as an Integrator and Developer • Since joining HQ, i’ve spent a lot of my time complaining about the price of beer in Perth... $10! £7 €8 (http://www.quora.com/Beer/Does-Perth-Australia-have-the-most-expensive-beer-prices-in-the-world)
  • 3. Who am I I’m also part of the Integration Team.. • Experienced group of Moodle developers at HQ, who act as the final ‘gatekeepers’ • Conducting final checks before code makes it into Moodle release • Bring historical context and try to facilitate communication between interested parties • Consider the whole communities point of view • http://docs.moodle.org/dev/Integration_Review
  • 4. How to guarantee your change is integrated to Moodle core
  • 5. How to guarantee your change is integrated to Moodle core You can’t!
  • 6. Why not.. • The Moodle community is diverse and we need to support a large community in a generic way • We’re maintaining a ‘platform’ with core tools • We don’t have unlimited resources to maintain every feature anyone can think of ..use moodle.org/plugins/ • Plugins to support as many types of customisations as possible • Tightly integrated to Moodle for easy install and upgrades [DEMO] • Infrastructure will continue to be improved in this direction
  • 7. Why contribute anything to core? • It’s a bug • You can’t fix core bugs in plugins! • There isn’t an appropriate plugin point • You’re confident the Moodle community will be on board • Its rewarding! • Dan core contributors • (we’ve got 2800 open bugs and appreciate help) 0 25 50 75 100 28 51 76 84 93 2.1 2.2 2.3 2.4 2.5 Non-Moodle HQ core contributors per release
  • 8. But if you fit the bill.. Here are some ways to increase your chances of success..
  • 9. 1. Process • Same for any developer, even Moodle HQ Simplified: • Make code available as a git branch • Multiple rounds of code review • Pulled into main Moodle repository and tested • If successful, closed and change is deployed http://docs.moodle.org/dev/Process
  • 10. 1. Process Pitfalls: • Learning the ropes can be daunting, don’t be afraid to ask for help! • Some aspects of the process involve waiting for feedback • Other parts of the process request your feedback quickly, in a time limited way (e.g. ‘testing failed’ state)
  • 11. 2. Tracker • All developments start with a tracker issue. The ‘home’ of developers, lots of knowledge recorded on issues • Be sure to search for and link together related issues • Record your thoughts/decisions while developing code, is useful reference • Be sure to link to related forum discussions, docs and materials which are relevant, else a developer may not aware of this
  • 12. 2. Tracker Pitfalls: • Commenting on an already closed issue • Useful in some cases, but if new work is required, a new issue is needed • Creating duplicate issues • Please search, make use of component fields to narrow down issues • Some actions need additional permissions, see Moodle Docs: Tracker Guide
  • 13. 3. Community support • Gather support from the community for your changes: • Announce and publicise on forums, twitter, moots etc. • For major changes, construct a specification on the developer docs wiki and solicit feedback • Be sure to consider use cases other than your own • Once you’ve gathered tracker votes, comments and support, be sure to link from the tracker
  • 14. 3. Community support Pitfalls • Not soliciting any feedback • Bumping forum posts to get attention • If you are not getting interest it may actually indicate that nobody else is interested.. which might not be a good fit. • Ignoring a use case which doesn’t fit with yours • We can’t ignore specific use cases in core
  • 15. 4. Coding Style • Moodle has nearly 1 million lines of code which have evolved over 10+ years from hundreds of developers • The Moodle coding style was created to improve consistency and should be followed for all new code: http://docs.moodle.org/dev/Coding_style • Lots of old code sucks, don’t copy it! • The codechecker and moodlecheck plugins allow you to check your code against coding style rules automatically. • Try to take a sensible approach to any code you are modifying. Its often sensible to match the surrounding style for better readability
  • 16. 4. Coding Style Common Pitfalls • Not checked against code checker at all • Gives suggestion of poor attention to detail, don’t give us that excuse! • Use of underscores in variable names • Incorrect spacing on control statements • Developing without DEBUG_DEVELOPER
  • 17. 5. Code Review • All Moodle Code is reviewed multiple times before making it into the final release • Moodle is so huge and has been evolving for so long that no one person knows everything • The code review serves as a way to both improve the code and to share the historical context which might apply to each change • Ideally, for the best chance of success, someone experienced with the area you are coding would review the code (e.g. component maintainer) • Code review is a two way process, don’t be afraid to justify your decisions (an important part of the process is to extract the rationale for others to see)
  • 18. 5. Code Review Pitfalls: • Difficulty finding a peer reviewer • Try to be patient and when your patience runs out, consider campaigning politely on the forums • Reviewers can be critical and sometimes frank • Try not to take it personally, the goal of everyone is to find the best technical solution for each issue • Disagreement with reviewer • Feel free to state your case and if necessary, disregard their advice. But be sure to justify your rationale for final integration
  • 19. 6. Cross-DB Compatibility • Moodle supports PostgreSQL, MySQL, Oracle and MS SQL. Please try to test against another db to your usual environment as a minimum • Pay special attention when writing custom SQL • At this time, transactions cannot be relied upon in core, because we still support myisam • Can be useful for constructing complex queries against different engines: http://sqlfiddle.com/
  • 20. 6. Cross-DB Compatibility Common pitfalls: • Forgetting $DB->sql_compare_text() or $DB->sql_concat() • Using DISTINCT on text columns (not compatible with Oracle) • Adding LIMIT clauses, rather than using the function params • Not including all GROUP BY items in the SELECT field-list (MySQL vs PostgreSQL) • Not using placeholders for user input • Not using the XMLDB editor for creating schema definitions
  • 21. 7. Performance • Don’t decrease performance! • Database queries are by far one of the most expensive things you can do, try not to increase them, ensure that they are constant. • If you improve performance, please record and share your results on the tracker. We love integrating performance improvements! • profile, profile, profile (see Tim Hunt’s recent blogpost: Performance- testing Moodle ) • Make use of the Cache API for adding caching, don’t create your own caches: http://docs.moodle.org/dev/Cache_API
  • 22. 7. Performance Common pitfalls • DB Queries in loops or widely called functions foreach ($courseids as $courseid) { //... do stuff.. foreach ($studentids as $studentid) { $DB->get_record('user', array('id' => $studentid); // Could be called 50,0000 times even on small sites! } } • Loading a large amount of data into RAM • Try to use $DB->get_recordset*() on large datasets • Be mindful with file inclusions
  • 23. 8. Security • You should know and be using, at least: • optional_param()/ required_param() or formslib to validate user input • PARAM_xxx types for cleaning user input • XSRF protection using session keys • s(), p(), format_string() and format_text() for outputting user-inputted text • How to control access using capabilities, the context hierarchy and require_login() etc • Our process for dealing with security bugs is different, in order to achieve responsible disclosure.
  • 24. 8. Security Common pitfalls: • Forgetting session keys • Handled for you by formslib, else you need to do it! • Often missed when simple toggle functions • Incorrect use of PARAM_ types • Study the top of lib/moodlelib.php • Careful with FORMAT_TEXT - it’s name is misleading due to multilang
  • 25. 9. Internationalisation • Moodle 2.5 has over 100 language packs and is a strong multilingual community • Use get_string() for strings, don’t hardcode english! • Consider carefully the time of translators in creation of your strings (tricky tradeoff) • Remember to use userdate() for times, we provide a number of standard time formats as standard. • Not all languages use ‘.’ for floating point numbers! Remember to use format_float() and unformat_float() to recieve and output floating point numbers in the users locale • Consider Right To Left (RTL) languages in CSS/design [.dir-rtl]
  • 26. 9. Internationalisation Common pitfalls: • Concatenating strings, this breaks badly for rtl languages or when its impossible to translate correctly • Using the same string in different contexts • Use AMOS SCRIPT in git commits to do an AMOS CPY to make the translators life easier http://docs.moodle.org/dev/Languages/ AMOS#AMOS_script • Using PARAM_FLOAT for user input
  • 27. 10. Testing • A big focus for Moodle over the last two years • Unit testing with phpunit • Tests written in php and executed in a sandboxed ‘per unit’ environment. • Much more powerful than the old simpletest environment • Test environment is reset between tests • Data generators allow test data to be easily constructed • Extensive range of assertions • Automated acceptance testing, using behat • Tests written in English and executed automatically in a browser environment • Used for UI testing in multiple environments • Manual tests for situations which are not possible to automate • All automated tests are being run and verified on a weekly basis to check for regressions
  • 28. 10. Behat Demo Scenario: Login to course and add forum Given the following "users" exists: | username | firstname | lastname | email | | presenter1 | Presenter | Dan | dan@moodle.com | And the following "courses" exists: | fullname | shortname | | iMoot Course | imoot | And the following "course enrolments" exists: | user | course | role | | presenter1 | imoot | editingteacher | And I log in as "presenter1" And I follow "iMoot Course" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | iMoot Forum | | Forum type | Standard forum for general use | | Description | Test forum description | When I follow "iMoot Course" Then I should see "iMoot Forum"
  • 29. 10. Testing Pitfalls • No tests at all • Consider using TDD for new code (its likely to be helpful for you too!) • We will become stricter about this over time (no excuses) • Adding complex logic into tests and other ‘test smells’ • http://xunitpatterns.com/Test%20Smells.html is recommended reading • Learning curve setting up the tools • Please post on the forums and help us improve our tools!
  • 30. Grab bag.. • Knowledge of git and how to create a git branch is essential. As are good commit messages (see http://docs.moodle.org/dev/ Commit_cheat_sheet ) • Backwards compatibility must be maintained for for core code, ensure that your changes don’t break backwards compatibility • When fixing bugs, we generally need to support the last 3 versions currently in support, as specified in http://docs.moodle.org/dev/ Releases • Don’t be put off from contributing your code if you can’t do all of what I suggest. Moodle HQ can help prepare code for integration (and appreciate any effort you are able to give).