InstaGov/SMW

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< InstaGov
Revision as of 16:26, 7 January 2013 by Woozle (talk | contribs) (→‎Answers: extracted note from "answer" table page)
Jump to navigation Jump to search

About

Instead of having separate tables for questions and answers, each question or answer could be a wiki page with SMW data. No edit logging would be necessary, as that will be handled automatically by the wiki's edit-logging features.

  • Advantages:
    • easier to set up (no database mods needed)
    • no special software needed for basic functionality (especially if only trusted users have edit access)
    • ability to leverage SMW features for analysis and reporting.
  • Disadvantages:
    • doesn't come with a user-friendly interface; will probably need some coding or at least advanced SMW (semantic forms, perhaps?)
    • platform-dependent (need MW and SMW)
    • may be difficult to prevent voter fraud (nothing to stop one user from voting multiple times or editing votes of other users)
    • probably more CPU-intensive
    • If users want to keep votes on any page other than their main user page, some tweaking (and possibly coding) will be needed in order to show votes-by-user in a nice format.

Page Types

In each case, the remainder of the page (and the talk page) could be used for longer exposition and discussion that doesn't fit within the voting system's formal structure.

Questions

This corresponds to the question table.

  • Summary would be a short summary of the given question, suitable for displaying in lists.
  • Details would be a longer explanation, possibly for printing in reports

See /questions for an archive of my notes when I was thinking about replacing only the question table with SMW.

Answers

This corresponds to the answer table.

  • Summary would be a short summary of the given answer, suitable for displaying in lists.
  • Details would be a longer explanation, possibly for printing in reports
  • Archival notes (extracted from answer page):
    • 2011-06-06 This table may end up not being used, since I've found I can use SMW to store answer data. Also, I'm thinking it should be "choice" rather than "answer", but since it's no longer hard-coded, this is just a matter of updating documentation (and one field name in the rating table).

Ratings

This is the tricky part. We need to tie together three things: a user, an answer, and the user's rating for that answer. SMW also lets us tie together three things (a page, a property name, and a property value) -- but how do we reliably map one to the other?

A solution:

  • Any rating within a user's space means that the user has made that rating.
  • The property name is the answer's page name.
  • The property value is the user's rating (presumably -10 to +10 or similar).

The main issue here is that other users could edit a given user's vote. We will need to prevent or monitor this. We will also need to do something about out-of-range votes and invalid vote values.

Syntax

Displaying Lists

  • answers:
    • {{#ask: [[Response to::name of question]] [[Category:Igov/answer]]}}
      • this is only somewhat useful, as there is no way of formatting the results based on w3tpl content; more useful output will need coding