diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-20 20:27:07 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-20 21:12:39 +0100 |
commit | db77666426e101c2bb374947af6193570b564e10 (patch) | |
tree | 95fd555bbbf2ac78b56534f0928475b8d10d31e0 /sqlbox/view.php | |
parent | 13acd7742a9287249c1f0de15435e663f9c8cc28 (diff) | |
download | sqltutor-plugin-db77666426e101c2bb374947af6193570b564e10.tar.gz sqltutor-plugin-db77666426e101c2bb374947af6193570b564e10.tar.bz2 sqltutor-plugin-db77666426e101c2bb374947af6193570b564e10.zip |
sqlbox: Add a simple form using formslib
Diffstat (limited to 'sqlbox/view.php')
-rw-r--r-- | sqlbox/view.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sqlbox/view.php b/sqlbox/view.php index e2330e1..96c3e36 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -31,6 +31,7 @@ require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); require_once(dirname(__FILE__).'/lib.php'); +require_once(dirname(__FILE__).'/sqlbox_form.php'); $id = optional_param('id', 0, PARAM_INT); // course_module ID, or $n = optional_param('n', 0, PARAM_INT); // sqlbox instance ID - it should be named as the first character of the module @@ -74,12 +75,8 @@ if ($sqlbox->intro) { // Conditions to show the intro can change to look for own // Replace the following lines with you own code echo $OUTPUT->heading('Yay! It works!'); -$form = <<<EOF -<input id="sqlstr" type="text" /> -<input type="submit" value="Querry" /> -EOF; - -echo $OUTPUT->heading($form); +$form = new mod_sqlbox_form(NULL, array()); +$form->display(); // Finish the page echo $OUTPUT->footer(); |