463 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
0071665686 Merge branch 'wip-MDL-59808-master' of git://github.com/marinaglancy/moodle 2017-09-12 00:13:28 +02:00
Marina Glancy
9971fac803 MDL-59808 webservice_rest: comply with restformat argument 2017-09-07 08:34:10 +08:00
Marina Glancy
e25ccd58c1 MDL-59992 webservice: fix debugging message event context already set 2017-08-31 12:13:15 +08:00
David Mudrák
8bfd82b2f5 MDL-57775 xmlrpc: Formal fix of coding style and phpdocs
- There was missing MOODLE_INTERNAL check.
- The client is not used for unit tests only so the class description
  was obsolete.
2017-08-15 21:43:35 +02:00
David Mudrák
b4da577385 MDL-57775 xmlrpc: Test webservice_xmlrpc_client request encoding
The patch wraps the underlying xmlrpc_encode_request() call into a
standalone method that can be then unit-tested.
2017-08-15 21:43:35 +02:00
David Mudrák
2b604286b5 MDL-57775 xmlrpc: Pass escaping to xmlrpc_encode_request() calls
This patch adds the missing 'escaping' option to all remaining
xmlrpc_encode_request() calls in the moodle core code.

Without this, the xmlrpc_decode_request() call on the server side may
lead to wrongly decoded non-ascii characters.
2017-08-15 21:43:34 +02:00
John Okely
72e688d7ff MDL-28574 webservices: Explain tokens you can edit but can't see 2017-07-31 15:35:23 +08:00
John Okely
fc7a345c35 MDL-28574 webservices: Use table_sql on manage tokens page
For pagination and sorting an partial loading.
2017-07-31 09:55:04 +08:00
John Okely
ad2ae6e3db MDL-28574 webservices: Add new capability for managing all tokens 2017-07-31 09:55:04 +08:00
Jan Dageförde
0c62ca2563 MDL-28574 webservice: Allow admins to manage tokens created by others.
Until now, admins could only modify (or even see) tokens they have
created themselves. Tokens created by other users or even other admins
were invisible unless you were looking into the database. In case there
are former admins, their successors can be unable to inspect or delete
existing tokens.
2017-07-31 09:54:33 +08:00
Juan Leyva
bef5777fc4 MDL-59214 webservice: Return calendar type in get_site_info 2017-06-20 11:44:04 +01:00
David Monllao
a5ea94d85f Merge branch 'MDL-58843-master-exchandler' of git://github.com/mudrd8mz/moodle 2017-05-10 14:05:51 +08:00
David Mudrák
8a9785a036 MDL-58843 core: Do not expect a particular class of the thrown exception
Since PHP 7, the custom exception handlers are also called to handle
thrown Errors which are not Exceptions.
2017-05-09 08:41:41 +02:00
Eloy Lafuente (stronk7)
d989ee1e03 MDL-58853 versions: bump all versions and requires near release
version = 2017051500 release version
requires= 2017050500 current rc1 version
2017-05-09 02:58:28 +02:00
Juan Leyva
a4727b81f6 MDL-58741 webservice: Add missing params to webservice/pluginfile.php
MDL-58334 and MDL-32471 introduced new parameters in pluginfile.php but
they are missing from webservice/pluginfile.php

We need the offline one in the Mobile app (this new parameter was
designed thinking in the mobile app)
2017-04-27 17:04:01 +02:00
Ilya Tregubov
1138af352a MDL-57768 webservice: Delete manual setting of config in test 2017-02-10 11:49:09 +11:00
Eloy Lafuente (stronk7)
04649747a4 MDL-57197 versions: bump all versions and requires near release
version = 2016120500 release version
requires= 2016112900 current rc4 version
2016-11-29 22:57:05 +01:00
Andrew Nicols
43bdbbf682 Merge branch 'MDL-56607-master' of git://github.com/jleyva/moodle 2016-11-09 09:39:48 +08:00
Eloy Lafuente (stronk7)
42fe364f41 Merge branch 'MDL-56765-master' of git://github.com/jleyva/moodle 2016-11-08 01:27:39 +01:00
Juan Leyva
0c6c86643e MDL-56607 settings: Move mobile settings to top-level
AMOS BEGIN
 MOV [mobilecssurl,core_admin],[mobilecssurl,tool_mobile]
 MOV [configmobilecssurl,core_admin],[configmobilecssurl,tool_mobile]
AMOS END

From Plugins / Web Services / Mobile to Appearance / Mobile
2016-11-07 09:53:29 +00:00
Juan Leyva
1f2e3279b2 MDL-56765 webservice: On new session is started unset old preferences 2016-11-04 19:33:31 +00:00
Ankit Agarwal
9d72acb7ed MDL-56634 webservices: Remove script from api desc and clean desc printing 2016-11-02 10:06:05 +05:30
Juan Leyva
69cbe35943 MDL-45639 webservice: Support private tokens
Private tokens are generated at the same time that the token.
They must be stored safely by the ws client, and they must be transmitted only via  https.
2016-10-14 12:32:30 +01:00
David Monllao
886207f70e Merge branch 'MDL-55923-master' of git://github.com/jleyva/moodle 2016-10-10 22:57:34 +08:00
Juan Leyva
9d382a948e MDL-55923 webservice: Allow user to sign-out systems on pwd change 2016-10-05 20:34:06 +01:00
Eloy Lafuente (stronk7)
ed66d725e6 Merge branch 'MDL-56160-master' of git://github.com/dpalou/moodle 2016-10-04 00:39:06 +02:00
Dani Palou
43695b6a72 MDL-56160 ws: Return site course ID in get_site_info 2016-09-28 12:26:32 +02:00
Dan Poltawski
6027b0de05 Merge branch 'MDL-54793-master' of git://github.com/cameron1729/moodle 2016-09-27 11:13:35 +01:00
Matt Davidson
59c66f926f MDL-55791 admin: maintenance mode access capability
Add capability to allow certain non-admin users through maintenance
mode.
2016-09-12 10:37:25 -04:00
Juan Leyva
753504fbe0 MDL-49026 webservice: Remove tokens on password change 2016-09-07 09:07:29 +08:00
Cameron Ball
b8d0f90ec7
MDL-54793 webservice_xmlrpc: Don't treat GET and POST as arguments 2016-09-01 15:15:10 +08: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
Eloy Lafuente (stronk7)
af8b948e2b Merge branch 'MDL-54629-master' of git://github.com/jleyva/moodle 2016-07-12 21:01:02 +02:00
Andrew Nicols
71f81adce9 Merge branch 'MDL-54869-master' of git://github.com/jleyva/moodle 2016-07-07 10:30:17 +08:00
Eloy Lafuente (stronk7)
4b7ac6023c Merge branch 'MDL-54867-master' of git://github.com/jleyva/moodle 2016-07-05 20:25:54 +02:00
Juan Leyva
460897052e MDL-54869 files: Create new required functions
This was a complex change requiring three new functions:
file_merge_files_from_draft_area_into_filearea - To just add files from a draft area into a real one (just adding or updating, not deleting)
file_merge_draft_area_into_draft_area - To merge files from two draft areas, used by the latest for creating a draft area with all the original files plus the new ones.
file_overwrite_existing_draftfile - Required to update existing files not losing metadata or references.

The whole process is the following:

    User uploads a file (upload.php)
    Client gets a new draftid A containing the file only (return of upload.php)
    Client requests to merge that draftid in the user's private files (core_user_add_user_private_files)
    Server prepares a new UNUSED draftid B from existing area
    Server merges A into B
    Server saves the draft B into the final area
2016-07-05 09:01:34 +01:00
Andrew Nicols
ab698201d7 Merge branch 'MDL-55049-master' of git://github.com/jleyva/moodle 2016-07-04 14:16:54 +08:00
Juan Leyva
ff092320a7 MDL-54867 webservice: Document webservice/upload.php deprecation
The 'private' file area is not supported anymore, only 'draft' is
supported right now.
2016-07-01 13:13:54 +01:00
Dan Poltawski
77369c8171 Merge branch 'MDL-54868-master' of git://github.com/cameron1729/moodle 2016-06-29 15:05:26 +08:00
Andrew Nicols
628c52e465 Merge branch 'MDL-54601-master' of git://github.com/jleyva/moodle 2016-06-29 15:05:22 +08:00
Juan Leyva
7a8744dba7 MDL-55049 webservice: Scan for viruses in webservice/upload.php 2016-06-28 16:14:16 +01:00
Cameron Ball
94ada0eaf7
MDL-54868 webservice_xmlrpc: Don't escape non-ascii characters 2016-06-28 14:41:20 +08:00
Eloy Lafuente (stronk7)
22a0896767 Merge branch 'MDL-55028-master' of git://github.com/junpataleta/moodle 2016-06-27 22:13:48 +02:00
Jun Pataleta
ead440b649 MDL-55028 webservice_soap: Use strlen for setting Content-Length header 2016-06-27 13:59:20 +08:00
Frederic Massart
4f9b94fdd5
Revert "MDL-44626 files: Show the PHP max upload size instead of 'unlimited'"
This reverts commit 6f0768618a38c11eca90a97c0dff31ec8ce434d1.
2016-06-23 11:51:44 +08:00
Juan Leyva
833be5e410 MDL-54629 webservice: Change required parameters in external_format_text
component, filearea and itemid are now optional parameters.
In some contexts those parameteres are not necessary because is not
required to do a file rewrite via file_rewrite_pluginfile_urls
2016-06-21 12:16:25 +01:00
Juan Leyva
89823b1ae3 MDL-54601 webservice: Order services function list by name 2016-06-15 15:40:55 +01:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
David Monllao
287074207f Merge branch 'MDL-46934-master' of git://github.com/FMCorz/moodle 2016-05-23 14:38:01 +08:00
Frederic Massart
4700c44c01 MDL-46934 webservice_rest: Fixed undefined index on XML output 2016-05-20 17:03:23 +08:00