Moodle
  1. Moodle
  2. MDL-3508

To many 'upload file' records in Moodle's logs...

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE
    • Rank:
      14414

      Description

      Under 1.5, the clam_log_upload() function is called for each file copied in the backup procedure, generating a lot of entries in the logs table.

      Although there's nothing really bad, all those records are disturbing some moodlers viewing a lot of records without any obvious utility for them.

      Perhaps we could modify such function to save such logs only if clam is enabled...

      How does it sound?

        Activity

        Hide
        Martin Dougiamas added a comment -

        From (penny at catalyst.net.nz) Thursday, 16 June 2005, 06:54 AM:

        we could change it to only log if clam is enabled...

        I'm also wondering what the best way to differentiate between copying temp files around during backup process and actually restoring uploaded files into a new course. The latter is really only where we want the log happening.

        From Eloy Lafuente (stronk7 at moodle.org) Thursday, 16 June 2005, 08:11 AM:

        uhm. To differentiate backup and restore you'll need to pass an extra argument to the copy function. Perhaps one clam_log=false at the end could be a good solution (you will be able to decide when to set it to true outside, isn't it...

        Talking about the clam_log_upload(), a clever spanish moodler, Jose Luis D?az, has detected that exists a documented php bug in the html_entity_decode($var) (version 4.3.1) producing segmentation faults if $var is empty. He has changed line 2712 from:

        $url = html_entity_decode($url);

        to

        if ($url) $url = html_entity_decode($url);

        and his problems have disappeared. Perhaps we should add this check too...

        Ciao

        From (penny at catalyst.net.nz) Thursday, 16 June 2005, 08:29 AM:

        new option in the backup_copy_file function definition sounds good. I'll do it today.

        as far as html_entity_decode - I'm found it in datalib in the add_to_log function - is that where you mean? in any case, yup, sounds like a good idea

        From (penny at catalyst.net.nz) Thursday, 16 June 2005, 11:00 AM:

        ok, fixes to both these problems in head & 1.5

        From Eloy Lafuente (stronk7 at moodle.org) Friday, 17 June 2005, 12:02 AM:

        B-) B-)

        So, this can be closed isn't it?

        Ciao

        Show
        Martin Dougiamas added a comment - From (penny at catalyst.net.nz) Thursday, 16 June 2005, 06:54 AM: we could change it to only log if clam is enabled... I'm also wondering what the best way to differentiate between copying temp files around during backup process and actually restoring uploaded files into a new course. The latter is really only where we want the log happening. From Eloy Lafuente (stronk7 at moodle.org) Thursday, 16 June 2005, 08:11 AM: uhm. To differentiate backup and restore you'll need to pass an extra argument to the copy function. Perhaps one clam_log=false at the end could be a good solution (you will be able to decide when to set it to true outside, isn't it... Talking about the clam_log_upload(), a clever spanish moodler, Jose Luis D?az, has detected that exists a documented php bug in the html_entity_decode($var) (version 4.3.1) producing segmentation faults if $var is empty. He has changed line 2712 from: $url = html_entity_decode($url); to if ($url) $url = html_entity_decode($url); and his problems have disappeared. Perhaps we should add this check too... Ciao From (penny at catalyst.net.nz) Thursday, 16 June 2005, 08:29 AM: new option in the backup_copy_file function definition sounds good. I'll do it today. as far as html_entity_decode - I'm found it in datalib in the add_to_log function - is that where you mean? in any case, yup, sounds like a good idea From (penny at catalyst.net.nz) Thursday, 16 June 2005, 11:00 AM: ok, fixes to both these problems in head & 1.5 From Eloy Lafuente (stronk7 at moodle.org) Friday, 17 June 2005, 12:02 AM: B-) B-) So, this can be closed isn't it? Ciao

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: