Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Developer meeting April 2015: Difference between revisions

From MoodleDocs
(meeting notes link)
(15 intermediate revisions by 8 users not shown)
Line 7: Line 7:
|-
|-
| Meeting room
| Meeting room
| TODO: link to the Live stream at YouTube
| [http://www.youtube.com/watch?v=g329dAC_oqI Live stream at YouTube]
|-
|-
| Forum discussion
| Forum discussion
| TODO: link to a discussion in GDF at moodle.org
| [https://moodle.org/mod/forum/discuss.php?d=311824 GDF thread]
|-
|-
| Chat
| Chat
Line 19: Line 19:
|-
|-
| Event page
| Event page
| TODO: link to the event Google+ page]
| [https://plus.google.com/events/c003f0fctdrmd3oo9dn6jpbpqu4 Google+ event page]
|-
| Meeting notes
| [https://docs.google.com/document/d/1A18LYhpq_eu2e8nx4qJB2ksLVEbj5qXGLEANGCM1G4I/edit?usp=sharing Google doc]
|}
|}


Line 28: Line 31:
Work in progress - individual items to be confirmed, the exact order is subject of change.
Work in progress - individual items to be confirmed, the exact order is subject of change.


=== Navigation improvements ===
=== Per-request temp directories ===
 
* by Andrew Nicols
* MDL-44874
To better support clustered Moodle environments, we have introduced a new per-request directory helper. This new helper creates a new directory which is automatically cleared away after use and should be used when a file is temporarily needed but does not need to be shared by other nodes in a cluster.


=== First experiences with mustache, the new template framework ===
=== First experiences with mustache, the new template framework ===
Line 34: Line 41:
* by [https://moodle.org/user/profile.php?id=25214 Urs Hunkler] (confirmed)
* by [https://moodle.org/user/profile.php?id=25214 Urs Hunkler] (confirmed)
* See [https://moodle.org/mod/forum/discuss.php?d=311119 the discussion] for more details.
* See [https://moodle.org/mod/forum/discuss.php?d=311119 the discussion] for more details.
To see how to work with the Moodle Mustache implementation I refactored the »clean« theme to a Mustache theme. The process went quite well. I'll try to show the main thoughts and steps in the refactoring process in about 10 minutes. We may have some time to talk about Moodle Mustache afterwards.
You may have a look at the theme »cleanm« in my [https://github.com/uhunkler/moodle/tree/MOODLE_29_mustaches Git repo].
[[User:Urs Hunkler|Urs Hunkler]] ([[User talk:Urs Hunkler|talk]]) 23:32, 13 April 2015 (AWST)


=== Unified AJAX script handler ===
=== Unified AJAX script handler ===
* by [https://moodle.org/user/profile.php?id=1337843 Damyon Wiese]
* MDL-49163
In Moodle 2.9 we have added a new ajax script with the ability to call web service functions directly. There is also a convenient javascript module that is used to call these functions and return a structured response/error.


* MDL-49163
Some reasons why?
* Implementing security for ajax scripts is not straight forward, and the more scripts we have, the more chance for security holes
* All ajax scripts perform essentially the same duplicated logic (read params, check permissions, call something, format a response)
* Encourages the design of consistent and complete external apis which then benefits both web services and Javascript
 
Some cool features of this ajax script / javascript module are:
* Strict type checking of parameters and responses (as defined by the web service)
* Web service functions must be "whitelisted" in order to be available to call from javascript
* Has the ability to chain multiple requests into a single HTTP request


=== Timezones handling ===
=== Timezones handling ===
Line 43: Line 68:
* by [https://moodle.org/user/profile.php?id=12863 Petr Škoda] (confirmed)
* by [https://moodle.org/user/profile.php?id=12863 Petr Škoda] (confirmed)
* MDL-49684
* MDL-49684
Moodle 2.9 is switching to native PHP date and time code. The old homegrown DST switching routines were completely removed. Instead of downloading the timezone.txt file administrators need to keep their PHP timezone up-to-date. There are still some remaining date/time bugs throughout the codebase, but this change makes the fixing much easier because developers may finally use the DateTime class or legacy date functions in PHP.
=== Navigation improvements ===
* by [https://moodle.org/user/profile.php?id=1391647 Adrian Greeve]
* MDL-45774


=== Per-request temp directories ===
A long term project to overhaul the navigation in Moodle has been underway for a long time now. Moodle 2.8 saw a new "user menu" but Moodle 2.9 makes many more changes which improve the user experience by creating consistent navigation and visual cues for all pages relating to "users".
 
More specifically:
* Rename "My home" => "My dashboard" and made it the default home page.
* New/redesigned pages for "My profile", "My preferences", "My grades"
* New user header displayed on pages relating to a user
* New course header / user sub header combination displayed on "Course pages relating to a user"
* Reduce context jumps in/out of a course (for example: Ajax messaging popup)


* by Andrew Nicols
How this affects plugin developers:
* MDL-44874
* New API for my profile page
* New preferences page is built from the nav tree
* Use the proper context for each page (especially user context for user pages)
* Put things in the correct place in the navigation tree


=== Behat tests runs in parallel ===
=== Behat tests runs in parallel ===
Line 53: Line 94:
* by Rajesh Taneja
* by Rajesh Taneja
* MDL-39752
* MDL-39752
As we have over 33000 behat steps in moodle and it's growing rapidly. It takes around 12 hours to execute whole behat suite, which is not expectable for any testing environment. With initial work from Tony and Damyon, we came up with strategy of splitting feature files in different processes and run them in parallel. I will try cover options and demo for running behat in parallel.


== More ==
== More ==


* If you have something you'd like to add to this page, please contact [https://moodle.org/user/profile.php?id=1601 David Mudrák].
* If you have something you'd like to add to this page, please contact [https://moodle.org/user/profile.php?id=1601 David Mudrák].

Revision as of 07:04, 21 April 2015

Developer meetings > April 2015 meeting notes

Time 07:00 UTC on Tuesday, 21 April 2015 Add to my calendar
Meeting room Live stream at YouTube
Forum discussion GDF thread
Chat Regular dev chat
Twitter #moodledev
Event page Google+ event page
Meeting notes Google doc

Agenda

The meeting focuses on changes in the upcoming Moodle 2.9 release with special attention paid to impact of these changes on community contributors and plugin authors.

Work in progress - individual items to be confirmed, the exact order is subject of change.

Per-request temp directories

To better support clustered Moodle environments, we have introduced a new per-request directory helper. This new helper creates a new directory which is automatically cleared away after use and should be used when a file is temporarily needed but does not need to be shared by other nodes in a cluster.

First experiences with mustache, the new template framework

To see how to work with the Moodle Mustache implementation I refactored the »clean« theme to a Mustache theme. The process went quite well. I'll try to show the main thoughts and steps in the refactoring process in about 10 minutes. We may have some time to talk about Moodle Mustache afterwards.

You may have a look at the theme »cleanm« in my Git repo.

Urs Hunkler (talk) 23:32, 13 April 2015 (AWST)

Unified AJAX script handler

In Moodle 2.9 we have added a new ajax script with the ability to call web service functions directly. There is also a convenient javascript module that is used to call these functions and return a structured response/error.

Some reasons why?

  • Implementing security for ajax scripts is not straight forward, and the more scripts we have, the more chance for security holes
  • All ajax scripts perform essentially the same duplicated logic (read params, check permissions, call something, format a response)
  • Encourages the design of consistent and complete external apis which then benefits both web services and Javascript

Some cool features of this ajax script / javascript module are:

  • Strict type checking of parameters and responses (as defined by the web service)
  • Web service functions must be "whitelisted" in order to be available to call from javascript
  • Has the ability to chain multiple requests into a single HTTP request

Timezones handling

Moodle 2.9 is switching to native PHP date and time code. The old homegrown DST switching routines were completely removed. Instead of downloading the timezone.txt file administrators need to keep their PHP timezone up-to-date. There are still some remaining date/time bugs throughout the codebase, but this change makes the fixing much easier because developers may finally use the DateTime class or legacy date functions in PHP.

Navigation improvements

A long term project to overhaul the navigation in Moodle has been underway for a long time now. Moodle 2.8 saw a new "user menu" but Moodle 2.9 makes many more changes which improve the user experience by creating consistent navigation and visual cues for all pages relating to "users".

More specifically:

  • Rename "My home" => "My dashboard" and made it the default home page.
  • New/redesigned pages for "My profile", "My preferences", "My grades"
  • New user header displayed on pages relating to a user
  • New course header / user sub header combination displayed on "Course pages relating to a user"
  • Reduce context jumps in/out of a course (for example: Ajax messaging popup)

How this affects plugin developers:

  • New API for my profile page
  • New preferences page is built from the nav tree
  • Use the proper context for each page (especially user context for user pages)
  • Put things in the correct place in the navigation tree

Behat tests runs in parallel

As we have over 33000 behat steps in moodle and it's growing rapidly. It takes around 12 hours to execute whole behat suite, which is not expectable for any testing environment. With initial work from Tony and Damyon, we came up with strategy of splitting feature files in different processes and run them in parallel. I will try cover options and demo for running behat in parallel.

More

  • If you have something you'd like to add to this page, please contact David Mudrák.