Commit graph

56380 commits

Author SHA1 Message Date
Aparup Banerjee
8df0008856 Merge branch 'MDL-34952_master' of git://github.com/grabs/moodle 2012-08-29 13:26:51 +08:00
Aparup Banerjee
a476581f0d Merge branch 'wip-MDL-34075-master' of git://github.com/abgreeve/moodle 2012-08-29 12:38:17 +08:00
Marina Glancy
63d8ccef81 MDL-34290 repository_filesystem: do not store files in moodle filepool unless images 2012-08-29 11:56:19 +08:00
Dan Poltawski
7e3f70bed7 MDL-34290 using moodleform cast to int in dropbox repository settings 2012-08-29 11:56:18 +08:00
Marina Glancy
7bb7bd2e79 MDL-34290 Added timeout to googledocs request to download a file 2012-08-29 11:56:18 +08:00
Marina Glancy
42aa6e15bb MDL-34290, MDL-33416 prepare to deprecate fields files.referencelastsync and referencelifetime 2012-08-29 11:56:18 +08:00
Marina Glancy
437f5dc4cf MDL-34290 Auto synchronise newly created references when possible 2012-08-29 11:56:17 +08:00
Marina Glancy
f4fe646b71 MDL-34665 Dropbox displays thumbnails and return info about file size and date last modified 2012-08-29 11:56:17 +08:00
Marina Glancy
db02d84a40 MDL-34290 remove class cache_file as not used
in fact we have moodle filepool that can work perfectly for caching files, no need to create new class and storage
2012-08-29 11:56:17 +08:00
Marina Glancy
75dd40b265 MDL-34290 repository_dropbox reference handling
- When Dropbox file is inserted by reference, the shared link is created and stored
- Added a function to fix old references (containing access_key/secret) with the proper ones
- Added support for external links in Dropbox (FILE_EXTERNAL), using the shared link API
- Make sure that repository::get_link() receives reference and not source (other repositories than Dropbox have those fields identical)
- Function get_file_by_reference respects request timeouts, downloads only images (for thumbnail generation),
- Function get_file respects request timeout
- do not use cache_file class (content is cached in moodle filepool if needed)
- added parameter for maximum size of files to cache
- added 'Manage' link for Filepicker
- added user name to
- added user name (if different from current) to 'Original' field
- added/corrected phpdocs
2012-08-29 11:56:16 +08:00
Marina Glancy
6ec6842933 MDL-34290 oauthlib_helper support for POST request 2012-08-29 11:56:16 +08:00
Marina Glancy
7e1e775fa4 MDL-34290 Allow to have several requests to the same instance of oauth_helper 2012-08-29 11:56:16 +08:00
Marina Glancy
fa746096cf MDL-34290 repository_equella: do not download files when not needed
repository_equella::get_file_by_reference respects request timeouts, downloads only images (for thumbnail generation),
does not use cache_file class (content is cached in moodle filepool if needed);
also repository_equella has counter of unsuccessfull connect attempts and do not perform any more if 3 failed
(within one request)
2012-08-29 11:56:15 +08:00
Marina Glancy
f24b0f69ee MDL-34290 repository_boxnet, boxlib use request timeouts
boxlib receives additional argument as request timeout
repository_boxnet::get_file_by_reference respects request timeouts and downloads file into moodle only if it is image
also some improvements to repository_boxnet source display functions;
also do not cache result of request in retrieving of listing, user is unable to see the new files he added to box.
2012-08-29 11:56:15 +08:00
Marina Glancy
bc6f241ca2 MDL-34290 repository API: add repository function to import referenced file
it must be independed from sync_external_file because sync often does not actually download contents, it is used just to retrieve
the size of the file. Besides the timeouts for get_file and sync requests are very different.

Also add option to send_stored_file() to ignore reference and send cached contents
2012-08-29 11:56:15 +08:00
Marina Glancy
96221c605a MDL-34290 repository_filesystem add original info function and reduce ref lifetime 2012-08-29 11:56:15 +08:00
Marina Glancy
72a5655566 MDL-34290 repository API: add timeout to get_file and throw exception
- get_file should have a request timeout and throw an exception with the details (i.e. timeout reached) if download can
not be completed
- corrected phpdocs
2012-08-29 11:56:14 +08:00
Marina Glancy
59cb759850 MDL-34290 repository API: do not confuse source and reference
make sure that repository function get_file_source_info receives as argument the source of the file,
and get_file receives a reference;
reference is a value of DB field files_reference.reference and result of get_file_reference(source).
Fix dropbox as the only repository that have different values in those fields;
also added information about user in dropbox reference and original
2012-08-29 11:56:14 +08:00
Marina Glancy
2d222a3243 MDL-34290 repository API: allow get_file_by_reference return only filesize
we want to allow repositories to perform quick synchronisation, without downloading the file. In this case they return
only filesize, without the contenthash
2012-08-29 11:56:07 +08:00
Marina Glancy
8d8a6009e8 MDL-34290 class oauth_helper, added API to pass options to curl (such as timeout) 2012-08-29 11:56:06 +08:00
Marina Glancy
14b7e50001 MDL-34290 update all references after the source is changed
- When several records in {files} have the same record in {files_reference} and the synchronisation is performed, we need to update
all records in {files} so all files know if source is changed and that sync was performed;
- also when local moodle file content is changed we immediately update all files referencing to it (therefore sync of references
to the local files is unnecessary);
2012-08-29 11:56:00 +08:00
Eloy Lafuente (stronk7)
77a7da60db MDL-31973 Groups: Bump version after changing versions in prev merge with conflicts. 2012-08-29 00:48:10 +02:00
Eloy Lafuente (stronk7)
238f7761af Merge branch 'MDL-31973-master-6' of git://git.luns.net.uk/moodle
Conflicts:
	lib/db/upgrade.php
2012-08-29 00:42:43 +02:00
Eloy Lafuente (stronk7)
71ff7c2c04 Merge branch 'MDL-29598_master' of git://github.com/dmonllao/moodle 2012-08-28 23:23:26 +02:00
David Mudrák
7092ea5da5 MDL-35109 Fix available_update_checker::cron_has_fresh_fetch()
For the purpose of cron based fetching, recently fetched data are valid
for 24 hours.
2012-08-28 22:59:33 +02:00
David Mudrák
720f7c12e8 MDL-35109 Improve unittests for cron based fetching of available updates
The expected behaviour is as follows:

* If the recently fetched data is older than 48 hours, it is considered
  as outdated and the new fetch is executed
* else, if the recently fetched data is younger than 24 hours, it is
  considered as fresh enough and no fetch is executed
* else, if the current time is after 01:00 AM plus a certain offset
  (which is randomly generated for each site), the fetch is
  executed.
2012-08-28 22:59:26 +02:00
Eloy Lafuente (stronk7)
af1e3f2828 Merge branch 'w35_MDL-35070_m24_selfcleanup' of git://github.com/skodak/moodle
Conflicts:
	enrol/self/editenrolment.php
2012-08-28 21:05:26 +02:00
Eloy Lafuente (stronk7)
5298faed69 Merge branch 'w35_MDL-23875_m24_selfcohort' of git://github.com/skodak/moodle 2012-08-28 20:51:37 +02:00
Eloy Lafuente (stronk7)
928dfdee48 Merge branch 'MDL-34250' of github.com:stronk7/moodle 2012-08-28 20:44:09 +02:00
Eloy Lafuente (stronk7)
111938abd9 MDL-34250 navigation: Always look for correct parent context. 2012-08-28 20:37:46 +02:00
Eloy Lafuente (stronk7)
2ab9b983be MDL-25492 bb6 import: bump version after big changes. 2012-08-28 20:16:54 +02:00
Eloy Lafuente (stronk7)
14941785d7 Merge branch 'MDL-25492' of git://github.com/jmvedrine/moodle 2012-08-28 20:02:02 +02:00
Petr Škoda
71c3b0479a MDL-34955 fix use of uninitialised disabledsubplugins setting
Thanks Eloy Lafuente for spotting it!
2012-08-28 18:57:19 +02:00
Petr Škoda
5d605db1dc MDL-35064 improve enrol test comments
Thanks Aparup Banerjee for the feedback.
2012-08-28 15:28:17 +02:00
Petr Škoda
45fd6edfa4 MDL-35064 improve enrol plugin uninstall confirmation
Credit goes to Helen Foster, thanks!
2012-08-28 15:26:23 +02:00
Eloy Lafuente (stronk7)
d970005273 Merge branch 'MDL-34192' of git://github.com/stronk7/moodle 2012-08-28 14:44:06 +02:00
Eloy Lafuente (stronk7)
dbd0529ae5 MDL-34192 mod_assign: prevent ambiguous column use for Oracle.
Credit goes to Raymond Antonio from NetSpot.
2012-08-28 14:16:15 +02:00
Aparup Banerjee
23d82edc91 Merge branch 'MDL-31837' of git://github.com/timhunt/moodle 2012-08-28 17:03:55 +08:00
Aparup Banerjee
a4290d5803 Merge branch 'MDL-32464' of git://github.com/timhunt/moodle 2012-08-28 16:53:41 +08:00
Petr Škoda
ddcea181af MDL-34955 fix sloppy class typo and add MUC TODO info
Credit goes to Aparup Banerjee, thanks.
2012-08-28 16:17:43 +08:00
Adrian Greeve
ac31c38eed MDL-34318 - blog - Removal of blog associations from the database on delete.
Thanks to Erik Lundberg for this patch.
2012-08-28 15:57:28 +08:00
Aparup Banerjee
55fa9f1fa0 Merge branch 'w35_MDL-34990_m24_tinymcebuttonsfix' of git://github.com/skodak/moodle 2012-08-28 15:43:19 +08:00
Aparup Banerjee
4655497005 Merge branch 'w35_MDL-34879_m24_tinymcedocs' of git://github.com/skodak/moodle 2012-08-28 15:39:42 +08:00
Aparup Banerjee
1dd73f963c Merge branch 'w35_MDL-34955_m24_tinycefinal' of git://github.com/skodak/moodle 2012-08-28 15:10:35 +08:00
Aparup Banerjee
edcdd37525 Merge branch 'w35_MDL-34878_m24_tinymcebuttons' of git://github.com/skodak/moodle 2012-08-28 15:00:26 +08:00
Andrew Davis
f361678362 MDL-26504 blog: added upgrade code to remove orphan external blog posts 2012-08-28 14:55:33 +08:00
Petr Škoda
af29ef049e MDL-23875 improve cohort only help
Credit goes to Helen Foster.
2012-08-28 08:32:23 +02:00
Aparup Banerjee
0c4ee46d77 Merge branch 'w35_MDL-34877_m24_tinymcesettings' of git://github.com/skodak/moodle 2012-08-28 13:56:15 +08:00
Aparup Banerjee
2cdd5d8571 MDL-34549 added IGNORE_MISSING to context call for bc 2012-08-28 12:29:17 +08:00
Aparup Banerjee
9455f48280 Merge branch 'MDL-34549-master' of git://github.com/ankitagarwal/moodle 2012-08-28 11:45:11 +08:00