From d6fdaffa76976f486dc228f89359254fa20f1676 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 24 Jan 2013 15:25:53 +0100 Subject: Show already filed queries. And if it was correct. --- sqlbox/sqlbox_form.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sqlbox/sqlbox_form.php') 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); + } } ?> -- cgit