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
Simey Lameze
1ba1412fa3
MDL-59008 repository_onedrive: add method to serve login on a popup
2017-07-03 13:41:58 +08: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
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
Jun Pataleta
089810fb06
MDL-58538 repository_onedrive: Use image_url() instead of pix_url()
2017-04-19 12:29:22 +08:00
Damyon Wiese
aa89bf2e6c
MDL-58220 repo: Dont expect file info for any file
...
Some plugins do not implement the file info callback so expect and handle null in this case.
2017-04-03 13:43:27 +08:00
Damyon Wiese
e7688f559a
MDL-58220 onedrive: Add import from skydrive
...
If the skydrive repo exists - show a button on the config page for the onedrive repo to "steal" all the files
from the other repo and disable it.
2017-04-03 13:43:27 +08:00
Damyon Wiese
e518ea7949
MDL-58220 repository_onedrive: rename from skydrive
...
Update all references from skydrive to onedrive in the code / lang strings.
2017-04-03 13:43:27 +08:00
Damyon Wiese
0931acf96b
MDL-58220 repository: Move skydrive -> onedrive
2017-04-03 13:43:27 +08:00