summaryrefslogtreecommitdiff
path: root/sqlbox/view.php
diff options
context:
space:
mode:
Diffstat (limited to 'sqlbox/view.php')
-rw-r--r--sqlbox/view.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/sqlbox/view.php b/sqlbox/view.php
index d095376..5c7c4e1 100644
--- a/sqlbox/view.php
+++ b/sqlbox/view.php
@@ -85,10 +85,15 @@ if (isset($data->sqlbox_query)) {
error("Failed to connect to sqlbox db");
$table = db_get_table_from_query($db, $data->sqlbox_query);
+ $table_orig = db_get_table_from_query($db, $sqlbox->query);
+ pg_close($db);
echo html_writer::table($table);
-
- pg_close($db);
+
+ if ($table->data == $table_orig->data && $table->head == $table->head)
+ echo $OUTPUT->heading("Correct!");
+ else
+ echo $OUTPUT->heading("Incorrect!");
}
// Finish the page