writing a new repository plugin

writing a new repository plugin

by Mahmoud Kassaei -
Number of replies: 2
I need to write a repository plugin which can embed a java applet (an audio recording tool, which allows users to “record” and “play back” their recorded audio) so that users can record their voices and save it as a new file or alternatively upload an existing audio file.  As I understand it, it is going to be very similar to repository/upload plugin. However, I was wondering whether it is feasible to write this plugin without any modification in repository/filepicker.php and repository/filepicker.js.

Reading the docs ( http://docs.moodle.org/dev/Repository_API, http://docs.moodle.org/dev/Repository_plugins ), I could not see a way that I can pack all the necessary data for embedding an applet in the pligin’s methods without modifying repository/filepicker.php and repository/filepicker.js.
Average of ratings: -
In reply to Mahmoud Kassaei

Re: writing a new repository plugin

by Dongsheng Cai -

Hello  Mahmoud

 

We are planing to improve filepicker.js to make customizing repository ui possible, I am going to start to work on this very soon.

http://docs.moodle.org/dev/Improved_support_for_external_File_content#Filepicker_Javascript_API_for_customizing

Feel free to send me an email <dongsheng@moodle.com> to tell me your suggestion and requirements.

 

Regards,

Dongsheng Cai <dongsheng@moodle.com>

 

Average of ratings: Useful (1)
In reply to Dongsheng Cai

Re: writing a new repository plugin

by Mahmoud Kassaei -
thanks Dongsheng, I have put together some code for testing the voice recorder (java applet). The voice recorder test is on github (https://github.com/mkassaei/voice_recorder_test) To add this to your moodle install, type: git clone git://github.com/mkassaei/voice_recorder_test.git voice_recorder_test in the top level of your moodle folder, then visit http://path.to.your/moodle/voice_recorder_test/test.php This displays the voice recorder which allows user to record and playback the current recording (The save/submit button with an appropriate form and hidden element is not added here). For my project (an oralresponse question type) which allows teachers to record audio and save it to repository where recorded files associates with the activity (in this case, the current question). Basically, my understanding is that I need to display the applet where user can record and play back audio and then by pressing “Use this recording” button the filepicker would have a filename prepared to be stored (cf. voicerecorderupload.php in my test project) and the action needs to be set to something (similar to upload plugin). We may also want to add a “save as” option to the form.