MoodleSpeex Install HOWTO
This is a modification of Dan Stowell’s instructions found in the moodlepatches folder.
First download MoodleSpeex from:
http://download.moodle.org/download.php/modules/moodlespeex.zip
Then unzip it.
When you open it you will find the following in the folder:
· copyrights (folder)
· java (folder)
· moodle (folder)
· moodlepatches (folder)
· changelog (document)
· README (document)
· todo (document)
For the installation you really only need to be concerned with the moodle folder, and the moodlepatches folders if you are verse in the techie side of installations. Otherwise just stick with the moodle folder and the instructions below.
Now go to moodle>filter and upload the speexplayer folder to ../moodle/filter on your webserver.
Next go back to the moodle>lib and upload the speex folder to ../moodle/lib on your webserver.
This next part you can either do this through ssh or download the files from your webserver and edit them locally and then upload them back to your webserver. I prefer the former but I will use the latter for simplicity.
Download ../moodle/files/index.php to your local computer.
Open this file with a text editor such as wordpad, notepad, (win), TextEdit (Mac), gEdit (Ubuntu), or your favorite app. Make sure you don’t use MS Word or Appleworks.
First locate the following text somewhere around line 200:
html_footer();
break;
Right below this add the following:
case "speexrec":
require_once($CFG->dirroot.'/lib/speex/files_recorder.php');
break;
Next find the following text around line 863:
echo " ";
echo "";
echo "";
Right below this, add the following:
echo "
";
echo "";
echo "
";
Now save the file and upload to webserver.
Next you need to download ../moodle/mod/forum/mod.html
First locate the following text somewhere around line 325:
helpbutton('manageposts', get_string('blockperiod', 'forum'),'forum'); ?>
Right below this please add the following:
dirroot.'/lib/speex/forum_mod.html');
?>
Now save and upload to webserver.
Download ../moodle/mod/forum/post.html
On the first line you will find the following:
dirroot . '/lib/speex/speexlib.php');
if($forum->speex != 'off')
echo speex_forum_postmode_chooser(false);
Save and upload to webserver.
Download ../moodle/mod/forum/post.php
First locate the following text somewhere around line 12:
$prune = optional_param('prune',0,PARAM_INT);
$name = optional_param('name','',PARAM_CLEAN);
$confirm = optional_param('confirm',0,PARAM_INT);
Right after this please add the following:
$speex = optional_param('speex',-1,PARAM_INT); // This is a 0/1 flag as to whether to use Speex applet rather than normal text post
Next find the following text around line 801:
print_simple_box_start("center");
require("post.html");
print_simple_box_end();
Now you have to replace the line in bold:
print_simple_box_start("center");
require("post.html");
print_simple_box_end();
with:
if($forum->speex!='off' && ($speex==1 || ($speex==-1 && $forum->speex=='default')))
require($CFG->dirroot . '/lib/speex/forumpost.html');
else
require("post.html");
Then save and upload to webserver.
Now you need to login to your Moodle and go to the Configuration>Filters to enable Speexplayer.
Now your MoodleSpeex is ready to use.
Now when you go to post on a forum you will have an option to post in Text or Audio:
Select Audio:
I noticed that if you first type a message when in Text post mode and then switch to Audio post mode you loose all your text. Then you have to record, upload, post, and then edit to type any message and repost.