Best practice forum (Archived)
该论坛讨论已删除
Hi Luke,
That does sound like a bug - can you tell me which report(s) the deleted users are showing up in and I'll look into it.
Simon
Hi Simon. Luke
Did you get to the bottom of this one? Ive just picked up the same problem on my reports. and before i start messing about in the files i want to check with you guys.
Kind regards
Bodo
I'm not able to reproduce the problem with the 'Team Members' report.
Which report / report source is this happening with?
Simon
Hi Simon
I am using the 'User' source and created a report on user locations, its showing deleated users within the report.
Kind regards
Bodo
Hi Bodo
I tried in demo.totaralms.com with the user source and the deleted user did appear in the report.
The deleted username is changed to the email address with a number appended eg craig@nomail.com.1314045682
When a user is marked for deletion some of the data is changed by Totara and some of the user record is kept.
In the short term the data source needs to be changed to exclude deleted users and in the longer term a nicer way to delete records should be found . Maybe just making a student inactive rather than deleting is a better way to do this.
Craig
Yes, there's a few different issues here that we need to consider how best to handle:
- Should we show or hide deleted users when viewing a list of users? I think by default we should hide them, there is a question as to if it should be possible to show them.
- When a user is deleted, should we delete all the data associated with their account. For example course completion records, competency evidence etc. Moodle chooses not to delete this info and I would tend to agree it makes sense to keep for historical reasons.
- If that's the case, we need to decide if reports should always show data for deleted users, never show it, or provide it as an option
- The same questions arise for inactive users - how do you mark a user as inactive, how do we know that when reporting and should we provide similar options for hiding data belonging to inactive users
- Deleted users and their data is preserved but always hidden in reports
- Inactive users and their data can be optionally shown or hidden in reports (greyed out if shown)
- Users should only be marked as deleted if you never want them back and you are not interested in data associated with them.
- Users should be marked as inactive if you may want to restore the account, and/or you want historical data to remain in the system.
Summary of how we handle departed staff
What we do
We never delete user accounts (with exceptions for test & duplicates accounts).
We keep all course pages (with exceptions of test & play/practice pages) and those not required or current become ‘archived’ in a Category that is not accessible by staff – but does means their Completion Status and Grade is still visible in their Record of Learning.
We use LDAP for authentication (currently Novell’s eDirectory but in next few months we move to Active Directory). A field, populated from our HRMIS to LDAP, shows whether the account is ‘enabled’ or ‘disabled’ which we map to a custom field in the user profile.
We sync to LDAP on each user login and sync overnight. Our LDAP process recently changed and departing staff are deleted from LDAP and not ‘disabled’. We have an open request with our Totara partner to add a script that detects that a user account hasn’t matched an LDAP record over five successful sync’s and then marks the account as ‘disabled’.
We then use this field to hide ‘disabled’ staff in most areas where the view is via the Totara report builder e.g. My Team, reports by business group/unit, and custom reports about Trainer performance / groups of courses.
However, in our standard Moodle based reports (course page level Grades & Feedback summary etc) the users with the ‘disabled’ value are included and a column indicating the users status is shown.
Rationale
Like most Government Departments we are subject to questions in the house (our Parliament) on spend and time costs of training, seminars & conferences. In 1999 a Chief Executive was sacked over chartering a plane to transport staff to a conference in an upmarket venue (to be fair the venue was at a bargain price and she was mislead over the plane cost) but she had little data to back up her position (and waited too long to explain to the media). While that’s 11 years ago opposition parties still explore this area of expenditure and we’re expected to be able to provide comprehensive data.
We also provide for internal audiences time based comparisons around training participation and outcomes. These comparisons are very different if you exclude staff who have since left (we have high-ish turnover in the first 18 months but lower than average turnover after this length of service).
We re-hire staff – admittedly this is mostly fixed-term and contracting staff. None the less we use the LMS to maintain records that they have completed our compulsory courses and required business specific courses. Deleting their records would mean having to run duplicate records of training participation and have the administrative cost of re-importing this data into the LMS.
We don’t show ‘disabled’ staff in Totara report builder views as the user tends to be accessing pre-formatted reports and often isn’t aware that is report based view. The reverse is true of the standard Moodle reports – as they are only accessible via those with administrative permissions and often as not want to include or compare data of staff who have left the organisation.
Cheers
Austen
It does seem a good idea to not delete data where possible but just to mark the record as deleted to allow the analysis of historic data.
Eventually this could lead to performance problems - what would be a good idea is to store the non current data separate to the working database so analysis can be done on this without affecting performance of the Totara system (a data warehouse)
Has any thought been given on how to create a data warehouse for Totara and whether this might be worthwhile. I know its early days but probably needs to be thought about.
Craig
We also keep all historical data for active and "deleted" users (more then 10 eyars).
In the reports we do not show any data about "deleted" users(except statistic).
We do not allow any operations with "deleted" users in the system.
But in case we rehire user he has all history information.
Thanks
OK guys thank you!
Using your explanation I have now filtered out "deleted" users by adding a filter: Username does not contain @
Inversely if i want to report on "deleted" users i can add a filter
Username does contain @
Is there a way of defaulting the filters values on reports?
Kind regards
Bodo
Once you've applied a filter you can create a 'saved report', which is just a link to that report with the filters applied.
Perform the search, then click the 'Save this search' button. you can give your search a name, and choose it is is private (only you can see it) or public (available to any other user who can see the report).
Once saved you should see a pulldown menu to give you access to all saved searches for a report, and you can bookmark the URL to quickly get back to that particular search.
Simon
Just to update everyone, after some careful thought we've decided to hide records belonging to deleted users in all report sources.
The records will remain in the database but won't be shown by report builder reports. If you want to disable a user but still view their records we suggest you set the 'authentication method' to 'nologin', which will disable the account but keep the records visible.
This change will be in the next version of each release (1.0.31 and 1.0.10).
Simon
Hi Simon
I've got a client with deleted users still appearing in competency reports - did that one get missed?
Thanks
Nigel
Hi Nigel,
I'm afraid that it proved to be much more difficult than we originally anticipated so the patch didn't make it through review. Apologies for not updating this post.
We need more time to figure out an approach that will work for all organisations (not everyone wants deleted users hidden so it needs to be a configuration option).
Simon
Hi Mark,
Looking at that branch, it implemented hiding deleted users by hardcoding it into each report. The problem is that some organisations want to show them and others want to hide them! So there isn't really much in that branch that would be useful.
Instead we'd prefer to create a new content restriction that can be included by different sources. That would allow different organisations to set it differently and even configure individual reports differently if they want.
I've attached a mockup of what the content restriction might look like.
If you were able to implement this and send us a copy we would definitely be interested in adding it to core totara.
Simon
With todays (11 Apr 2013) release of Totara 2.2.17 we have added a 'User Status' filter to report builder reports. This lets you filter by 'Deleted users only' and 'Active users only', it isn't a full fix but hopefully this helps.
Cheers
David
We've had a client request this same feature, Also I've found some plus ones in this [https://totara.community/mod/forum/discuss.php?d=18015] discussion for the same feature.
Is there an official way to add a vote for this feature (adding a content option for showing records by user status) ?
Also is it possible as a subscriber/partner to get access to the branch you mentioned (where the "don't show deleted users' records" is hardcoded into each report) as we'd like to implement this in one client's installation?
Gavin