aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/schema.sql4
-rwxr-xr-xweb-admin/index.cgi11
2 files changed, 12 insertions, 3 deletions
diff --git a/db/schema.sql b/db/schema.sql
index a9f7ec2bc..d9a08c629 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -4,7 +4,7 @@
-- Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
-- Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
--
--- $Id: schema.sql,v 1.28 2007-05-09 11:01:43 matthew Exp $
+-- $Id: schema.sql,v 1.29 2007-05-09 11:13:39 francis Exp $
--
-- secret
@@ -156,6 +156,8 @@ create table questionnaire (
problem_id integer not null references problem(id),
whensent timestamp not null,
whenanswered timestamp,
+
+ -- whether have ever previously reported a problem to a council or not
ever_reported boolean
);
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index 3bc2d26dd..b879fafd0 100755
--- a/web-admin/index.cgi
+++ b/web-admin/index.cgi
@@ -7,10 +7,10 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: index.cgi,v 1.34 2007-05-03 09:34:23 matthew Exp $
+# $Id: index.cgi,v 1.35 2007-05-09 11:13:40 francis Exp $
#
-my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.34 2007-05-03 09:34:23 matthew Exp $';
+my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.35 2007-05-09 11:13:40 francis Exp $';
use strict;
@@ -110,6 +110,7 @@ sub do_summary ($) {
['select count(*) from contacts', 'contacts'],
['select count(*) from problem', 'problems'],
['select count(*) from comment', 'comments'],
+ ['select count(*) from alert', 'questionnaire'],
['select count(*) from alert', 'alerts']
)));
@@ -131,6 +132,12 @@ sub do_summary ($) {
map { $_->[0] . " " . $_->[1] } @$statuses
));
+ print $q->h3("Questionnaire status");
+ $statuses = dbh()->selectall_arrayref("select count(*) as c, (whenanswered is null) from questionnaire group by (whenanswered is null) order by c desc");
+ print $q->p(join($q->br(),
+ map { $_->[0] . " " . ($_->[1] ? 'answered' : 'unanswered') } @$statuses
+ ));
+
print $q->h3("Alert status");
$statuses = dbh()->selectall_arrayref("select count(*) as c, confirmed from alert group by confirmed order by c desc");
print $q->p(join($q->br(),