From 98a3eeb5dc9aa2ed7966a4aae917943c27b63776 Mon Sep 17 00:00:00 2001
From: Justus Dieckmann <justusdieckmann@wwu.de>
Date: Mon, 16 Sep 2019 23:28:21 +0200
Subject: [PATCH] Coding style fixes
---
classes/local/table/interaction_remaining_table.php | 2 +-
classes/privacy/provider.php | 2 +-
tests/privacy_test.php | 2 --
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/classes/local/table/interaction_remaining_table.php b/classes/local/table/interaction_remaining_table.php
index d182632..409c888 100644
--- a/classes/local/table/interaction_remaining_table.php
+++ b/classes/local/table/interaction_remaining_table.php
@@ -164,7 +164,7 @@ class interaction_remaining_table extends interaction_table {
}
// Otherwise, show latest action commited by user.
global $CFG;
- if($row->userid === -1) {
+ if ($row->userid === -1) {
$userlink = get_string("anonymous_user");
} else {
$userlink = \html_writer::link($CFG->wwwroot . '/user/profile.php?id=' . $row->userid, fullname($row));
diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php
index d2905a6..350cea4 100644
--- a/classes/privacy/provider.php
+++ b/classes/privacy/provider.php
@@ -148,7 +148,7 @@ class provider implements
public static function get_users_in_context(userlist $userlist) {
$context = $userlist->get_context();
if ($context instanceof \context_system) {
- $sql = "SELECT userid
+ $sql = "SELECT userid
FROM {tool_lifecycle_action_log}";
$userlist->add_from_sql('userid', $sql, array());
}
diff --git a/tests/privacy_test.php b/tests/privacy_test.php
index cce99ec..f9046e0 100644
--- a/tests/privacy_test.php
+++ b/tests/privacy_test.php
@@ -174,7 +174,6 @@ class tool_lifecycle_privacy_test extends provider_testcase {
$u1 = $this->getDataGenerator()->create_user();
$u2 = $this->getDataGenerator()->create_user();
-
$p1 = $this->generator->create_process($c1->id, $this->workflow->id);
$p2 = $this->generator->create_process($c2->id, $this->workflow->id);
@@ -187,7 +186,6 @@ class tool_lifecycle_privacy_test extends provider_testcase {
$this->setUser($u2);
interaction_manager::handle_interaction($this->emailstep->id, $p2->id, self::ACTION_KEEP);
-
$contextlist = new approved_contextlist($u1, 'tool_lifecycle', [1]);
provider::delete_data_for_user($contextlist);
$this->assertEquals(0, $DB->count_records_select('tool_lifecycle_action_log', "userid = $u1->id"));
--
GitLab