summaryrefslogtreecommitdiff
path: root/sqlbox/settings.php
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-25 08:33:05 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-25 08:48:17 +0100
commit95849a4614a55b46214622f88bb6dbc66cb54725 (patch)
tree7d7324f4a6649f8553ba57b7fcf4122cc0377a37 /sqlbox/settings.php
parent2b83a4b36c82b1c990e4152891074079d710bb91 (diff)
downloadsqltutor-plugin-95849a4614a55b46214622f88bb6dbc66cb54725.tar.gz
sqltutor-plugin-95849a4614a55b46214622f88bb6dbc66cb54725.tar.bz2
sqltutor-plugin-95849a4614a55b46214622f88bb6dbc66cb54725.zip
Add settings page for database connection
Diffstat (limited to 'sqlbox/settings.php')
-rw-r--r--sqlbox/settings.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/sqlbox/settings.php b/sqlbox/settings.php
new file mode 100644
index 0000000..d69bc88
--- /dev/null
+++ b/sqlbox/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+defined('MOODLE_INTERNAL') || die();
+
+if ($ADMIN->fulltree) {
+ require_once(dirname(__FILE__).'/lib.php');
+
+ $settings->add(new admin_setting_configtext('sqlbox_hostname', 'Hostname', 'Host to connect to', 'localhost'));
+ $settings->add(new admin_setting_configtext('sqlbox_database', 'Database', 'Database for SQLBox', 'sqlbox'));
+ $settings->add(new admin_setting_configtext('sqlbox_user', 'User', 'User name for Database', 'sqlbox'));
+ $settings->add(new admin_setting_configtext('sqlbox_password', 'Password', 'Password for the User', 'sqlbox_pw'));
+}
+
+?>