24 Commits

Author SHA1 Message Date
Andrew Nicols
383819375d Merge branch 'MDL-53779-master' of git://github.com/FMCorz/moodle 2016-04-19 10:32:56 +08:00
Damyon Wiese
e02e7f5a01 MDL-53772 libraries: More context fixes
1. Improve upgrade note
2. Don't abuse $PAGE to get the current course/cm
3. Use validate_context, never $PAGE->set_context()
4. Reset current coursemodule in validate_context().
5. Respect moodlepageclass when calling an external function.
2016-04-14 15:02:41 +08:00
Marina Glancy
787ec240c1 MDL-53772 inplace_editable: set context in callbacks 2016-04-14 13:58:29 +08:00
Frederic Massart
bf6239eddb MDL-53779 external: get_string and get_strings use PARAM_RAW
For the string parameters and translated strings.
2016-04-12 17:04:19 +08:00
Damyon Wiese
1fca8a7bdd MDL-53056 javascript: Improve the fragments API
Instead of injecting the HTML + JS directly - return a promise that is resolve with
the HTML and JS. This gives the caller control over how and when to inject the nodes
in the DOM. Also modify templates.replaceNode functions to cleanup YUI events mess.
Also pass the context to the callback so it can be verified.
Also pass the arguments to the callback as a named array - not a flat argument list.
Also - only load external scripts if they are not already loaded.
2016-03-30 11:48:38 +08:00
Eloy Lafuente (stronk7)
d9dfc410ad Merge branch 'wip-MDL-53172-master' of https://github.com/marinaglancy/moodle 2016-03-01 01:59:31 +01:00
Andrew Nicols
0346323cec MDL-30811 output: Add support for session notifications 2016-02-29 09:05:56 +08:00
Andrew Nicols
38cf8b6661 MDL-53172 javascript: Stop requiring body manipulation on load 2016-02-27 11:29:27 +08:00
Marina Glancy
8de48ad0ae MDL-53172 core: toggle and select in inplace_editable 2016-02-27 11:29:24 +08:00
Marina Glancy
cdc5f9785b MDL-51802 core: new template for quick editing a title
convert editing tag name to use new template
2016-02-13 11:07:42 +08:00
Adrian Greeve
a2161d57a4 MDL-52715 lib: Clean up of comments and variable names. 2016-02-03 10:07:08 +08:00
David Monllao
0b39d21ae7 MDL-52715 ws: Fragments WS using fragment requires properly. 2016-02-01 14:29:09 +08:00
Adrian Greeve
cc73ea075e MDL-52715 lib: Addition of new requirements class.
This adds a fragment requirements class to allow plugins
to register JavaScript to be used in an mform.
2016-02-01 14:29:09 +08:00
Damyon Wiese
ba224fb42c MDL-50783 Ajax: Configure how to call a webservice through db/service.php
Now the db/service.php array can contain these extra keys to provide information
on how a webservice may be called:

    'ajax' => true (Default is false)

Replaces the xx_is_allowed_from_ajax callback.

    'loginrequired' => false (Default is true)

Means that this webservice can be called through lib/ajax/service-nosession.php
which sets NO_MOODLE_COOKIES to true (faster). This is only safe for webservices returning
static public data (e.g. get_string).
2015-09-14 15:10:21 +08:00
Damyon Wiese
72f8324ec5 MDL-49163 Webservices, AJAX: Add support for a new ajax webservice handler.
This is a new script that can call any function in the built-in AJAX webservice. This is
a new system service that is added at install time (like the mobile webservice). It has no
protocols added to it, but it accessible by a new ajax script /lib/ajax/service.php.

Requests and responses to the script are required to be in json format, and multiple functions can
be called in a single request.
2015-03-12 15:07:08 +08:00
Damyon Wiese
bef63c520c MDL-49240 webservices: core_get_string and friends bad lang handling
The core_get_string webservice and friends have never passed lang values
properly, (so never worked) and when I fixed that I found they were passing
lang parameter into the lazyload parameter.
2015-02-24 15:32:17 +08:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Petr Škoda
5d071be68e MDL-41022 cleanup core_external_testcase 2013-08-24 16:18:18 +02:00
Petr Škoda
8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Eloy Lafuente (stronk7)
493d8f781c Merge branch 'MDL-37354-master' of git://github.com/mouneyrac/moodle
Conflicts:
	message/tests/externallib_test.php
2013-01-15 21:50:31 +01:00
Jerome Mouneyrac
fb695f6e3d MDL-37354 clean return value for each externallib PHPUnit tests 2013-01-09 13:47:01 +08:00
Jerome Mouneyrac
c5f7628d39 MDL-37381 core_external::get_component_strings returns wrong format value 2013-01-08 16:23:24 +08:00
Sam Hemelryk
fd6ab92b1d Merge branch 'MDL-35997-wip1' of git://github.com/mouneyrac/moodle
Conflicts:
	version.php
2012-11-28 10:57:09 +13:00
Jerome Mouneyrac
11e766020b MDL-35997 Create web service functions to return lang strings 2012-10-31 14:21:56 +08:00