Commit 51b5b5b3 authored by Kristina Hoeppner's avatar Kristina Hoeppner Committed by Robert Lyon
Browse files

Bug 1692385: Add human-readable lang strings for last activity

In the report "User activity", one column displays
the last activity. Human-readable language strings
have been created to make it easier for people to
understand the activity.

behatnotneeded

Change-Id: I877394edbf41606b0d0f98bde7e05250aaa99843
(cherry picked from commit a09deac5)
parent 09dbc2f4
...@@ -283,6 +283,42 @@ $string['reportdescpageactivity'] = '<ul> ...@@ -283,6 +283,42 @@ $string['reportdescpageactivity'] = '<ul>
</ul>'; </ul>';
$string['allothers'] = 'All others'; $string['allothers'] = 'All others';
// Last activities reported on in the "User activity" report
$string['blockinstancecommit'] = 'Add a block to a page';
$string['addfriend'] = 'Add a friend';
$string['activateuser'] = 'Activate a user';
$string['clearcaches'] = 'Clear the cache';
$string['sharedcommenttogroup'] = 'Comment on a page shared with a group';
$string['createcollection'] = 'Create a collection';
$string['creategroup'] = 'Create a group';
$string['createview'] = 'Create a page';
$string['createuser'] = 'Create a user';
$string['deactivateuser'] = 'Deactivate a user';
$string['deleteartefact'] = 'Delete an artefact';
$string['deleteartefacts'] = 'Delete artefacts';
$string['deleteblockinstance'] = 'Delete a block from a page';
$string['deletecollection'] = 'Delete a collection';
$string['removefriendrequest'] = 'Delete a friend request';
$string['deleteview'] = 'Delete a page';
$string['deleteuser'] = 'Delete a user';
$string['expireuser'] = 'Expire a user';
$string['userjoinsgroup'] = 'Join a group';
$string['login'] = 'Logged in';
$string['loginas'] = 'Masquerade as a user';
$string['releasesubmission'] = 'Release a submission';
$string['removefriend'] = 'Remove a friend';
$string['saveartefact'] = 'Save an artefact';
$string['saveview'] = 'Save a page';
$string['addfriendrequest'] = 'Send a friend request';
$string['addsubmission'] = 'Submit a portfolio';
$string['suspenduser'] = 'Suspend a user';
$string['undeleteuser'] = 'Undelete a user';
$string['unexpireuser'] = 'Unexpire a user';
$string['unsuspenduser'] = 'Unsuspend a user';
$string['updatecollection'] = 'Update a collection';
$string['updateuser'] = 'Update a user';
$string['updateviewaccess'] = 'Update the portfolio access';
// Group reports // Group reports
$string['reportdescgroups'] = '<ul> $string['reportdescgroups'] = '<ul>
<li>ID</li> <li>ID</li>
......
...@@ -982,7 +982,8 @@ function useractivity_stats_table($limit, $offset, $extra, $institution, $urllin ...@@ -982,7 +982,8 @@ function useractivity_stats_table($limit, $offset, $extra, $institution, $urllin
$obj->collections = !empty($aggmap[$item['key'] . '|createcollection']) ? $aggmap[$item['key'] . '|createcollection'] : 0; $obj->collections = !empty($aggmap[$item['key'] . '|createcollection']) ? $aggmap[$item['key'] . '|createcollection'] : 0;
$obj->groups = !empty($aggmap[$item['key'] . '|creategroup']) ? $aggmap[$item['key'] . '|creategroup'] : 0; $obj->groups = !empty($aggmap[$item['key'] . '|creategroup']) ? $aggmap[$item['key'] . '|creategroup'] : 0;
$obj->logins = !empty($aggmap[$item['key'] . '|login']) ? $aggmap[$item['key'] . '|login'] : 0; $obj->logins = !empty($aggmap[$item['key'] . '|login']) ? $aggmap[$item['key'] . '|login'] : 0;
$obj->lastactivity = get_field('event_log', 'event', 'id', $item['LastActivity']['value']); $lastactivity = get_field('event_log', 'event', 'id', $item['LastActivity']['value']);
$obj->lastactivity = ($lastactivity) ? get_string($lastactivity, 'statistics') : '';
$obj->profileurl = profile_url($item['key']); $obj->profileurl = profile_url($item['key']);
$date = $item['LastLogin']['value'] / 1000; // convert from UTC milliseconds $date = $item['LastLogin']['value'] / 1000; // convert from UTC milliseconds
$timezone = new DateTimeZone(date_default_timezone_get()); // get timezone we are in $timezone = new DateTimeZone(date_default_timezone_get()); // get timezone we are in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment