Commit graph

56823 commits

Author SHA1 Message Date
Marina Glancy
0707372b03 MDL-34290 Added timeout to googledocs request to download a file 2012-08-29 13:12:06 +08:00
Marina Glancy
3dce698981 MDL-34290, MDL-33416 prepare to deprecate fields files.referencelastsync and referencelifetime 2012-08-29 13:12:06 +08:00
Marina Glancy
29ea4e9c56 MDL-34290 Auto synchronise newly created references when possible 2012-08-29 13:12:06 +08:00
Marina Glancy
a7f53f09f3 MDL-34665 Dropbox displays thumbnails and return info about file size and date last modified 2012-08-29 13:12:05 +08:00
Marina Glancy
f8dea58be9 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 13:12:05 +08:00
Marina Glancy
56e41718da 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 13:12:04 +08:00
Marina Glancy
1d168fbd5f MDL-34290 oauthlib_helper support for POST request 2012-08-29 13:12:04 +08:00
Marina Glancy
a6b0ac5362 MDL-34290 Allow to have several requests to the same instance of oauth_helper 2012-08-29 13:12:04 +08:00
Marina Glancy
120300fb99 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 13:12:03 +08:00
Marina Glancy
a5fe04b62b 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 13:12:03 +08:00
Marina Glancy
9001c7242e 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 13:12:03 +08:00
Marina Glancy
22fa5d9a7c MDL-34290 repository_filesystem add original info function and reduce ref lifetime 2012-08-29 13:12:02 +08:00
Marina Glancy
e53394ba0b 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 13:12:02 +08:00
Marina Glancy
56e7d14f26 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 13:12:01 +08:00
Marina Glancy
c9fa5b1c05 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 13:12:01 +08:00
Marina Glancy
3af509d6d4 MDL-34290 class oauth_helper, added API to pass options to curl (such as timeout) 2012-08-29 13:12:01 +08:00
Marina Glancy
26aaa7e835 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 13:12:00 +08:00
Marina Glancy
2e0b5fef48 MDL-34290 curl class: add functions to return error code and to download one file 2012-08-29 13:12:00 +08:00
Eloy Lafuente (stronk7)
f3d5fb4dec Merge branch 'MDL-29598_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2012-08-28 23:23:50 +02:00
David Mudrák
903d13c0c2 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:56:18 +02:00
David Mudrák
b0e5b3b63b 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:52:31 +02:00
Eloy Lafuente (stronk7)
5e143a271c Merge branch 'MDL-34250_23' of github.com:stronk7/moodle into MOODLE_23_STABLE 2012-08-28 20:44:49 +02:00
Eloy Lafuente (stronk7)
ffbe597ef1 MDL-34250 navigation: Always look for correct parent context.
Conflicts:
	lib/navigationlib.php
2012-08-28 20:41:21 +02:00
Eloy Lafuente (stronk7)
56c5e1db1b MDL-25492 bb6 import: bump version after big changes. 2012-08-28 20:15:18 +02:00
Eloy Lafuente (stronk7)
ed29fa1274 Merge branch 'MDL-25492_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2012-08-28 20:08:19 +02:00
Eloy Lafuente (stronk7)
faf4ba4774 Merge branch 'MDL-34192_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2012-08-28 14:44:30 +02:00
Eloy Lafuente (stronk7)
d8e6e58ec5 MDL-34192 mod_assign: prevent ambiguous column use for Oracle.
Credit goes to Raymond Antonio from NetSpot.
2012-08-28 14:18:54 +02:00
Aparup Banerjee
4eb3f12797 Merge branch 'MDL-31837_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-28 17:04:19 +08:00
Aparup Banerjee
6ec3ae6f14 Merge branch 'MDL-32464_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-28 16:54:31 +08:00
Adrian Greeve
339057063c MDL-34318 - blog - Removal of blog associations from the database on delete.
Thanks to Erik Lundberg for this patch.
2012-08-28 15:54:01 +08:00
Eloy Lafuente (stronk7)
b884cf2a74 MDL-35089 conditionals: detected one place missing sectioncache
Thanks to MDL-34936 and unit tests this was discovered like 2 new
places calling to get_fast_modinfo() without the sectioncache
column contents. Potential performance problem, leading to
reseting and recalculation of caches all the time.
2012-08-28 01:41:41 +02:00
Aaron Barnes
f0c1bcf5a2 MDL-30020 blocks/completion: Some criteria do not display complete
Also includes a spruce up of the code
2012-08-28 11:40:37 +12:00
Eloy Lafuente (stronk7)
3860f948af Merge branch 'MDL-34406_fullname_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2012-08-27 20:03:52 +02:00
Eloy Lafuente (stronk7)
9507653269 Merge branch 'MDL-34430_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 18:51:01 +02:00
Eloy Lafuente (stronk7)
79a6a832d7 Merge branch 'MDL-34993_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 18:35:54 +02:00
Eloy Lafuente (stronk7)
eec3a5d48d Merge branch 'm23_MDL-34994' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-08-27 18:20:44 +02:00
Eloy Lafuente (stronk7)
e9c306f10e Merge branch 'MDL-35026_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 17:54:20 +02:00
Eloy Lafuente (stronk7)
b14d76c59f Merge branch 'MDL-35003_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 17:51:24 +02:00
Eloy Lafuente (stronk7)
8f93d94ab2 Merge branch 'MDL-35023_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 16:33:39 +02:00
Eloy Lafuente (stronk7)
b6cd7017c0 Merge branch 'MDL-35038_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 16:25:30 +02:00
Eloy Lafuente (stronk7)
f9033600cc Merge branch 'MDL-35048_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2012-08-27 16:20:37 +02:00
Eloy Lafuente (stronk7)
473285edde Merge branch 'MDL-35055_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2012-08-27 16:16:46 +02:00
Aparup Banerjee
48ee721e2f Merge branch 'MDL-31633-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2012-08-27 17:26:41 +08:00
Rajesh Taneja
acff486664 MDl-34606 Administration: id for clear button is set properly, and disabled on page load 2012-08-27 15:15:29 +08:00
Aparup Banerjee
42122854fc Merge branch 'MDL-34936-MOODLE_23_STABLE-1' of git://github.com/andrewnicols/moodle into MOODLE_23_STABLE 2012-08-27 14:20:30 +08:00
Rajesh Taneja
339c954913 MDL-34537 Enrolments: Assign alternative odd and even class to manual enrol popup 2012-08-27 14:16:06 +08:00
Aparup Banerjee
7c3fa05126 Merge branch 'MDL-34996_23' of git://github.com/grabs/moodle into MOODLE_23_STABLE 2012-08-27 13:46:50 +08:00
AMOS bot
3342bb835c Automatically generated installer lang files 2012-08-27 00:32:46 +00:00
Aaron Barnes
aac67f6384 MDL-32386 completion: Fix incorrect method parameters 2012-08-27 11:19:26 +12:00
Mary Evans
b710f91ed9 MDL-35048 theme_formal_white: removed p {margin:0} from style/formal_white.css which was causing a regression in some areas of theme 2012-08-26 20:49:27 +01:00