/**
  * Adds event type, h5p library and timestamp to event before saving it.
  *
  * @param string $type
  *  Name of event to log
  * @param string $library
  *  Name of H5P library affacted
  */
 function __construct($type, $sub_type = NULL, $content_id = NULL, $content_title = NULL, $library_name = NULL, $library_version = NULL)
 {
     // Track the user who initiated the event as well
     $current_user = wp_get_current_user();
     $this->user = $current_user->ID;
     parent::__construct($type, $sub_type, $content_id, $content_title, $library_name, $library_version);
 }
示例#2
0
 /**
  * Adds event type, h5p library and timestamp to event before saving it.
  *
  * @param string $type Name of event type
  * @param string $sub_type Name of event sub type
  * @param string $content_id Identifier for content affected by the event
  * @param string $content_title Content title (makes it easier to know which content was deleted etc.)
  * @param string $library_name Name of the library affected by the event
  * @param string $library_version Library version
  */
 function __construct($type, $sub_type = NULL, $content_id = NULL, $content_title = NULL, $library_name = NULL, $library_version = NULL)
 {
     global $USER;
     // Track the who initiated the event
     $this->user = $USER->id;
     parent::__construct($type, $sub_type, $content_id, $content_title, $library_name, $library_version);
 }