Note: You are currently viewing documentation for Moodle 2.1. Up-to-date documentation for the latest stable version is available here: Moodle Language Lab.

Moodle Language Lab: Difference between revisions

From MoodleDocs
m (→‎RAP Installation: fixed akadia link)
No edit summary
Line 100: Line 100:
Although not required, installing an SSL certificate for your web server makes it more secure. This can be a self signed certificate. You can follow these instructions if you need help creating such a certificate. http://www.akadia.com/services/ssh_test_certificate.html
Although not required, installing an SSL certificate for your web server makes it more secure. This can be a self signed certificate. You can follow these instructions if you need help creating such a certificate. http://www.akadia.com/services/ssh_test_certificate.html


# Copy the contents of the RAP folder into the default web folder on the Red5 Server. Usually something like /var/www
# Inside the mod/languagelab folder, you will find another folder called RAP. Copy the contents of the RAP folder into the default web folder on the Red5 Server. Usually something like /var/www
# Copy the config.xml file to a folder outside of the web folder. This is for security reasons. You wouldn't want someone to access your config file.
# Copy the config.xml file to a folder outside of the web folder. This is for security reasons. You wouldn't want someone to access your config file.
# Edit the config.php file. Change the $CFG->xml_path= value to the path value of your config.xml file.
# Edit the config.php file. Change the $CFG->xml_path= value to the path value of your config.xml file.

Revision as of 15:40, 20 December 2011

Introduction

This module is dependent on two server technologies apart from Moodle. I will attempt to describe as best I can how to install both the Red5 Server and the Palabre server. These are based on Ubuntu 10.04 LTS as this is the server oohoo.biz uses. Generally speaking, these instructions should work on most linux distributions. No instructions will be provided (yet) for Windows based servers as they are straight forward.

Red5 Installation

These are based on instructions by Nicky Hajal from the following site: http://tumbledesign.com/how-to-install-red5-0-9-on-ubuntu-10-04-lts/ However, there are differences and I strongly suggest you follow these steps.

Make sure that you have the latest updates for your ubuntu server. I am using Ubuntu Server 10.04 LTS 64 Bit. To do this follow these steps.

sudo apt-get update
sudo apt-get upgrade

ONce this is done, you have to make sure that the following repositories are available. If not, add them to /etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

At the command prompt type the following

sudo apt-get update

Install the following packages

sudo apt-get install java-package
sudo apt-get install sun-java6-jdk
sudo apt-get install sun-java6-jre

NOTE: Nicky also installs ant and subversion. However, these two packages are never used during the Red5 install process. Therefore, I am omitting these two steps.

Download Red5 version 0.8. Nicky installs version 0.9. This is not a recommended version for Language Lab.

wget http://trac.red5.org/downloads/0_8/red5-0.8.0.tar.gz
sudo mkdir /usr/share/red5
sudo cp red5-0.8.0.tar.gz /usr/share/red5
cd /usr/share/red5
sudo tar xvfz red5-0.8.0.tar.gz

You can start Red5 by typing the following command.

sudo sh red5.sh

In your browser, goto http://your-red5-server-address:5080/ You should see the Red5 default page.

This is not ideal because as soon as you press CTRL-c to return to the command prompt, Red5 turns off. You also don't want to log in to your server everytime you reboot just to turn on Red5. In order to have Red5 start as a "service" when ever you boot, do the following.

Create a file based on this boot script: http://oohoo.biz/red5 in your home directory. Then follow these steps.

sudo mv red5 /etc/init.d/
sudo chmod a+x /etc/init.d/red5

Start the server by typing the following

sudo /etc/init.d/red5 restart

You can now use CTRL-c to returm to the command prompt without turning off Red5. However, this script will not boot when you reboot your server. You must perform this final step.

sudo update-rc.d red5 defaults

Now reboot your server to make sure Red5 starts

sudo reboot

Installing OflaDemo

Once Red5 is installed, you still need to install OflaDemo in order for the language lab to work.

Goto your Red5 server with a browser. http://your-red5-server-address:5080/

Click on "Click here to install demos". In the table of demos, click on OflaDemo and then the Install button.

If it fails to install try changing the permissions on the following folder

sudo chmod 775 -R /usr/share/red5/webapps

Try installing again.

You should now have a fully configured and functional Red5 Server.

PALABRE NO LONGER USED

A new version of Language lab is now available. This new version does not depend on the Palabre XML Socket Server. You can downlod the new version at https://github.com/patrickthibaudeau/moodle-mod_languagelab/zipball/master

Thank you for your patience.

Red5 Adapter Plugin (RAP)

The Red5 Adapter Plugin is used to manage streamed files on the Red5 server. When ever a teacher or a student records themselves, a .flv file is created on the Red5 Server in the oflaDemo/streams folder. Without the RAP, such as earlier version of Language lab, the stream folder would fill up with, often, unnecessary files or previous files from past courses. This resolves the issue by letting Moodle interacte directly with the Red5 server. Future version of RAP will also be able to send files to Moodle when creating backups. Other useful functions will be added as requests come in.

RAP Installation

Installing RAP is quite simple. You will need a web server on your Red5 server. The examples used within this document, are with an ubuntu 10.04 LTS server. This, however, should work on any server that supports PHP 5.x.x.

I will assume that you have already installed the web server. In my case Apache2 with PHP5.

Although not required, installing an SSL certificate for your web server makes it more secure. This can be a self signed certificate. You can follow these instructions if you need help creating such a certificate. http://www.akadia.com/services/ssh_test_certificate.html

  1. Inside the mod/languagelab folder, you will find another folder called RAP. Copy the contents of the RAP folder into the default web folder on the Red5 Server. Usually something like /var/www
  2. Copy the config.xml file to a folder outside of the web folder. This is for security reasons. You wouldn't want someone to access your config file.
  3. Edit the config.php file. Change the $CFG->xml_path= value to the path value of your config.xml file.
  4. Rename the adapter.php file to what ever name you want. Remember to keep the .php extension. It makes the system more secure.
  5. Login to your Moodle server as an administrator. Enter into the Language lab settings by going into the Settings block under Site Administration->Plugins->Activity Modules->Language lab (If you are hosting a Red5 server for someone else and you do not have access to their Moodle server, send the Moodle administrator this information.)
  6. Under File name for the Red5 Adapter Plugin, enter the new name that you have given the adapter.php file WITHOUT the .php extension. For example, if you have changed the name to mynewadapter.php, you would enter mynewadapter
  7. Check the Secure access to Red5 Adapter Plugin if your server is using an SSL certificate. Again, not necessary, but it just makes the whole system more secure.

RAP: Edit config.xml

In the config.xml, you will find a default moodle tag. You must edit the following attribute values

serverAddress='IP or Domain name of Red5 Server' 

This is the IP address or Domain name of the Red5 server that you are installing the RAP. You can get this address from your Moodle Language Lab settings under Path to your Red5 server.

languagelabPrefix='Prefix from Moodle language lab setup'

This is the prefix found in the Moodle Language Lab settings under Enter a prefix for recorded streams.

streamFolderPath='/path/to/red5/oflaDemo/streams/folder/'

This is the path to your oflaDemo stream folder. On ubuntu systems, this is usually /usr/share/red5/webapps/oflaDemo/streams Do not forget to add the end slash (/).

salt='a mix of letters/numbers/symbols'

This is used for security reasons. This password salt must also be entered in the Password salt value in the Moodle Language Lab settings.

Save the file.

If you are hosting more than one Moodle server with the Language lab, you can add another Moodle tag with the appropriately defined attributes. For example you could have your config.xml file look similar to the following.

<config>
   <moodle serverAddress='my.firstserver.com' languagelabPrefix='mdl_firstserver' streamFolderPath='/path/to/red5/oflaDemo/streams/folder/' salt='abcdefgh123456@#$'/>
   <moodle serverAddress='my.secondserver.com' languagelabPrefix='mdl_secondserver' streamFolderPath='/path/to/red5/oflaDemo/streams/folder/' salt='ijKLMNOpq09876*&%$'/>
</config>

You can check your configuration by running a test. Just point your browser to http://your.moodle.site/mod/languagelab/raptest.php

That's it. I hope you enjoy the Language lab.