Tools integration

From FTA Wiki

Jump to: navigation, search

This document provides a description on how integration between different tools is achieved in the FTA infraestructure.

Contents

[edit] General documentation

Campus Project use a OKI mechanism as Integration Tool, next image shows the components of the system. Provides a range of services that are:

  1. Authentication: ervice not only allows the user to log into the system but also finds out if the user is logged in. This is a mandatory service in any computer program with user registration.
  2. Authorization: service allows to know if the user is authorised to act on certain resources and contexts. This is mandatory in any system in which the users play different roles.
  3. Logging: service allows program activity data to be stored. It is very useful for finding out what is happening in a system and how it is working.
  4. Locale: service permits the language of a program to be changed and new languages to be added.
  5. Configuration: service allows to create and change the configuration parameters of a computer application.

Then for each LMS you have an implementation of OKI interface (gateways) to adapt OKI language to LMS API.

File:schema.jpg

Oki provides a lot of services but can consume many resources (webservices calls) and then to do a simple integration can be used others architectures such as Basic LTI

Basic LTI is an implementation of an IMS specification that provides authentication, roles, user data, course assignment. The call is based on the OAuth signature.

File:LtiBLTIimgv1p0image002.jpg

You can implement extra services known as Outcomes to return values to the LMS (such as result of exam)

[edit] Moodle & Gateway OKI

You have to follow the instructions detailed here

[edit] Installation Gateway + OkiBus Server + Components

Download GatewayMoodle_OkiBusServer_Components-1.4.3.zip

  1. Unzip the content of the zip
  • Content of folder "server" will be overwrite your Moodle folder and will be in "Directory" directive. When asks you Replace you have to Accept All.
  • Folder "okibusCommon" is to be included (php_value "include_path").
  • Folder "configuration" files of configuration, every file is setted via VirtualHost (SetEnv name_enviroment pathToConfigurationFile).
You can define your own virtualhost (Information of Virtual Host at the end of this document). The file "vhost_Gateway_OkiBusServer_Components_moodle.conf" will be found in zip file, and is a template, you have to change <folder> for the real path. To include this file you have to edit configuration file of Apache2 (httpd.conf or apache2.conf, in Windows distribution is in <folder>/server/apache/conf) and add this line: Include <folder_to_unzipped_vhost>/vhost_Gateway_OkiBusServer_Components_moodle.conf Test OkiBusServer Configuration (<folder_to_unzipped_vhost>/configuration/): It's very important to test if configuration of OkiBus Server is correct. The page will show:
Classes of include_path are correct.
	PHP_OSID_2.0 classes.
	PHPUtils classes.
Classes loaded via configuration file are correct.
	Classes of moodle Implementation of OkiBusPHPServer.
Context parameters.
	Test if contexts params are the same in OkiBusPHPServer.
Configuration of temp directory. This folder is used by OkiBusServer, it should exist and be writable.
        To configure you have to edit configuration/okibusPHP.okibusServer.moodle.properties 
And set Param tmp_dir
	tmp_dir=/tmp
	##Using Moodle and XAMPP on Windows or Mac OS X
	##tmp_dir=C:\\xampplite\\server\\moodledata\\temp
	And create corresponding log directory
Replace the templates (okibusPHP.componentsServer.moodle.properties and okibusPHP.okibusServer.moodle.properties)
These files configuration are a template and you have to change <folder> to the real path point to /server/moodle. 
For example if you have c:\\xampplite\\server\\moodle you have to replace "<folder>" by "c:\\xampplite" (Note for Windows Users, you have to scape "\" with "\\"). 
In template "okibusPHP.okibusServer.moodle.properties" replace <folder_moodle> by "c:\\xampplite\\server\\moodle.
Warning you have to change in the 2 files
	
Access:

	http://url_to_host/testServerClasses/testClasses.php

If anything is wrong will show you in red color. Fix these errors before continue. If everything goes fine it will display a line in red: "Error 0 class not found"

  1. Restart Apache2
  2. Go to http://url_to_host/moodle
  3. Follow all the steps of moodle installation
  4. In "Site Administration" menu go to Users->Authentication (in Moodle 1.9+ then you have to go Manage authentication)
  5. Enable "okiserver"
  6. Log out
  7. Log in as admin
  8. In "Site Administration" menu go to Modules->Activities (in Moodle 1.9+ then you have to go Manage activities)
  9. Hide modules "appinstaler" and "okiserver" in order to don't show in course
  10. To be installed you have to click on "settings" on Modules->Activities "appinstaler" (in Moodle 1.9+ then you have to go Manage activities)
  11. Fill all the fields with these values
    	//Application Name to Install (can't contains blanks space, numbers and specials characters, and has to be lowercase)
    	App Name: 	namapplication
    	//Application Version to Install
    	Version: 	1
    	//URL to Initialize the new application
    	Initialization: 	http://url_to_host/install.php	
    	//URL to Execute in the new application
    	Execute URL: 	http://url_to_host/index.php	
    	//It's identified the webapps of launcher
    	Launcher Relative URL: /LauncherPHP/launcher/launcher.php
    	//Absolute URL to do logout application when Moodle ends session
    	Url Logout:	http://url_to_host/WelcomePHPApp/logout.php
     
  12. Click button "Install"
  13. Then you have to wait to see the "Result of appinstaler"

[edit] Moodle & Mediawiki (OKI)

The integration is based on OKI.

[edit] Required files and configurations in Moodle

  • /moodle/mod/appinstaler/
  • /moodle/mod/mainmediawiki/
  • /moodle/mod/okiserver/

[edit] Required files and configurations in Mediawiki

  • Download the OKI Module here.
  • General instructions are here.

In LocalSettings.php, add:

require_once("$IP/extensions/MoodleAuth.php"); // Integrates with OKI
require_once("$IP/extensions/MoodleLogin.php"); // Change login action
$wgGroupPermissions['*']['createaccount'] = false; // Prevent new user registrations except by sysops

The following files must be present in /extensions folder:

  • CatLinkAtBottom.php
  • InstallOKI.php
  • MoodleAuth.php
  • MoodleLogin.php
  • okiwrapper.php
  • Redirect2Course.php
  • Redir.php
  • ValidateOKI.php

[edit] Installation Mediawiki in Moodle with OKI

  1. Log in as admin
  2. In "Site Administration" menu go to Modules->Activities (in Moodle 1.9+ then you have to go Manage activities)
  3. Hide modules "appinstaler" and "okiserver" in order to don't show in course
  4. To be installed you have to click on "settings" on Modules->Activities "appinstaler" (in Moodle 1.9+ then you have to go Manage activities)
  5. Fill all the fields with these values
    	//Application Name to Install (can't contains blanks space, numbers and specials characters, and has to be lowercase)
    	App Name: 	mediawiki
    	//Application Version to Install
    	Version: 	1
    	//URL to Initialize the new application
    	Initialization: 	http://campus.ftacademy.org/wiki/extensions/InstallOKI.php
    	//URL to Execute in the new application
    	Execute URL: 	http://campus.ftacademy.org/wiki/extensions/Redirect2Course.php
    	//It's identified the webapps of launcher
    	Launcher Relative URL: /wiki/LauncherPHP/launcher/launcher.php
    	//Absolute URL to do logout application when Moodle ends session
    	Url Logout:	http://campus.ftacademy.org/wiki/index.php?title=Special:UserLogout
     
  6. Click button "Install"
  7. Then you have to wait to see the "Result of appinstaler"
  8. Now you can add it into a course

[edit] Moodle & Wordpress (OKI)

The integration is based on OKI.

[edit] Required files and configurations in Moodle

  • /moodle/mod/appinstaler/
  • /moodle/mod/wordpress/
  • /moodle/mod/okiserver/

[edit] Required files and configurations in Wordpress

  • Download the OKI Module here.
  • General instructions are here.
[edit] Allow blogs multisite

First of all you have to configure Wordpress to work as a multiblog in sub-directories model (like example.com/site1 and example.com/site2) Sub-directory sites: It works with the use of the mod_rewrite feature on the server having the ability to read the .htaccess file, which will create the link structure. Then you have to follow the next steps:

  1. Allow Multisite: To enable the Network menu item, you must first define multisite in the wp-config.php file. Open up wp-config.php and add this line above where it says /* That's all, stop editing! Happy blogging. */:
    define('WP_ALLOW_MULTISITE', true);
  2. Installing a Network: This will enable the Network menu item to appear in the Tools menu. Visit Administration > Tools > Network to see the screen where you will configure certain aspects of our network.
  3. Enabling the Network: The rest of the steps are ones you must complete in order to finish.
  4. Create a blogs.dir directory under /wp-content/ This directory is used to stored uploaded media for your additional sites and must be writable by the web server. They should be CHOWNed and CHMODed the same as your wp-content directory.
  5. Add the extra lines your WordPress installation generates into your wp-config.php file. These lines are dynamically generated for you based on your configuration. Edit the wp-config.php file while you are logged in to your sites admin panel.
    Then just paste the generated lines immediately above /* That's all, stop editing! Happy blogging. */.
  6. Add the generated mod_rewrite rules to your .htaccess file, replacing other WordPress rules. (If there isn't one, then create it.) These lines are dynamically generated for you based on your configuration.
  7. Log in again. Once the above steps are completed and the new wp-config.php & .htaccess files are saved, your network is enabled and configured. You will have to log in again. click "Log In" to refresh your Adminstration Panel. If you have problems logging back in, please clear your browser's cache and cookies.
  8. Network Admin Settings In 3.0, you had a new menu for Super Admin, but as of 3.1 you have an entire sub-section for Network Admin. The link can be found on the upper-right of all admin screens, by your name. Go to the Settings panel to configure network options, and the Sites panel to manage your sites.
[edit] Plugin Installation

In order to provide the Oki Plugin you have to:

[edit] Installation Wordpress in Moodle with OKI

  1. Log in as admin
  2. In "Site Administration" menu go to Modules->Activities (in Moodle 1.9+ then you have to go Manage activities)
  3. Hide modules "appinstaler" and "okiserver" in order to don't show in course
  4. To be installed you have to click on "settings" on Modules->Activities "appinstaler" (in Moodle 1.9+ then you have to go Manage activities)
  5. Fill all the fields with these values
    	//Application Name to Install (can't contains blanks space, numbers and specials characters, and has to be lowercase)
    	App Name: 	wordpress
    	//Application Version to Install
    	Version: 	1
    	//URL to Initialize the new application
    	Initialization: 	http://campus.ftacademy.org/blogs/index.php
    	//URL to Execute in the new application
    	Execute URL: 	http://campus.ftacademy.org/blogs/CLASSROOM?template=fta&stylesheet=fta
    	//It's identified the webapps of launcher
    	Launcher Relative URL: /wiki/blogs/launcher/launcher.php
    	//Absolute URL to do logout application when Moodle ends session
    	Url Logout:	http://campus.ftacademy.org/blogs/wp-login.php?action=logout 
     
  6. Click button "Install"
  7. Then you have to wait to see the "Result of appinstaler"
  8. Now you can add it into a course

[edit] Moodle & Elgg (Basic LTI)

The integration is based on Basic LTI.

The BLTI plugin for Elgg can be downloaded from here. Moodle is the Tool Consumer and Elgg acts as Tool Provider,

Basic Consumer Moodle can be found in /moodle/mod/basiclti. You can download the plugin from here

[edit] Basic
LTI
 for 
Moodle
1.9

  • Step
 1: 
Installation


After copying the 
"basiclti" folder 
in the 
"mod" 
folder 
of 
the 
Moodle 
1.9 
installation,
 click 
on 
Notifications 
in 
the 
Site 
Administration 
area 
on 
the 
main 
Moodle 
page . 
You should 
get 
a 
series 
of 
messages 
indicating 
the 
correct 
installation
 of
 the 
module.
 


  • Step
 2: 
Setting 
up 
Tool 
Providers 


For 
the 
course 
creators
 to 
be 
able 
to 
incorporate 
a 
Basic 
LTI 
compliant 
tool 
in
 their
 course, 
a 
Moodle 
administrator
 needs 
to 
set 
it 
up 
from 
the 
Site Administration
 menu. 
The 
process 
is 
as 
follows:
 Go
to
 Site Administration
‐>
Modules
‐>
Activities
‐>
Basic
LTI, Click 
on 
Basic 
LTI 
administration,


Click 
on 
Create 
a 
new 
Basic 
LTI activity 
to 
configure 
a 
new 
one.
 In 
the 
next 
screen,
you 
are
 asked 
to 
introduce 
the 
data 
of 
the 
external 
tool 
you 
want to 
configure.
 Some 
of
 these 
data, 
like 
the 
resourcekey 
and 
the 
remote
tool password,
 should 
be 
made
available 
by 
the 
external
 tool 
provider.


Among
 the 
parameters 
that 
you 
are
 asked 
to 
provide 
are:


  1. Tool
name: 
The 
name 
of 
the
 external 
tool 
you 
are 
configuring,

  2. Tool 
URL:
 The 
URL 
of 
the 
remote
tool,

  3. Resource
key 
and 
password: 
For
 accessing 
the 
remote 
tool,

  4. Preferred 
Height: 
A 
preference 
setting 
for 
the 
size 
of 
the 
window/frame
 used to 
display 
the 
remote 
tool,

  5. Privacy 
settings:
 The 
administrator 
may 
chose 
whether 
to 
send 
or 
not 
the name, 
email and profile settings 
of 
the
 user 
in 
the 
request 
to 
connect 
to 
the 
remote 
tool, 
or to 
delegate 
this 
decision 
to 
the 
professor,

  6. Custom 
parameters:
 A 
textbox 
for 
additional 
custom 
parameters 
that 
a 
tool may 
require/support,

  7. Set up 
options:
Choose 
which 
id 
parameter 
to 
use 
for 
identification 
and whether 
the 
tool 
is 
and 
activity 
or 
a 
resource,

  8. Organization 
details:
 details 
of 
the 
client’s 
organization,

  9. Launch
 options: 
chose 
whether 
to 
launch 
the 
external 
tool 
as 
a 
frame 
in
 Moodle 
or 
in 
a 
pop‐up 
window or standalone.


Fill
 the 
data 
and 
click 
on 
Save
 Changes 
you 
should 
find 
yourself 
on 
the 
previous screen 
and 
the 
newly 
configured 
tool 
should 
appear 
in 
the 
list.


  • Step
3:
 Adding 
a 
Tool 
to 
a 
course


From
 the 
course 
screen ,
all 
installed 
tools 
should 
appear 
either 
under 
the 
Add: 
a resource or 
Add 
an 
activity.


[edit] Basic
LTI Provider
 for 
Elgg

You have to uncompress in mod Elgg folder then you have to edit In /mod/blti/configuration/mappingFields.cfg, and add your mapping fields. You have to specify the nexts parameters:

  • username_no_prefix: username prefix mode, if set to 0 get username with prefix (fta_username) if set 1 then doesn't have prefix (username)
  • mapping_as_admin: mapping as admin blti admin user, if not it will be a simple user in elgg
  • number_of_fields: number of fields to Mapping
  • fieldX_source: indicate the name of LMS parameter, the X means the number of parameter (1 to number_of_fields)
  • fieldX_destination: indicate the name of Elgg parameter, the X means the number of parameter (1 to number_of_fields)

You have to configure the keys in the file: blti/IMSBasicLTI/configuration/authorizedConsumersKey.cfg you can define the user and password, for example to define the consumer key "external" yo have to define

  • consumer_key.external.enabled=1
  • consumer_key.external.secret=pwd_12345

[edit] Basic
LTI Provider
 for 
Mediawiki

The BLTI plugin for Mediawiki can be downloaded from here. This plugin allows to connect your Consumer BasicLTI with Mediawiki. Doing SSO, mapping as course/category

'To install it:

  • Step 1: Put all files in to mediawiki/extensions folder
  • Step 2: Edit LocalSettings.php and add the Authentication Extension at the end
include("extensions/BLTIAuth.php");
include("extensions/CatLinkAtBottom.php");
include("extensions/KillLogout.php");

If you want to include special permissions for the others categories/courses, like only categories/courses logged can be read, edited, created pages... Usage CategoryPermissionsBLTI:

$wgCategoryExclusive=array("Category:cat_name","Category:cat2_name");//deny acces to these categories for anyone not in the group
$wgGroupAlwaysAllow=; //set a group name to ALWAYS allow access to this group
$wgGroupDefaultAllow=false; //set to true to allow everyone access to pages without a category

//get the name of BLTIclassroom

 $course_name = $_SESSION['BLTIclassroom'];

//add groups to category permissions by:

 $wgGroupPermissions['user']['*_read'] 	= false; //Set permission for others categories/courses
 $wgGroupPermissions['user']['*_edit'] 	= false;
 $wgGroupPermissions['user']['*_move'] 	= false;
 $wgGroupPermissions['user']['*_created']  = false;
 $tag_category = 'Category';//'Course' //Be careful with the translate of Categoryç

//Set permission for current category/course

 $wgGroupPermissions['user'][$tag_category.':'.$course_name.'_read'] 	= true; 
 $wgGroupPermissions['user'][$tag_category.':'.$course_name.'_edit'] 	= true;
 $wgGroupPermissions['user'][$tag_category.':'.$course_name.'_move'] 	= true;
 $wgGroupPermissions['user'][$tag_category.':'.$course_name.'_create']  = true;
 $wgGroupPermissions['user'][$tag_category.':'.$course_name.'_createpage']  = true;

//if yo want you can define special permission access for a group to all categories like this

$wgGroupPermissions['group_name']['*_read']=true;
include_once('extensions/CategoryPermissionsBLTI.php');


  • Step 3: Configure BLTI:

Remote Tool URL: http://url/mediawiki/extensions/Redirect2CourseBLTI.php Password: secret

[edit] Basic
LTI Consumer
 for 
Elgg

This plugin is a consumer tool and lets to launch external application such as MediaWiki and Wordpress.

To install it you have to:

  1. Download the code here
  2. Unzip into mod folder
  3. Log as administrator and go to Administration->Tool Administration and enable "blti_consumer"

The current version allows the user to configure all parameters with:

  • Tool Admistration you have to configure in settings section the name of organization (field OrganizationId)
  • After that for each remote Tool you want access you have to go "Manage Tools BasicLTI" and there you can add or edit a tool. Among
 the 
parameters 
that 
you 
are 
asked 
to 
provide 
are:

  1. Name: 
The 
name 
of 
the
 external 
tool 
you 
are 
configuring,

  2. 
Url:
 The 
URL 
of 
the 
remote
tool,

  3. Resource
key 
and 
password: 
For
 accessing 
the 
remote 
tool,
 leave this field blank to have your key auto generated
  4. Description: Description of remote Tool
  5. Callback URL: Url to receive call backs
  6. Preferred 
Height: 
A 
preference 
setting 
for 
the 
size 
of 
the 
window/frame
 used to 
display 
the 
remote 
tool,

  7. Privacy 
settings:
 The 
administrator 
may 
chose 
whether 
to 
send 
or 
not 
the name, 
email and profile settings 
of 
the
 user 
in 
the 
request 
to 
connect 
to 
the 
remote 
tool, 
or to 
delegate 
this 
decision 
to 
the 
professor,

  8. Custom 
parameters:
 A 
textbox 
for 
additional 
custom 
parameters 
that 
a 
tool may 
require/support,

  9. Launch
 options: 
chose 
whether 
to 
launch 
the 
external 
tool 
as 
a 
frame 
in
 Elgg 
or 
in 
a 
pop‐up 
window or standalone.


[edit] Moodle & Annotation tool