Commit graph

60 commits

Author SHA1 Message Date
Andrew Nicols
59c9577912 MDL-76583 core_external: external_warnings coding style fixes 2023-01-19 07:33:46 +08:00
Andrew Nicols
ca7305f0c6 MDL-76583 core_external: external_description coding style fixes 2023-01-19 07:33:46 +08:00
Andrew Nicols
8bc2011d3d MDL-76583 core_external: external settings coding style fixes 2023-01-19 07:33:46 +08:00
Andrew Nicols
c978cd8cc3 MDL-76583 core_external: core_external\external_api coding style fixes 2023-01-19 07:33:38 +08:00
Andrew Nicols
fa676b4776 MDL-76583 core_external: Implement Privacy API for core_external
AMOS BEGIN
 MOV [privacy:metadata:serviceusers,core_webservice],[privacy:metadata:serviceusers,core_external]
 MOV [privacy:metadata:serviceusers:iprestriction,core_webservice],[privacy:metadata:serviceusers:iprestriction,core_external]
 MOV [privacy:metadata:serviceusers:timecreated,core_webservice],[privacy:metadata:serviceusers:timecreated,core_external]
 MOV [privacy:metadata:serviceusers:userid,core_webservice],[privacy:metadata:serviceusers:userid,core_external]
 MOV [privacy:metadata:serviceusers:validuntil,core_webservice],[privacy:metadata:serviceusers:validuntil,core_external]
 MOV [privacy:metadata:tokens,core_webservice],[privacy:metadata:tokens,core_external]
 MOV [privacy:metadata:tokens:creatorid,core_webservice],[privacy:metadata:tokens:creatorid,core_external]
 MOV [privacy:metadata:tokens:iprestriction,core_webservice],[privacy:metadata:tokens:iprestriction,core_external]
 MOV [privacy:metadata:tokens:lastaccess,core_webservice],[privacy:metadata:tokens:lastaccess,core_external]
 MOV [privacy:metadata:tokens:privatetoken,core_webservice],[privacy:metadata:tokens:privatetoken,core_external]
 MOV [privacy:metadata:tokens:timecreated,core_webservice],[privacy:metadata:tokens:timecreated,core_external]
 MOV [privacy:metadata:tokens:token,core_webservice],[privacy:metadata:tokens:token,core_external]
 MOV [privacy:metadata:tokens:tokentype,core_webservice],[privacy:metadata:tokens:tokentype,core_external]
 MOV [privacy:metadata:tokens:userid,core_webservice],[privacy:metadata:tokens:userid,core_external]
 MOV [privacy:metadata:tokens:validuntil,core_webservice],[privacy:metadata:tokens:validuntil,core_external]
 MOV [privacy:request:notexportedsecurity,core_webservice],[privacy:request:notexportedsecurity,core_external]
AMOS END
2023-01-19 07:33:35 +08:00
Andrew Nicols
0392551bcb MDL-76583 core_external: Migrate service management to util 2023-01-19 07:33:35 +08:00
Andrew Nicols
caddb452f0 MDL-76583 core_external: Migrate string formatting functions to util 2023-01-19 07:33:35 +08:00
Andrew Nicols
7f5fb6a592 MDL-76583 core_external: Migrate token functions class 2023-01-19 07:33:35 +08:00
Andrew Nicols
7d079e82e1 MDL-76583 core_external: Move util test and update 2023-01-19 07:33:35 +08:00
Andrew Nicols
453738e3fd MDL-76583 core_external: Move files test and update 2023-01-19 07:33:35 +08:00
Andrew Nicols
3f8fdc8e33 MDL-76583 core_external: Move settings test and update 2023-01-19 07:33:35 +08:00
Andrew Nicols
ecbb31b160 MDL-76583 core_external: Migrate external_settings class 2023-01-19 07:33:35 +08:00
Andrew Nicols
e460e2e43f MDL-76583 core_external: Migrate external_format_value class 2023-01-19 07:33:35 +08:00
Andrew Nicols
780ba1333b MDL-76583 core_external: Migrate external_warnings class 2023-01-19 07:33:35 +08:00
Andrew Nicols
c42831cec6 MDL-76583 core_external: Migrate external_files class 2023-01-19 07:33:35 +08:00
Andrew Nicols
ebbf342127 MDL-76583 core_external: Migrate external_util class 2023-01-19 07:33:35 +08:00
Andrew Nicols
fff2c7420f MDL-76583 core_external: Migrate restricted_context_exception class 2023-01-19 07:33:35 +08:00
Andrew Nicols
698f06edeb MDL-76583 core_external: Migrate external_function_parameters class 2023-01-19 07:33:35 +08:00
Andrew Nicols
279ae4d5b3 MDL-76583 core_external: Migrate external_multiple_structure class 2023-01-19 07:33:35 +08:00
Andrew Nicols
967bed2954 MDL-76583 core_external: Migrate external_single_structure class 2023-01-19 07:33:34 +08:00
Andrew Nicols
61d59eaa11 MDL-76583 core_external: Migrate external_value class 2023-01-19 07:33:34 +08:00
Andrew Nicols
6f185f1873 MDL-76583 core_external: Migrate external_description class 2023-01-19 07:33:34 +08:00
Andrew Nicols
cdd51a663b MDL-76583 core_external: Move external_api unit tests 2023-01-19 07:33:34 +08:00
Andrew Nicols
56bcaf409f MDL-76583 core_external: Migrate external_api to core_external\external_api 2023-01-19 07:33:18 +08:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Paul Holden
dcc130c7cf MDL-72289 output: allow customised inplace editable icon for editing.
Add optional argument to allow it to be defined by caller, and set
the default icon for `select` type as appropriate.
2021-08-31 11:37:02 +01:00
Dani Palou
25bc7a3d6b MDL-68098 ws: Add unit tests to test mathjax in WS 2020-09-23 11:18:41 +02:00
Dani Palou
8c84eeeeac MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-22 09:43:03 +02:00
Shamim Rezaie
a30bb16ef2 MDL-68200 core: Fix phpdoc for the external return functions 2020-05-12 15:13:01 +10:00
Jun Pataleta
558470e7c1 MDL-68200 core: Support fixday/hour for core_external::get_user_dates() 2020-05-12 10:59:02 +10:00
Shamim Rezaie
4f9bcde969 MDL-68200 core: Add type param to core_get_user_dates external function 2020-05-12 10:59:02 +10:00
Ryan Wyllie
cacc04006f MDL-57259 external: fix page url debug in fragment loading 2017-08-02 03:37:32 +00:00
Damyon Wiese
2fa35b8d16 MDL-59368 groups: Inplace editing for users groups 2017-07-12 10:07:57 +08:00
Ryan Wyllie
9c7ffb80d3 MDL-57975 core: test for user date external function
Part of MDL-55611
2017-03-08 03:33:23 +00:00
Ryan Wyllie
88c2941b26 MDL-57975 core: add get user date external function
Part of MDL-55611
2017-03-08 03:33:23 +00:00
Rajesh Taneja
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
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