1641 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
053186ba0e NOBUG: Fixed SVG browser compatibility 2018-03-08 13:29:01 +01:00
Luca Bösch
49ccb165cc MDL-61497 repository_onedrive: Use post 2015 icon 2018-03-01 08:59:15 +01:00
David Mudrák
051857fcb9 MDL-61242 repository_equella: Fix missing class repository
The call to the class 'repository' introduced in the commit d05c2ac7cc78
didn't fully work and threw: "Exception - Class 'repository' not found".
This fixes the missing library inclusion.
2018-02-01 10:33:21 +08:00
Adrian Greeve
d05c2ac7cc MDL-61242 repository_equella: Add source key when sending the source.
A thank you to Nelson Cheng for find this issue and suggesting a patch.
2018-01-20 10:56:18 +08:00
Adrian Greeve
f1d1a60e0a MDL-61131 repositories: Added a key to verify incoming urls. 2018-01-09 11:34:37 +01:00
Juan Leyva
b857590479 MDL-61098 repository: Retrieve correct context for repo instance
The repository instance was being retrieved without specifying a valid
context that is required in further API checks.
2017-12-21 11:33:11 +01:00
Andrew Nicols
e3b699eab7 Merge branch 'MDL-59159' of git://github.com/stronk7/moodle 2017-12-06 19:53:36 +13:00
Andrew Nicols
ebe2fafa8b Merge branch 'wip-MDL-37757-master' of git://github.com/abgreeve/moodle 2017-12-06 19:53:29 +13:00
Eloy Lafuente (stronk7)
e4eba4c346 MDL-59159 upgrade: clean < 3.1.0 upgrade steps
LTS (3.5) requires previous LTS (3.1)

This just deletes all the upgrade steps previous to 3.1.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2016052300 (v3.1.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2017-12-04 01:18:57 +01:00
Adrian Greeve
33e385a5fb MDL-37757 repositories: Deleting a repository deletes files.
If the user decides to remove a repository all of the linked
files are now deleted along with file references. This was causing
problems such as the course page displaying an error with no recourse
to fix the problem.
2017-11-16 14:46:40 +08:00
Eloy Lafuente (stronk7)
6499085f36 MDL-60784 upgrade: add 3.4.0 separation line to all upgrade scripts 2017-11-12 18:43:30 +01:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
John Okely
7eb50b3290 MDL-42834 admin: Remove wwwroot if used with moodle_url 2017-10-23 12:25:36 +08:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
Andrew Nicols
bc01fbbd81 MDL-59883 behat: Update close button link 2017-10-02 13:05:16 +08:00
Eloy Lafuente (stronk7)
536572cf0b Merge branch 'MDL-59645-master-flickr' of git://github.com/mudrd8mz/moodle 2017-09-26 19:29:40 +02:00
David Mudrák
e0a903243b MDL-59505 oauth2: Fix storage of access controlled links
When files are copied into the system account's drive, they are put into
folders respecting the structure of contexts. Folder names were based on
context names only and so were likely to collide (such as with users
with the same name).

The patch ads context instance identifiers to the name so that they can
be identified more reliably.
2017-09-21 22:17:03 +02:00
David Mudrák
34db9e9342 MDL-59645 repository_flickr: Drop legacy auth tokens and nsids
The values stored in these user preferences were valid for the old
flickr auth mechanism and are not usable any more. The new oauth1 based
version needs to store both the token (in the flickr_access_token
preference) and the token secret (flickr_access_token_secret). The new
version does not need to store the user's nsid.

The cryptic names of these legacy settings are a result of how dealing
with user preferences was originally implemented.
2017-09-19 14:44:41 +02:00
David Mudrák
d841bbe90d MDL-59645 repository_flickr: Make the Flickr repository work again
The patch makes the Flickr repository use the new oauth1 based client.
Beside that, other improvements include:

* Does not attempt to guess the photo URL any more. Instead uses
  url_sq and url_o extras of the flickr.photos.search call.
* The photos.search does not return the information about the photo size
  so we set it to null (previously was returned as 'unknown' which made
  it be displayed as zero).
* Does not perform additional API request to obtain the manage URL, uses
  https://www.flickr.com/photos/organize instead.
2017-09-19 14:44:41 +02:00
Jun Pataleta
4dfc2d19e7 Merge branch 'wip-MDL-35668-master' of git://github.com/marinaglancy/moodle 2017-09-11 11:01:41 +08:00
Marina Glancy
ed483bda8d MDL-35668 filebrowser: system context is similar to coursecat 2017-08-31 13:56:59 +08:00
Jake Dallimore
7a170fad85 MDL-35290 files: File manager reports files which can't be read 2017-08-29 11:15:30 +08:00
Cameron Ball
03756f0bdb
MDL-59700 filestorage: Rework repositories to avoid add_file_to_pool
For historical reasons repositories need to call add_file_to_pool
to sync file records. However now that a before_file_created hook
has been added additional information is needed by add_file_to_pool.

Ideally add_file_to_pool and friends will become private/protected,
so we need to remove all uses of it in core.

This patch adds some new methods to the file class to allow syncing
to be managed internally by the file and the file_storage class.
2017-08-07 15:50:15 +08:00
Eloy Lafuente (stronk7)
29af7b0b4c MDL-57432 upgrade: clean < 3.0.0 upgrade steps
This just deletes all the upgrade steps previous to 3.0.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2015111600 (v3.0.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2017-07-10 09:16:55 +01:00
Simey Lameze
64c385a293 MDL-59008 repository: add reload parent window support to callback 2017-07-03 13:41:58 +08:00
Simey Lameze
1ba1412fa3 MDL-59008 repository_onedrive: add method to serve login on a popup 2017-07-03 13:41:58 +08:00
Simey Lameze
fd8790d5cf MDL-59008 repository_googledocs: add method to serve login on a popup
This commit also add a new string logintoaccount to make the login
button more clear.
2017-07-03 13:41:58 +08:00
Eloy Lafuente (stronk7)
5e27228335 MDL-58933 upgrade: add 3.3.0 separation line to all upgrade scripts 2017-05-19 19:22:07 +02:00
Helen Foster
0d86195e8d MDL-58877 lang: Merge English strings from the en_fix language pack
Significant string changes:

* loginerror_cannotcreateaccounts in auth_oauth2 - more understandable
  error message
* config_keep_groups_and_groupings and config_keep_roles_and_enrolments
  in core_backup - switch fix
2017-05-10 12:24:36 +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
Dan Poltawski
e18cd34bbb Merge branch 'MDL-58765-master' of git://github.com/damyon/moodle 2017-05-08 10:31:59 +01:00
Damyon Wiese
6a7552fe70 MDL-58765 repository: controlled links fix
If a file is selected as a controlled link, only copy it to the system account the first time
the form is saved.
2017-05-08 10:53:58 +08:00
Andrew Nicols
7167d25f5f Merge branch 'MDL-58823-master' of git://github.com/jleyva/moodle 2017-05-08 09:32:58 +08:00
Damyon Wiese
eeaee38a75 MDL-58535 onedrive: Try the upload twice
For work accounts we need to specify the auth headers, for personal accounts we cannot specify the auth headers.
We don't know which is which so we have to try both cases.
2017-05-05 16:44:52 +08:00
Juan Leyva
fcdd7730bd MDL-58823 repository: Fix redirections to external files
We cannot use redirect() because is not compatible with
webservice/pluginfile.php
This script is defined as an AJAX_SCRIPT so redirections are not
allowed by redirect() function.
2017-05-05 10:04:51 +02:00
Dan Poltawski
bf39e7c7aa Merge branch 'MDL-58800-master' of git://github.com/damyon/moodle 2017-05-04 10:00:37 +01:00
Jun Pataleta
1e324a4a88 Merge branch 'MDL-58749-master-enfix' of git://github.com/mudrd8mz/moodle 2017-05-04 14:45:08 +08:00
Damyon Wiese
00879eca66 MDL-58800 repository_googledocs: Switch oauth clients
We need to ensure we use the correct oauth client to download files. This change
is the same as the one made to the onedrive repository where a usesystem flag
is added to the file reference if the file has been copied to the system account.
2017-05-04 12:57:23 +08:00
Helen Foster
06d0aa4432 MDL-58749 lang: Merge English strings from the en_fix language pack
Significant string changes:

* errorinvalidbyhour,core_calendar - correcting number from 59 to 23
* cron_help,core_admin - updated recommendation to run cron every minute
* tour1_content_end, tour1_content_welcome, tour2_content_end,
  tour2_content_welcome all in tool_usertours - removing reference to
  3.2
* invalidsesskey,core_error and invalidsesskey,mod_wiki - more
  understandable error message
* pluginname_help and pluginnamesummary in qtype_essay - explaining that
  the question type can be used for file uploads
* formatnoinline, mustattach and mustrequire in qtype_essay - changing
  the word 'inline' to 'online'
2017-05-03 22:05:51 +02:00
Damyon Wiese
f942de3c8a MDL-58535 repository_onedrive: Use correct user
If the file was copied to a system account, we need to use the system oauth when accessing it.
2017-05-02 11:45:57 +08:00
Damyon Wiese
13d21db324 MDL-58535 repository_onedrive: Use the weblink
The permission has it's own weblink which is different from the link on the original doc.
2017-05-01 16:15:36 +08:00
Damyon Wiese
c0a4efdce2 MDL-58535 repository_onedrive: Better error
When OneDrive has never been initialised the Graph API returns an error. Detect this and
direct the user to log in to OneDrive.
2017-05-01 16:15:36 +08:00
Damyon Wiese
8381b05d49 MDL-58535 repository_onedrive: Integration review fixes
Fixes for some missing imports and unused variables.
2017-05-01 16:15:36 +08:00
Damyon Wiese
68c6fd20a7 MDL-58535 onedrive: Fix upload to system account
This was failing for personal accounts (but was fine for business).
2017-05-01 16:15:35 +08:00
Damyon Wiese
536ed579b9 MDL-58535 repository_onedrive: Controlled link fixes
It is impossible to reliable copy a file between users without downloading and uploading the file.

This sucks but it's true...
2017-05-01 16:15:35 +08:00
Jan Dageförde
c7de40a8ed
MDL-58372 repository_webdav: Explicitly pass some filename
Not passing anything triggers PHP 7.1 "Too few arguments" exception.
2017-04-26 11:28:41 +02:00
Jun Pataleta
089810fb06 MDL-58538 repository_onedrive: Use image_url() instead of pix_url() 2017-04-19 12:29:22 +08:00
Jake Dallimore
84fb93a77e Merge branch 'MDL-58297-master' of git://github.com/andrewnicols/moodle 2017-04-11 10:49:07 +08:00
Andrew Nicols
e6a4780452 MDL-58297 core: Update to use new hashing functions 2017-04-07 10:40:23 +08:00
Dan Poltawski
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00