Best practice forum (Archived)

Duplicate programme assignments after users primary position updates

 
Billy Morrison
Duplicate programme assignments after users primary position updates
by Billy Morrison - Friday, 21 February 2014, 5:41 AM
 

Hi Everyone, 

We seem to have encountered an issue where users are being assigned to a programme multiple times after their profile/position/organisation is updated. 

Users who are assigned to an programme by their organisation or position are then being updated due to a change in this information, when the new organisation or position they are being updated to also exists in the assignments tab of the programme they are being assigned twice.

This seems to be having a knock on effect on the completion reports and the users required learning because it looks like the user isn't enrolled therefore wont show completions. 

This has been tested on Totara 2.2 and 2.5 but the problem exists within both versions. 

Any help on this would be great, 

Cheers

Billy

Ciaran Irvine (Core Developer)
Re: Duplicate programme assignments after users primary position updates
by Ciaran Irvine (Core Developer) - Sunday, 23 February 2014, 1:39 PM
 

Hi Billy,

I'm not sure I'm following you here, users can be assigned to a program under multiple assignment criteria but it shouldn't make any difference.

Users are not actually enrolled onto courses in a Program when they are assigned to the Program though - assigning them to the program just means they can access the course through the program enrolment plugin (depending on the courseset workflow). They are only actually enrolled, and so completion records are only created, when they try to access the course for the first time.

Billy Morrison
Re: Duplicate programme assignments after users primary position updates
by Billy Morrison - Monday, 24 February 2014, 1:48 AM
 

Sorry Ciaran, 

My explanation was as clear as mud :)

We have users who are assigned to a programme by their organisation level currently, the porogramme is setup so the assignments are taking all users from beneath 6 organisations and bringing in all child organisations beneath them also. 

When a user us assigned through any organisation like 'Org 1 or beneath' it works as expected and the user gets enrolled on the courses within the programme as they access them. When they are assigned like this the programme appears within their required learning tab and as the user completes courses within the progress bar percentage moves up.

The problem that I am having is when a user moves organisation and is then assigned to the same programme again for a second or third time. So if the same user above gets moved to Org 2 and then some time later to Org 3 then they are assigned to the same programme 3 times. I have also found lately that when the users are assigned multiple times that there are issues with the programme showing completion. The users are enrolled on the courses with the programme enrolment type but their completion is not showing. Any user that is only assigned once to the programme is not having this problem.

Should the system not look at the user before the programme assignment and recognise that they are already assigned through another rule?

Is there some incompatibility due to original assignments by org, position, start and completion dates when the users assignment is then duplicated by another rule?

Any help on this would be great, I hope this is clearer :)

Cheers

Billy

 

Ciaran Irvine (Core Developer)
Re: Duplicate programme assignments after users primary position updates
by Ciaran Irvine (Core Developer) - Monday, 24 February 2014, 6:25 PM
 

Strange, I'm still not seeing this (on 2.5).

I have a program with three organisation assignments of three different organisations plus "all below". Then I add a user to one of the organisations. The program daily cron adds them to the program.

Then I move the user to another organisation, and when the program daily cron next runs then their assignment under the original organisation is removed and the assignment under the new organisation is added.

Unless...ah yes, if two rules are pointing at organisations in the same branch of the org tree then assignments are added twice. e.g. if Org1 has a child Org2, and then both Org1 and Org2 are added as program assignments with the Org1 rule having the "all below" rule checked, then if a user moves from Org1 to Org2 both rules apply and they end up with two assignments.

I'll see if I can add some extra checks to stop this happening. I suppose we'll also need an upgrade script to clean up any existing duplications...

Ciaran Irvine (Core Developer)
Re: Duplicate programme assignments after users primary position updates
by Ciaran Irvine (Core Developer) - Monday, 24 February 2014, 7:37 PM
 

On further examination the code is supposed to allow multiple assignments, as a particular user may lose access under one rule, but still be included in another, so the Program would still be required learning and so all the potential assignment routes need to be tracked.

The user totals on the Program assignment tab are a bit unclear/misleading, maybe it should make it clearer that there are x distinct unique learners under all the assignment rules.

However I couldn't replicate your completion issues (on 2.5) for users with multiple assignments....is it perhaps the case that an exception is being raised by one of the rules for some of these users? If a user has any outstanding exceptions they won't be enrolled in the program properly and program completion will not be tracked.

Is there a particular screen/report that is not showing program completion when a user has multiple assignments, or is it all the completion progress screens?