Student projects/Enterprise-level improvements
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.
Suggested headings, feel free to alter them!
This project consists of three seperate components
- Moodle CLI installer
- Moodle CLI upgrader
- 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.
Moodle CLI installer
Listed below are the major steps in the Moodle Command Line Interface(CLI) installer
- 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
- Display the status of PHP settings: Program will quit only if mandatory requirements fail
- Get the installation directories and web addresses:
- Moodle directory - Moodle root directory. This directory is checked for writability. If not it script will fail
- Moodle data directory - default will be moodledata directory in parent directory of the moodle (../moodledata). This directory is owned by www-data and writable.
- Web address
- Configuring the database - After the configuration connectivity is checked
- Database type (Mysql, Oracle, Postgres, SQL server)
- Database Server
- User name for database
- Password for database
- Table prefix
- Print the environment: print the environment of the system to be able to run the Moodle. If environment is good enough prompt for continue
- Create the configuration file: configuration file is only given access to user If successful print the successful message
- Print the GNU license and accept the terms and conditions in it
- Ask user whether Moodle is attended or unattended
- Ask user whether he want
- Summarized output of installation - no DB scripts output shown
- Detailed output installation - everything as in web installer
- Minimum output installer - nothing except for successful/fail messages shown
- Setup admin user account:User name, password, First name, Surname, E mail, Display email, email activated, city/town, country, time zone, preffered language, description
- Front page settings
- Full site name
- Short name for the site
- Front page description
- Print other information details with the default value
- 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
- 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.
- 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)
- Command Line Installer Database Configuration : DB selection (Windows)
- Command Line Installer Language selection
- Command Line Installer Language Pack Download(Linux)
- Command Line Installer Final stage (Linux)
Moodle CLI Upgrader
Tasks and Timeline
- May 31 :Start of coding
- July 05: Development of Moodle command line installation
- July 15: Development of Command line upgrader
- Aug 15 : Development of profiling system
- Aug 20 : Completion of the project
Back to: Student projects