Student projects/Enterprise-level improvements

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Student projects/Enterprise-level improvements.

Programmer:

Suggested headings, feel free to alter them!


Summary

This project consists of three seperate components

  1. Moodle CLI installer
  2. Moodle CLI upgrader
  3. Profiling system

Moodle CLI installer will adapt all the DB installation and upgrade scripts to run from the command line, so fully scripted installations are possible without using the web interface.

Project Components

Moodle CLI installer

Listed below are the major steps in the Moodle Command Line Interface(CLI) installer

  1. Language selection:Installer will be internationalized using the Moodle internationalization methodology. So if the language support is there you can continue the installer with appropriate language
  2. Display the status of PHP settings: Program will quit only if mandatory requirements fail
  3. Get the installation directories and web addresses:
    1. Moodle directory - Moodle root directory. This directory is checked for writability. If not it script will fail
    2. Moodle data directory - default will be moodledata directory in parent directory of the moodle (../moodledata). This directory is owned by www-data and writable.
    3. Web address
  4. Configuring the database - After the configuration connectivity is checked
    1. Database type (Mysql, Oracle, Postgres, SQL server)
    2. Database Server
    3. Database
    4. User name for database
    5. Password for database
    6. Table prefix
  5. Print the environment: print the environment of the system to be able to run the Moodle. If environment is good enough prompt for continue
  6. Create the configuration file: configuration file is only given access to user If successful print the successful message
  7. Print the GNU license and accept the terms and conditions in it
  8. Ask user whether Moodle is attended or unattended
  9. Ask user whether he want
    1. Summarized output of installation - no DB scripts output shown
    2. Detailed output installation - everything as in web installer
    3. Minimum output installer - nothing except for successful/fail messages shown
  10. Setup admin user account:User name, password, First name, Surname, E mail, Display email, email activated, city/town, country, time zone, preffered language, description
  11. Front page settings
    1. Full site name
    2. Short name for the site
    3. Front page description
    4. Print other information details with the default value
  12. Finalize the installation

comment: Do we have to seperate installation from the administration work like adding user account and site names, etc.

Running the script

There are two methods for running the script.

Non interactive mode
When all the arguments are passed with script or when force mode is enabled
Interactive mode
When force mode is not enabled and not all arguments are passed

Libraries that will be used

PEAR Console libraries

Final Files

installer-cli.php
Which contain the all the logic that is required to install the Moodle using command line. Shebang will be added to the first line of the file to make it executable from the command line in linux/UNIX environment.
cli-install.bat
There is a problem of finding the location of the php.exe for the bat. Easiest way is to put an entry in the readme file on how to insert the php executable location on bat file. (which include finding the php.exe location. Say C:\php\php.exe. Then opening the cli-install.bat file using a text editor and inserting the line/editing the line so that it says C:\php\php.exe installer-cli.php). This file will have no effect in non windows environment.

Sample interfaces for CLI Installer

  • Command Line Installer PHP settings (Windows)

alt PHP settings

  • Command Line Installer Database Configuration : DB selection (Windows)

alt Database configuration

  • Command Line Installer Language selection

alt Command line installer language selection

  • Command Line Installer Language Pack Download(Linux)

alt Command line installer language pack download

  • Command Line Installer Final stage (Linux)

alt Command line installer final stages

Moodle CLI Upgrader

Important Things

Tasks and Timeline

  1. May 31 :Start of coding
  2. July 05: Development of Moodle command line installation
  3. July 15: Development of Command line upgrader
  4. Aug 15 : Development of profiling system
  5. Aug 20 : Completion of the project

See also

  1. Bug for Enterprise-level improvements[1]
  2. Initial proposal [2]

Back to: Student projects