Showing posts with label Moodle. Show all posts
Showing posts with label Moodle. Show all posts

Wednesday, 10 April 2013

Moodle & Mahara plugins integration for Portfolio assignment submission



Greetings everyone,

This is a Portfolio assignment submission plugin in moodle and mahara however, we just need to focus on moodle. Basically, we need to have moodle 2.0 + and mahara 1.2 + but I tried it with moodle 2.3 and Mahara 1.4.7.

First, we need to get 2 plugins that are relevant for our integration.
Here's the link
local-mahara-moodle21.tar.gz
mod-assignment-type-mahara-moodle21.tar.gz
Or you guys can just wget to /tmp


Once we download let's get back to Linux server and to terminal or konsole and lets do 1 plugin at a time. First we untar local-mahara-moodle21.tar.gz

# tar -zxvf local-mahara-moodle21.tar.gz

Lets rename the folder to mahara and copy it to /var/www/html/moodle/local/ folder

# mv mahara-contrib-local-mahara/ mahara

# cp -varpf mahara /var/www/html/moodle/local

Let's not forget to rename to local-mahara plugin in a sense to back it up if there is any problem.

# mv mahara mahara-local

Now, lets' untar other plugin rename it to mahara and copy it to /var/www/html/moodle/mod/assignment/type/

# tar -zxvf  mod-assignment-type-mahara-moodle21.tar.gz
# mv mahara-contrib-mod-assignment-type-mahara/ mahara
# cp -varpf mahara /var/www/html/moodle/mod/assignment/type/

Now, let's just browse to those folders to check if its successfully and finally, don't forget to restart apache server

# cd /var/www/html/moodle/local
# cd  /var/www/html/moodle/mod/assignment/type/
# /etc/init.d/httpd restart

Now, once this is all done open up to browser and login to moodle. You will see following page and asking to "upgrade Moodle database now".

Once you click on that it will install the plugins, save changes and your done.

In the Site Administrator ==> Networking ==>  Manage Peers ==>  Mahara Host ==> Services Tab

We should be able to see new plugin "Extra Mahara MNet Module"
Click on Subscribe and save changes
The fact is that just by doing this it won't work therefore, we need to enable Assignment (2.2).

In the Site Administrator ==> Plugins ==> Plugins Overview ==> Manage activities
Here, we should be able to enable Assignment (2.2).

To confirm if this works or not, please do create a course and then click "Turn editing On"  
Browse inside the course and you will see Add an activity or resource.
Click on Add an activity or resource, you will be able to Mahara Portfolio.
Click on Mahara Portfolio and enjoy your work.

Cheers

 


 

Thursday, 14 February 2013

Mahara and Moodle Integration (Mahoodle)



Greetings,


Here, we will be merging Mahara and Moodle ==> Mahoodle.
I will do this step by step to make it easier so that anyone can understand and he/she doesn't need to be technical person. So let's proceed with our integration

  • Open your favourite browser (mine is Opera) and browse 
  • http://localhost/mahara

  • Once the site is up and running please do click on Administration

  •  Now, within Configure Site, you can see Networking, do click Networking

  • Here, you can see WWW root, the Public Key, SHA1 Fingerprint, MD5 Fingerprint, Public key expires, Enable networking, Auto-register all hosts and Delete this key
  • Now, we just need to enable networking to yes from the drop down menu and the save changes.

  • Now, lets shift to Moodle and do the similar something.
  • Browse http://localhost/moodle

  • This is a bit different that mahara therefore, 
  • First, let's open up Site Administration ==> Advance Features
  • By default networking is turned off, so let's enable to yes and save changes.

  •  Since we enable or turned on the networking, we should be able to see Networking in Site Administrator.

  •  Now, let's go back to Mahara ==> Admin Home ==> Manage institution ==> Institution
  •  Click on Add Institution, fill in the form and when you see Authentication Plugin select XML-RPC

  • Authority Name: Mahoodle XMLRPC
  • WWW root : http://localhost/moodle
  • Site Name: Whatever you like
  • Allow ==> Update user info on login
  • Allow ==> We auto-create users 
  • Allow ==> We import content
  • You can have a look at the image above and set it accordingly and once your done then click on submit.
  • NOTE:- From Authentication plugin Add Internal only if you want users to login directly to Mahara without being redirect via Moodle. If you add both Internal and XMLRPC then user will be able to login directly and redirect both.
  • Now, again lets go back to moodle
  • Site Administrator ==> Networking ==> Manage Peers
  • In Hostname add Mahara's WWW root and in Application Type add Mahara

  •  Once you add host, moodle will fetch the public enctyption key rom the mahara server and display it.

  •  Now you can save the page and once again you will get the same page but with few other tabs. Once you get other tab click on Services to setup SSO with mahara.

  •  Here, lets just focus at SSO (Identity Provider) and SSO (Service Provider).
  • Check on SSO (Identity Provider) ==> "Publish"
  • Check on SSO (Service Provider) ==> "Subscribe"
  • then save changes

  •  Here, we need to enable Moodle Network Authentication (MNet authentication)
  • Click on Site Administration ==> Plugin ==> Authentication ==> Manage Authentication
  • Enable MNet authentication
  •  Now, lets click on Site Administrator ==> Users ==> Permission ==> Define Role

  • Click edit on Authenticated User and allow Roam to a remote application via MNet.
  • Now that we have finished giving mahara users permission, we can setup a a link to bring them to the site.
  • Go back to main page of moodle, on Setting ==> Turn Editing On
  • Now at the bottom you can see Add a Block, from the drop down menu select Network Server and now you should be able to see Mahara

  •  Finally, lets add few users, if already created just log out from both mahara and moodle. If you haven't yet created users then go to Site Administrator ==> User ==> Account ==> Add a new user
  • Now, login as a different user in moodle

  • Now you can see that I have logged in as different user and you can see Network Server (Mahara) as well.
  • Lets create mahara to initiate SSO

  • Now, you can see that the same user who was logged in Moodle is logged in Mahara as well

Wednesday, 13 February 2013

Installing Moodle in RHEL, CentOS



Greetings Everyone,

I am pretty sure that most of us know what moodle is and what it does. Moodle is a Course Management System (CMS), also known as a Learning Management System (LMS) or a Virtual Learning Environment (VLE). It is a Free web application that educators can use to create effective online learning sites.

I will now start with the installation process.

  • First of all we need to have a clean RHEL, CentOS, Scientific Linux or Fedora machine with Apache server installed and you can refer it from my earlier blog LAMP or Apache Server installtion
  • Once you have finished installing Apache server we should proceed with moodle installation. Now, we need to download moodle and downloading moodle can be done in various ways but I would prefer downloading it from git. And, yes latest version currently that's the most stable and latest.
# cd /var/www/html

# git clone git://git.moodle.org/moodle.git

# cd moodle
# git branch -a
# git branch --track MOODLE_25_STABLE origin/MOODLE_25_STABLE
# git checkout MOODLE_25_STABLE  
  •  Now, lets create a data root for moodle and change permission and ownership
# mkdir /var/www/moodledata
# chown root:apache /var/www/moodledata
# chmod 770 /var/www/moodledata 
  •  We will be creating a utf8 database and yes, we are still using mysql 
# mysql -u root -p
# your-password
mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL PRIVILEGES ON moodle.* to 'root'@'localhost' IDENTIFIED BY 'yourpassword';  
mysql> FLUSH PRIVILEGES;
mysql> quit 
  •  Lets navigate to /var/www/html/moodle and now we can do it in 2 different ways but I would prefer just copying config-dist.php to config.php or you could php install.php
  • Please do search in config.php and modify the place which are marked in RED below
# cd /var/www/html/moodle
          # cp config-dist.php config.php
# vim config.php
=========================================================================
// 1. DATABASE SETUP
//=========================================================================
// First, you need to configure the database where all Moodle data //
// will be stored. This database must already have been created //
// and a username/password created to access it. //
$CFG->dbtype = 'mysqli'; // 'pgsql', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dbhost = 'localhost'; // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'moodle'; // database name, eg moodle
$CFG->dbuser = 'root'; // your database username
$CFG->dbpass = 'xxxxxx'; // your database password
$CFG->prefix = 'mdl_'; // prefix to use for all table names
$CFG->dataroot = '/var/www/moodledata';
$CFG->wwwroot = 'http://localhost/moodle';
  •  Once you have finished modifying /var/www/html/moodle/config.php. I am pretty sure everything is now ready to roll but lets fix permission before we browse and check it.
# chown -R root:apache /var/www/html/moodle
# chmod -R 770 /var/www/html/moodle 
  •  Now open your favorite browser and type in http://localhost/moodle, I am sure you should be seeing 
  • But in case you get "403 Forbidden Error", then try setting SELinux to permissive mode or Disable it

# setenforce 0
# getenforce (to check if its in permissive or enforcing mode)
 
  • Once you press continue, don't you worry it will perform server check and php extension and if you don't have you go back to terminal and install it


  • So let's install php extension (soap, xmlrpc and intl) and restart apache server
# yum install php-soap php-xmlrpc php-intl
# /etc/init.d/httpd restart 
  • Once these extensions are installed we are ready to rumble and the browser would look like this

  •  Finally, it will check if everything is working regarding moodle installation and create an account then your done.
  • Happy working with MOODLE