Issue Details (XML | Word | Printable)

Key: MDL-15349
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Dongsheng Cai
Reporter: Martin Dougiamas
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-13766

Develop base class /repository/repository.class.php

Created: 23/Jun/08 02:15 PM   Updated: 04/Aug/08 02:46 PM
Return to search
Component/s: Repository API
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. File curl.class.php (6 kB)
2. Text File environment.xml.patch (3 kB)
3. File repository.class.php (6 kB)


Participants: Dongsheng Cai and Martin Dougiamas
Security Level: None
Resolved date: 04/Aug/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dongsheng Cai added a comment - 24/Jun/08 05:03 PM
Created a curl class to simplify the use of curl.

Dongsheng Cai made changes - 24/Jun/08 05:03 PM
Field Original Value New Value
Attachment curl.class.php [ 14321 ]
Martin Dougiamas added a comment - 25/Jun/08 11:59 AM
A curl wrapper is a good idea.

We had an old library at lib/snoopy (it's a bit old but we use it for things already). Looks like it's obsolete, though someone came up with this:

http://blog.adaniels.nl/articles/drop-in-replacement-for-snoopy/

You should have a look at it and see if that would be useful. If not, we should probably migrate all our code to use your new class (or someone's class).

Also look into http://framework.zend.com/manual/en/zend.http.html

Can you also make sure the curl library is listed as a prerequisite for 2.0 on the environment.xml for install/upgrade?


Dongsheng Cai added a comment - 26/Jun/08 01:22 AM
If we already had a curl lib (didn't know we have snoopy already), we should continue to use it, if the plug-in developers need other functionalities, they can include other libs in their plug-ins. I will test the new snoopy, and may do some hack.

Zend_Http is great, I really like the API, it has a Zend_REST and GData libs too, which will can help develop GDocs and the other RESTful plug-ins, but we need to introduce more Zend Framework files to Moodle, is that OK?

I found a Easter eggs: womenslib.php


Dongsheng Cai added a comment - 26/Jun/08 01:32 AM
Mark cURL as required.

Dongsheng Cai made changes - 26/Jun/08 01:32 AM
Attachment environment.xml.patch [ 14348 ]
Dongsheng Cai added a comment - 26/Jun/08 11:55 AM
A draft repository base class, it can play with box.net now, will be modified with the development of the other sub-tasks.

Dongsheng Cai made changes - 26/Jun/08 11:55 AM
Attachment repository.class.php [ 14355 ]
Dongsheng Cai committed 1 file to 'Moodle CVS' - 26/Jun/08 12:45 PM
"MDL-15349, the base repository class"
ADD repository/Attic/repository.class.php   Rev. 1.1    (+0 -0 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 26/Jun/08 03:42 PM
"MDL-15349, add missing fields"
MODIFY repository/Attic/repository.class.php   Rev. 1.2    (+2 -0 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 27/Jun/08 11:33 AM
"MDL-15349, move base class to lib.php, add 2 class members"
MODIFY repository/lib.php   Rev. 1.2    (+184 -64 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 27/Jun/08 02:26 PM
"MDL-15349, fix print_list"
MODIFY repository/lib.php   Rev. 1.4    (+2 -2 lines)
Dongsheng Cai committed 3 files to 'Moodle CVS' - 30/Jun/08 07:12 PM
"MDL-15349, in moodle 2.0, curl lib is required"
MODIFY admin/environment.xml   Rev. 1.33    (+2 -2 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.197    (+1 -0 lines)
MODIFY install/lang/en_utf8/installer.php   Rev. 1.36    (+1 -0 lines)
Dongsheng Cai added a comment - 30/Jun/08 07:13 PM
cURL is a prerequisite in 2.0 now.

Mitsuhiro Yoshida committed 1 file to 'Lang CVS' - 30/Jun/08 07:59 PM
Translated a new string for cURL required message MDL-15349.
MODIFY ja_utf8/admin.php   Rev. 1.268    (+2 -1 lines)
martignoni committed 1 file to 'Lang CVS' - 05/Jul/08 05:26 PM
MDL-15349, cURL required
MODIFY fr_utf8/admin.php   Rev. 1.256    (+2 -1 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 07/Jul/08 02:54 PM
"MDL-15349, create a new function to get all repository plugins"
MODIFY repository/lib.php   Rev. 1.7    (+19 -1 lines)
Dongsheng Cai committed 4 files to 'Moodle CVS' - 08/Jul/08 01:00 PM
MDL-15349, repository_cache class added, which can reduce request time significantly.
MODIFY repository/Attic/curl.class.php   Rev. 1.3    (+13 -2 lines)
MODIFY repository/Attic/ws.php   Rev. 1.2    (+1 -0 lines)
MODIFY repository/flickr/Attic/phpFlickr.php   Rev. 1.4    (+1 -1 lines)
MODIFY repository/boxnet/Attic/boxlibphp5.php   Rev. 1.3    (+1 -1 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 08/Jul/08 01:02 PM
MDL-15349, cache enabled lib.php.
MODIFY repository/lib.php   Rev. 1.8    (+55 -3 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 15/Jul/08 03:14 PM
MDL-15349, add proxy support to curl class.
MODIFY repository/Attic/curl.class.php   Rev. 1.6    (+43 -1 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 16/Jul/08 12:07 PM
MDL-15349, add download function, which can download multi-file in paralle.
MODIFY repository/Attic/curl.class.php   Rev. 1.7    (+79 -32 lines)
Dongsheng Cai committed 1 file to 'Moodle CVS' - 16/Jul/08 12:15 PM
MDL-15349, update comment
MODIFY repository/Attic/curl.class.php   Rev. 1.8    (+2 -2 lines)
Dongsheng Cai committed 2 files to 'Moodle CVS' - 16/Jul/08 01:15 PM
MDL-15349, the implementation of get_file function in repository class.
MODIFY repository/lib.php   Rev. 1.10    (+24 -5 lines)
MODIFY repository/Attic/curl.class.php   Rev. 1.9    (+7 -3 lines)
Dongsheng Cai committed 7 files to 'Moodle CVS' - 17/Jul/08 11:54 AM
MDL-15349
1. Implement downloading files from repositories to temp area, TODO, communicate with FILE API
2. Fix cookie bugs in curl class
3. Fix bugs of boxnet and flickr plugins
MODIFY repository/boxnet/repository.class.php   Rev. 1.9    (+7 -3 lines)
MODIFY repository/Attic/ws.php   Rev. 1.5    (+16 -4 lines)
MODIFY repository/Attic/curl.class.php   Rev. 1.10    (+3 -4 lines)
MODIFY repository/lib.php   Rev. 1.12    (+12 -9 lines)
MODIFY repository/flickr/Attic/phpFlickr.php   Rev. 1.7    (+2 -4 lines)
MODIFY repository/Attic/ajax.php   Rev. 1.6    (+23 -9 lines)
MODIFY repository/flickr/repository.class.php   Rev. 1.6    (+41 -4 lines)
Dongsheng Cai made changes - 04/Aug/08 02:46 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 05/Aug/08 05:16 AM
Added missing curlrequired string. MDL-15349
MODIFY install/stringnames.txt   Rev. 1.3.2.8    (+1 -0 lines)
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' - 05/Aug/08 05:19 AM
Added missing curlrequired string. MDL-15349 ; merged from 19_STABLE
MODIFY install/stringnames.txt   Rev. 1.15    (+1 -0 lines)
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 05/Aug/08 06:42 AM
Backporting latest modifications of environment.xml in HEAD to 19_STABLE. MDL-15349 and sqllite 2.0
MODIFY admin/environment.xml   Rev. 1.24.2.8    (+3 -2 lines)