MDL-62660 tool_dataprivacy: CI fixes

This commit is contained in:
Jun Pataleta 2018-08-21 09:18:00 +08:00
parent a1e1cf63fd
commit 237c85d303
3 changed files with 7 additions and 8 deletions

View File

@ -158,7 +158,7 @@ class data_request extends persistent {
$expiryseconds = get_config('tool_dataprivacy', 'privacyrequestexpiry');
$expirytime = strtotime("-{$expiryseconds} second");
$table = data_request::TABLE;
$table = self::TABLE;
$sqlwhere = 'type = :export_type AND status = :completestatus AND timemodified <= :expirytime';
$params = array(
'export_type' => api::DATAREQUEST_TYPE_EXPORT,
@ -196,7 +196,7 @@ class data_request extends persistent {
$initialparams = array(api::DATAREQUEST_STATUS_EXPIRED, time());
$params = array_merge($initialparams, $inparams);
$update = "UPDATE {" . data_request::TABLE . "}
$update = "UPDATE {" . self::TABLE . "}
SET status = ?, timemodified = ?
WHERE id $insql";

View File

@ -23,7 +23,6 @@
*/
defined('MOODLE_INTERNAL') || die();
use tool_dataprivacy\api;
/**
* Function to upgrade tool_dataprivacy.

View File

@ -115,11 +115,11 @@ class tool_dataprivacy_expired_data_requests_testcase extends data_privacy_testc
}
/**
* Test for \tool_dataprivacy\data_request::is_expired()
* Tests for the expected request status to protect from false positive/negative,
* then tests is_expired() is returning the expected response.
*/
/**
* Test for \tool_dataprivacy\data_request::is_expired()
* Tests for the expected request status to protect from false positive/negative,
* then tests is_expired() is returning the expected response.
*/
public function test_is_expired() {
$this->resetAfterTest();
\core_privacy\local\request\writer::setup_real_writer_instance();