MySQL: Possible to log temporary data?

Permalink
Hey, all.

Not even sure I'll use the right terminology, but I'll try and explain as best as I can.

I'm trying to monitor the users who edit and update my site in order to fine-tune a rewards program that provides benefits to users who contribute content. I'm hoping to be able to collect information like when a user starts and stops editing a page and then be able to export it and run reports that identify how long users spend updating pages per some specific timeframe.

I think the Pages table contains the following fields I need to monitor:

cID: the collection id
cIsCheckedOut: an indicator when the page is undergoing edits (thinking that this could be the trigger to collect data)
cCheckedOutUID: the id of the user who is editing the collection
cCheckedOutDatetime: the time when the user began to edit the collection
cCheckedOutDatetimeLastEdit: the time when the user made the last edit to the collection

The problem I'm facing is that these fields only seem to be populated when the page is being edited. When the user exits edit mode and discards, previews, or publishes the edits, the cIsCheckedOut field empties, along with all the other "checked out" fields.

Is there a way to log this information?

campbell
 
olliephillips replied on at Permalink Reply
olliephillips
You could explore extending events to log that from within C5. Certainly there are events for updating of pages and approval of new versions, but you'd need also need an event for when the page went into edit mode (start of editing) in order to calculate the time spent. I'm not sure there is one.

However, some might suggest a performance measure like this may be flawed. A user could start editing a page, then go make a cup of tea in one scenario, before coming back to finish their edits and the measure would reward them better than someone who can write copy quickly and gets on with the job.

Articles published and wordcount might be better, but even then you'd have to consider the quality of what's being written. People will game the system whatever you do that's for sure! Interesting stuff.
campbell replied on at Permalink Reply
campbell
Thanks for the reply, Ollie.

I agree with you that tracking time is a flawed measure for precisely the reasons you mention. Add in the idea that someone might do plenty of research before starting the editing process... I'd think that would be worthy of reward, but would not be tracked by the system. Let's just say that this directive comes from above me, and I've made that same argument.

You may be on to something with the pages published idea, though. I'm not worried about the quality question because each contributed page will go through a review process, and if it's flawed or needs serious revision, the page would be rejected and therefore not count in the overall tally.

So maybe I should be investigating whether I can create a form/report where the administrator can select a user and a time range, and the page will return all pages edited by that user during that time range.