|
Martin Dougiamas made changes - 16/Oct/08 05:17 PM
[
Permalink
| « Hide
]
Martin Dougiamas added a comment - 16/Oct/08 05:26 PM
Related: http://moodle.org/mod/forum/discuss.php?d=103370
Dongsheng Cai committed 1 file to 'Moodle CVS' - 20/Oct/08 09:40 AM
To return a RAW URLs, you need to rewrite get_file function in repository plug-in
function get_file($url, $title){ return $url; } Then you will get the url of the resource in form or editor.
Dongsheng Cai made changes - 20/Oct/08 09:42 AM
Can you explain how that will work overall?
How does the calling form (eg some module) specify that it requires a URL or a file ref, and after that, how does that determine which repository plugins that you see? (Or how they behave if they can support file ref AND URL?)
Martin Dougiamas made changes - 20/Oct/08 10:45 AM
When you click "select this file" button, file picker will send a download request to repository api, normally, get_file will return the path of the downloaded file, and tell file picker the name and itemid of the file, if get_file return a raw url, itemid will be replaced by raw url (or text format which we talked last week, this will need further work).
Dongsheng Cai committed 1 file to 'Moodle CVS' - 23/Oct/08 12:26 PM
For Youtube, we need a filter that will convert links like this:
<a href="http://au.youtube.com/watch?v=ZdVHZwI8pcA">Youtube video</a> (where the text and domain might change and possible extra parameters might be added) ... to this (very specific XHTML strict code): <object type="application/x-shockwave-flash" data="http://www.youtube.com/v/ZdVHZwI8pcA" width="320" height="267"><param name="movie" value="http://au.youtube.com/v/ZdVHZwI8pcA" /><param name="FlashVars" value="playerMode=embedded" /><param name="wmode" value="transparent" /></object> I've made a working example here: http://test.moodle.org/youtube.html Can you come up with a filter (in fact we could add it to the medialinks filter)? It would help testing...
moodler committed 3 files to 'Moodle CVS' - 25/Nov/08 04:52 PM
moodler committed 1 file to 'Moodle CVS' - 25/Nov/08 04:57 PM
I started looking at it and before I knew it I'd done the filter in HEAD
moodler committed 1 file to 'Moodle CVS' - 25/Nov/08 05:06 PM
Mitsuhiro Yoshida committed 1 file to 'Lang CVS' - 25/Nov/08 05:07 PM
Dongsheng Cai committed 3 files to 'Moodle CVS' - 25/Nov/08 07:44 PM
I have to modify 1 file of tiny_mce, I documented it in lib/editor/tinymce/moodle_readme.txt, the patch is attached there.
You don't need to choose another "youtube" in media dialog(this need to modify more files and more lines), I added a function to identify youtube url, and return html code properly.
Dongsheng Cai committed 2 files to 'Moodle CVS' - 25/Nov/08 09:20 PM
moodler committed 1 file to 'Moodle CVS' - 26/Nov/08 10:47 AM
Dongsheng Cai made changes - 05/Dec/08 10:51 AM
Cool, taking a look now.
Dongsheng Cai committed 1 file to 'Moodle CVS' - 05/Dec/08 02:21 PM
martignoni committed 1 file to 'Lang CVS' - 07/Dec/08 11:32 PM
moodler committed 1 file to 'Moodle CVS' - 24/Dec/08 04:22 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||