Event Logger plugin, v1.1
The plugin is already included in the q2a installation.
I decided to NOT enable it initially, but to start first populating the q2a db (I've created a new q2a website) with some test questions and some test users (default privileges on registration).
As an admin, I decided, after a couple of days, to enable it to see how it works, and checked the "Log events to qa_eventlog database table" option.
After I saved the option, no qa_eventlog table was created in the mysql db. Why ?
After that, I decided to logout as an admin, and to login (same pc, but with another browser) as a normal user
What happened ?
I received, logged in as a normal user, a web page saying : "The Event Logger event module requires some database initialization.", with a button saying : "Initialize database".
The user is responsible to initialize the db (!)
I could click on the button and I was able to initialize the database ("Running query: CREATE TABLE qa_eventlog ......", "The Event Logger event module has completed database initialization.")
At the bottom of the page there was also a link "Go to admin center"
When I clicked, I could not go to the admin center of course ("Only administrators may access this page") because I was logged in as a normal user (ok)
My question : is this a "design" bug ?
The admin enables the checkbox, and the first user who creates an event is responsible of initializing the database.
It sounds to me a wrong behavior this "lazy" initialization.
The initialization should happen immediately, when the admin save the options AND the option is flagged, in the same "logical" transaction of the insert/update in the options table.
Is this a bug ?