Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Offline Moodle Create Environment

From MoodleDocs


To ensure a standard approach to developing offline moodle environments it is important to record and maintain details

Environment Generation Source files Xampp: xampplite-win32-1.6.6.exe Moodle: moodle-1.9.zip release version

Install Moodle

Secure the mysql root password using the values below

Create the moodle database Run the following sql on the database create database `moodle` character set utf8; grant all on `moodle`.* to 'moodle'@'localhost' IDENTIFIED BY 'm00dl3';


Create config file

There are two ways 1) Create the file directly create a file using the following values in the root of the moodle directory called config.php

<?php /// Moodle Configuration File

unset($CFG);

$CFG->dbtype = 'mysql'; $CFG->dbhost = 'localhost'; $CFG->dbname = 'moodle'; $CFG->dbuser = 'moodle'; $CFG->dbpass = 'm00dl3'; $CFG->dbpersist = false; $CFG->prefix = 'mdl_';

$CFG->wwwroot = 'http://localhost/moodle'; $CFG->dirroot = dirname(__FILE__); $CFG->dataroot = dirname(__FILE__).'\\..\\..\\moodledata'; $CFG->admin = 'admin';

$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode

require_once("$CFG->dirroot/lib/setup.php"); // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES, // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE. ?>

2) Use the install wizard Got to http://localhost.moodle Enter the values from above as they are requested. Once the config file is created change the values for $CFG->dirroot and CFG->dataroot as shown above to ensure they are dynamic paths that will work as the code is moved around.

Generate Database tables and load data

Got to http://localhost.moodle and follow the install process

Setup up initial data Username: Admin Password: m00dl3 Email: testofflinemoodle@open.ac.uk Email Activated: Hide my email address from everyone City/Town: Milton Keynes Country: United Kingdom

Front Page settings Full site name: Offline Moodle Short name for site: OfflineMoodle Front Page Description: Welcome to Offline Moodle

Setup session handling So that we don’t conflict with other moodles change the session to be unique. Go to Server> Session Handling. In the Cookie prefix box enter ‘offlinemoodle’ and save changes. You will now have to log back in.

Add student account Username: student Password: testing Email: offlinestudent@open.ac.uk Email Activated: Hide my email address from everyone City/Town: Milton Keynes Country: United Kingdom

Create root support files Pre configured help files Readme.htm system-requirements.htm Help folder and contents


Internet Shortcuts Offline Moodle.lnk Offline Moodle at the Open University.lnk Location

Security passwords are available on request to [c.chambers@open.ac.uk] Database: User: root Password:

Directory protection: Will create a .htaccess file for password protection over http

User: root Password: