External log store

Issue #40 new
Former user created an issue

Hi!

Can I configure Course Dedication block to use external database store and not Standard log? We have transferd logs to external database because od size, but Course Dedication is looking only into Stanard log store. Can we change this?

Thank you.

Ivica

Comments (3)

  1. Aday Talavera

    Do you have enabled in Moodle both log stores or even more stores?

    In dedication_lib.php in class block_dedication_utils and method get_events_select the code process log entries for each log readers.

    $allreaders = get_log_manager()->get_readers();

    So if you have enabled this log stores, the module should do its job as intended.

  2. Ivica Matotek

    Hi!

    this is code:

    class block_dedication_utils {

    ‌ public static $logstores = array('logstore_standard', 'logstore_legacy');

    ‌ public static function get_events_select($selectwhere, array $params) {

    ‌ $return = array();

    ‌ static $allreaders = null;

    ‌ if (is_null($allreaders)) {

    ‌ $allreaders = get_log_manager()->get_readers();

    ‌ }

    ‌ $processedreaders = 0;

    What I have to change?

    Thank you.

    Ivica

  3. Aday Talavera

    You are right, you need to add the external logstore to this list. Right now I don’t know the right value to put there.

    Should be somethind like “logstore_external” or something like that.

    public static $logstores = array('logstore_standard', 'logstore_legacy');

    I will try to improve this section of code to query by default all the enabled logstores and to be able to enable or disable specific logstores.

  4. Log in to comment