Moodle - Where do you see task information?

0

I'm trying to change a plugin and I need to find out where the database saves task visualization information in moodle, the plugin is the progress bar and I need it urgently ...

    
asked by anonymous 05.04.2016 / 15:38

1 answer

0

The plugin of type block progress basically uses the moodle table mdl_log to find out if such component has already been visited.

Below is an example of the code used to get access to a particular component:

'pluginxxx' => array(
    'defaultTime' => 'openingtime',
    'actions' => array(
        'viewed' => array (
            'logstore_legacy'     => "SELECT id
                                        FROM {log}
                                       WHERE course = :courseid
                                         AND module = 'pluginxxx'
                                         AND action = 'view'
                                         AND cmid = :cmid
                                         AND userid = :userid",
            'sql_internal_reader' => "SELECT id
                                        FROM {log}
                                       WHERE courseid = :courseid
                                         AND component = 'mod_pluginxxx'
                                         AND action = 'viewed'
                                         AND objectid = :eventid
                                         AND userid = :userid",
        ),
    ),
    'defaultAction' => 'viewed'
)

I hope I have helped, if it is not your question, be more specific so we can help you.

    
03.05.2016 / 17:18