summaryrefslogtreecommitdiff
path: root/sqlbox/sqlbox_form.php
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-24 15:25:53 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-24 15:25:53 +0100
commitd6fdaffa76976f486dc228f89359254fa20f1676 (patch)
treede5f2842bb797ae24b97156776dd4069ef08cbf6 /sqlbox/sqlbox_form.php
parentff544ab8d8d2afeb2ecd0a6c54daf72a96f33049 (diff)
downloadsqltutor-plugin-d6fdaffa76976f486dc228f89359254fa20f1676.tar.gz
sqltutor-plugin-d6fdaffa76976f486dc228f89359254fa20f1676.tar.bz2
sqltutor-plugin-d6fdaffa76976f486dc228f89359254fa20f1676.zip
Show already filed queries.
And if it was correct.
Diffstat (limited to 'sqlbox/sqlbox_form.php')
-rw-r--r--sqlbox/sqlbox_form.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/sqlbox/sqlbox_form.php b/sqlbox/sqlbox_form.php
index 946fad4..5360b59 100644
--- a/sqlbox/sqlbox_form.php
+++ b/sqlbox/sqlbox_form.php
@@ -12,6 +12,11 @@ class mod_sqlbox_form extends moodleform {
$mform->addElement('text', 'sqlbox_query', 'SQL Query', 'size="50"');
$mform->addElement('submit', 'sqlbox_button', 'Submit');
}
+
+ public function set_query($query) {
+ $mform = &$this->_form;
+ $mform->setDefault("sqlbox_query", $query);
+ }
}
?>