On walking in circles that are spirals but you don’t know it and boiled frogs

Yesterday someone asked if something was possible “Can we tell how many times people took the exam”

The steps it took

  • Tell the Moodle report page to show 1000 rows
  • Copy and paste the page into PHPStorm (a powerful editing tool but the only one I have which supports regular expressions).
  • Write 6 different regular expressions to clean the data and transmogrify it into a format which would pass as a comma separated variable file
  • Import said file, after saving, into an mysql database
  • Add an index and primary key to the new table
  • Rename columns to make the query easier
  • Write a query to do a group by (group is an sql term which allows you to create an aggregate score for a column – in this, if we group by name, how many attempts are there).
  • Then export the results as a comma separated variable file
  • Open this file in LibreOffice Calc and save as XLSX to make sure it’ll open in excel.

The observant amongst you, is that i left a database to return to a database. If I’d had access to the moodle database I could have ran the query there, but to allow someone to run their own query on the server and done. However, can you see Moodle letting you run your own query. I am sure each open source tool which runs with a database could support a plugin which allows you to run your own query, but would they? You have to know SQL to write a query and you’d need to be careful they couldn’t ruin the site. But select queries are pretty harmless.

So then we see the journeys software allows us to take, and from that see the shape and form of things. Would WordPress be different if we allowed for an SQL query by default. If we designed tools to be as powerful as possible in their first form, and then slowly write abstraction interfaces so as to simplify those tools. When you save a post in WordPress, all WordPress does is make an SQL query.

The question would be why do you need to, but in logics of a pemissive culture of openness, should the question be why shouldn’t you? If the risks can’t be mitigated for, then they can be explained/