|  | 
|  | __construct (\tool_log\log\manager $manager) | 
|  | 
|  | dispose () | 
|  | 
|  | get_description () | 
|  | Longer description of the log data source.  More... 
 | 
|  | 
|  | get_events_select ($selectwhere, array $params, $sort, $limitfrom, $limitnum) | 
|  | 
|  | get_events_select_count ($selectwhere, array $params) | 
|  | 
|  | get_events_select_iterator ($selectwhere, array $params, $sort, $limitfrom, $limitnum) | 
|  | Fetch records using given criteria returning a Traversable object.  More... 
 | 
|  | 
|  | get_log_event ($data) | 
|  | Returns an event from the log data.  More... 
 | 
|  | 
|  | get_name () | 
|  | Localised name of the reader.  More... 
 | 
|  | 
|  | is_logging () | 
|  | Are the new events appearing in the reader?  More... 
 | 
|  | 
|  | legacy_add_to_log ($courseid, $module, $action, $url, $info, $cm, $user, $ip=null, $time=null) | 
|  | Legacy add_to_log() code.  More... 
 | 
|  | 
|  | 
| string const | CRUD_REGEX = "/(crud).*?(<>|=|!=).*?'(.*?)'/s" | 
|  | Regex to replace the crud params. 
 | 
|  | 
|  | 
| static | replace_crud ($match) | 
|  | Generate a replace string for crud related sql conditions.  More... 
 | 
|  | 
| static | replace_sql_legacy ($selectwhere, array $params, $sort='') | 
|  | This method contains mapping required for Moodle core to make legacy store compatible with other sql_reader based queries.  More... 
 | 
|  | 
◆ __construct()
- Deprecated:
- since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead. 
- Todo:
- MDL-52805 This is to be removed in Moodle 4.0
- Parameters
- 
  
  
 
 
◆ dispose()
      
        
          | logstore_legacy\log\store::dispose | ( |  | ) |  | 
      
 
 
◆ get_description()
  
  | 
        
          | core\log\reader::get_description | ( |  | ) |  |  | inherited | 
 
Longer description of the log data source. 
- Return values
- 
  
  
 
 
◆ get_events_select()
      
        
          | logstore_legacy\log\store::get_events_select | ( |  | $selectwhere, | 
        
          |  |  | array | $params, | 
        
          |  |  |  | $sort, | 
        
          |  |  |  | $limitfrom, | 
        
          |  |  |  | $limitnum | 
        
          |  | ) |  |  | 
      
 
- Deprecated:
- since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead. 
- Todo:
- MDL-52805 This will be removed in Moodle 4.0
- Parameters
- 
  
    | string | $selectwhere |  |  | array | $params |  |  | string | $sort |  |  | int | $limitfrom |  |  | int | $limitnum |  |  
 
- Return values
- 
  
  
Implements core\log\sql_reader.
 
 
◆ get_events_select_count()
      
        
          | logstore_legacy\log\store::get_events_select_count | ( |  | $selectwhere, | 
        
          |  |  | array | $params | 
        
          |  | ) |  |  | 
      
 
 
◆ get_events_select_iterator()
      
        
          | logstore_legacy\log\store::get_events_select_iterator | ( |  | $selectwhere, | 
        
          |  |  | array | $params, | 
        
          |  |  |  | $sort, | 
        
          |  |  |  | $limitfrom, | 
        
          |  |  |  | $limitnum | 
        
          |  | ) |  |  | 
      
 
Fetch records using given criteria returning a Traversable object. 
- Deprecated:
- since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead. 
- Todo:
- MDL-52805 This will be removed in Moodle 4.0
Note that the traversable object contains a moodle_recordset, so remember that is important that you call close() once you finish using it.
- Parameters
- 
  
    | string | $selectwhere |  |  | array | $params |  |  | string | $sort |  |  | int | $limitfrom |  |  | int | $limitnum |  |  
 
- Return values
- 
  
    | Traversable|core::event::base[] |  |  
 
Implements core\log\sql_reader.
 
 
◆ get_log_event()
      
        
          | logstore_legacy\log\store::get_log_event | ( |  | $data | ) |  | 
      
 
 
◆ get_name()
  
  | 
        
          | core\log\reader::get_name | ( |  | ) |  |  | inherited | 
 
Localised name of the reader. 
To be used in selection for in reports.
- Return values
- 
  
  
 
 
◆ is_logging()
      
        
          | logstore_legacy\log\store::is_logging | ( |  | ) |  | 
      
 
Are the new events appearing in the reader? 
- Deprecated:
- since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead. 
- Todo:
- MDL-52805 This will be removed in Moodle 4.0
- Return values
- 
  
    | bool | true means new log events are being added, false means no new data will be added |  
 
Implements core\log\reader.
 
 
◆ legacy_add_to_log()
      
        
          | logstore_legacy\log\store::legacy_add_to_log | ( |  | $courseid, | 
        
          |  |  |  | $module, | 
        
          |  |  |  | $action, | 
        
          |  |  |  | $url, | 
        
          |  |  |  | $info, | 
        
          |  |  |  | $cm, | 
        
          |  |  |  | $user, | 
        
          |  |  |  | $ip = null, | 
        
          |  |  |  | $time = null | 
        
          |  | ) |  |  | 
      
 
Legacy add_to_log() code. 
- Deprecated:
- since Moodle 3.1 MDL-45104 - Please use supported log stores such as "standard" or "external" instead. 
- Todo:
- MDL-52805 This will be removed in Moodle 3.3
- Parameters
- 
  
    | int | $courseid | The course id |  | string | $module | The module name e.g. forum, journal, resource, course, user etc |  | string | $action | 'view', 'update', 'add' or 'delete', possibly followed by another word to clarify. |  | string | $url | The file and parameters used to see the results of the action |  | string | $info | Additional description information |  | int | $cm | The course_module->id if there is one |  | int | stdClass | $user | If log regards $user other than $USER |  | string | $ip | Override the IP, should only be used for restore. |  | int | $time | Override the log time, should only be used for restore. |  
 
 
 
◆ replace_crud()
  
  | 
        
          | static logstore_legacy\log\store::replace_crud | ( |  | $match | ) |  |  | staticprotected | 
 
Generate a replace string for crud related sql conditions. 
This function is called as callback to preg_replace_callback() on the actual sql.
- Parameters
- 
  
    | array | $match | matched string for the passed pattern |  
 
- Return values
- 
  
    | string | The sql string to use instead of original |  
 
 
 
◆ replace_sql_legacy()
  
  | 
        
          | static logstore_legacy\log\store::replace_sql_legacy | ( |  | $selectwhere, |  
          |  |  | array | $params, |  
          |  |  |  | $sort = '' |  
          |  | ) |  |  |  | staticprotected | 
 
This method contains mapping required for Moodle core to make legacy store compatible with other sql_reader based queries. 
- Parameters
- 
  
    | string | $selectwhere | Select statment |  | array | $params | params for the sql |  | string | $sort | sort fields |  
 
- Return values
- 
  
    | array | returns an array containing the sql predicate, an array of params and sorting parameter. |  
 
 
 
◆ $standardtolegacyfields
  
  | 
        
          | array logstore_legacy\log\store::$standardtolegacyfields |  | staticprotected | 
 
Initial value:= array(
        'timecreated'       => 'time',
        'courseid'          => 'course',
        'contextinstanceid' => 'cmid',
        'origin'            => 'ip',
        'anonymous'         => 0,
    )
list of db fields which needs to be replaced for legacy log query 
 
 
The documentation for this class was generated from the following file:
- admin/tool/log/store/legacy/classes/log/store.php