Moodle

Logging of every page view, operations, verify what else: addrandom.php, etc.

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Quiz
  • Labels:
    None
  • Difficulty:
    Moderate
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Verify a list of operations or classes of operations that need to be logged.

http://docs.moodle.org/en/Development:Coding

  1. User actions should be logged using the add_to_log() function. These logs are used for activity reports and Logs.
    http://docs.moodle.org/en/Logs

Activity

Hide
Olli Savolainen added a comment -

Tim: "Actually, I think you can skip logging when the add category form is displayed, but you should log when the category is actually added."

Show
Olli Savolainen added a comment - Tim: "Actually, I think you can skip logging when the add category form is displayed, but you should log when the category is actually added."
Hide
Olli Savolainen added a comment -

Tim, why aren't quiz operations (add q to quiz, move q, delete q from quiz) logged even in the original moodle 1.9?

Show
Olli Savolainen added a comment - Tim, why aren't quiz operations (add q to quiz, move q, delete q from quiz) logged even in the original moodle 1.9?
Hide
Olli Savolainen added a comment - - edited

Tim,
I committed the logging for the random question adding you requested. I wasn't sure if I should have named it "add rquestion" but for now it's just addcategory. The number in the "information" field is converted automatically to text at display it seems but I did not figure out how to add that conversion.

Also, I was surprised that logging is not done yet for almost anything regarding quizzes, even category creating in the question bank is not logged so I was not sure what to name this operation. I do not mind, I just understood earlier that there was more work missing from the new UI.

Show
Olli Savolainen added a comment - - edited Tim, I committed the logging for the random question adding you requested. I wasn't sure if I should have named it "add rquestion" but for now it's just addcategory. The number in the "information" field is converted automatically to text at display it seems but I did not figure out how to add that conversion. Also, I was surprised that logging is not done yet for almost anything regarding quizzes, even category creating in the question bank is not logged so I was not sure what to name this operation. I do not mind, I just understood earlier that there was more work missing from the new UI.
Hide
Tim Hunt added a comment -

Olli. That would be a bug (that no-one got around to fixing. I expect in most cases people care more about logging student actions.) It is always nice, when you work on an area of the code, to leave it in a better state than you found it.

Better not to change things that were already logged, without a good reason.

Show
Tim Hunt added a comment - Olli. That would be a bug (that no-one got around to fixing. I expect in most cases people care more about logging student actions.) It is always nice, when you work on an area of the code, to leave it in a better state than you found it. Better not to change things that were already logged, without a good reason.
Hide
Olli Savolainen added a comment -

Ok, closing this bug. Thanks. Please confirm though that what I did in the commit related to this bug was ok.
What do mean by changing things already logged, did I suggest that?

Show
Olli Savolainen added a comment - Ok, closing this bug. Thanks. Please confirm though that what I did in the commit related to this bug was ok. What do mean by changing things already logged, did I suggest that?
Hide
Tim Hunt added a comment -

What you did was fine, I already reviewed it.

My remark about 'Better not to change things that were already logged, without a good reason.' was triggered by the bit ' I wasn't sure if I should have named it "add rquestion" but for now it's just addcategory.'

Show
Tim Hunt added a comment - What you did was fine, I already reviewed it. My remark about 'Better not to change things that were already logged, without a good reason.' was triggered by the bit ' I wasn't sure if I should have named it "add rquestion" but for now it's just addcategory.'

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: