Better score for filling in blank fields
Better score for filling in blank fields


Former-commit-id: 95cc918c6120b9d5f98f671b3bb0410b1e480fbe

file:a/about.php -> file:b/about.php
--- a/about.php
+++ b/about.php
@@ -24,10 +24,10 @@
 http://www.finance.gov.au/publications/flipchart/docs/FMACACFlipchart.pdf summarises these. view-source:https://www.tenders.gov.au/?event=public.advancedsearch.home is great for the suspended/active status
 
 When defining the hierachy, this system is designed towards monitoring accountablity. Thus large agencies that have registered their own ABN 
-and have their own accountablity mechanisms/website recieve a seperate record as a child of their department.
+and have their own accountablity mechanisms/website receive a seperate record as a child of their department.
 Some small agencies will choose to simply rely on their parent department's accountablity measures.
 
-This flows through to organisation name and other/past names. A department that accounts for an agency will list that agency as an other child name.
+This flows through to organisation name and other/past names. A department that completely accounts for an agency will list that agency as an other child name.
 As agencies themselves shift between departments, there may be scope for providing time ranges but typically the newest hierarchy will be the one recorded.
 A department/agency name will be the newest active name assigned to that ABN.
 
@@ -39,6 +39,17 @@
 Statistical information from http://www.apsc.gov.au/stateoftheservice/1011/statsbulletin/section1.html#t2total https://www.apsedii.gov.au/apsedii/CustomQueryx33.shtml
 and individual annual reports.
 
+Webpage Assessment
+Much due care has been put into correctly recording disclosure URLs. Typically the "About", "Corporate", "Publications" and "Sitemap" sections are checked at the very least. 
+Occasionally it is nessicary to use a site or Google search. In several rare cases, there is a secret "Disclosure" navigation menu you can find if you find one of the mandatory publishing obligations in that category (seriously).
+Some rules about leniency:
+    An empty FOI disclosure log counts, a page outlining what the FOI Act is does not.
+    A disclosure log in PDF or Word format counts :(
+    An empty File/Record list counts (although that's very minimalistic that you have no files, electronic or paper)
+    Only a current information publication scheme page counts, not a s.9 FOI Act page or an organisation chart.
+    If there isn't a page easily listing all current and past Annual Reports, the most current one (html, pdf) counts.
+    Consultancy contracts might not need it's own webpage (if in Annual Report), grants/appointments might not apply to all organisations but Legal Services Expenditure (and all other obligations) does need a webpage. 
+
 <h2>Open Government Scoring</h2>
 +1 point for every true Has... attribute
 -1 point for every false Has... (ie. Has Not) attribute

--- a/getAgency.php
+++ b/getAgency.php
@@ -31,7 +31,7 @@
             if (strpos($key, "_") === 0) {
                 echo"<input type='hidden' id='$key' name='$key' value='$value'/>";
             } if (strpos($key, "has") === 0) {
-                echo "<label for='$key'><input type='checkbox' id='$key' name='$key' value='$value'> $key</label>";
+                echo "<label for='$key'><input type='checkbox' id='$key' name='$key' checked='$value'> $key</label>";
             } else {
                 echo "<label>$key</label><input  class='input-text' type='text' id='$key' name='$key' value='$value'/>";
                 if ((strpos($key,"URL") > 0 || $key == 'website')&& $value != "") {

--- a/include/couchdb.inc.php
+++ b/include/couchdb.inc.php
@@ -29,12 +29,14 @@
 
 function(doc) {
 count = 0;
+if (typeof(doc["status"]) == "undefined" || doc["status"] != "suspended") {
 for(var propName in doc) {
       if(typeof(doc[propName]) != "undefined" && propName.startsWith("l")) {
   	count++
 	}
 }
-  emit(doc._id,{name: doc.name, score:count});
+  emit(count+doc._id, {id:doc._id, name: doc.name, score:count});
+  }
 }';
 
     // allow safe updates (even if slightly slower due to extra: rev-detection check).
@@ -43,7 +45,7 @@
 
 require ('couchdb/settee/src/settee.php');
 
-$server = new SetteeServer('http://127.0.0.1:5984');
+$server = new SetteeServer('http://192.168.1.8:5984');
 
 function setteErrorHandler($e) {
     echo $e->getMessage() . "<br>" . PHP_EOL;

file:a/score.php -> file:b/score.php
--- a/score.php
+++ b/score.php
@@ -6,10 +6,10 @@
 $db = $server->get_db('disclosr-agencies');
 
 try {
-    $rows = $db->get_view("score", "score")->rows;
+    $rows = $db->get_view("score", "score", null, true)->rows;
     //print_r($rows);
     foreach ($rows as $row) {
-        echo $row->value->name." ".$row->value->score."<br>";
+        echo '<a href="getAgency.php?id='.$row->value->id.'">'.$row->value->name." ".$row->value->score."</a><br>";
     }
 } catch (SetteeRestClientException $e) {
     setteErrorHandler($e);