Best practice forum (Archived)

Dynamic audience not refreshed?

 
Marta Santamaria
Dynamic audience not refreshed?
by Marta Santamaria - Wednesday, 12 March 2014, 3:02 AM
 

Hi all,

I've created a dynamic audience based on completion of a program. A learner has finished the program but he doesn't belong to the audience.

I've executed cron but the audience is still empty. What have I done wrong?

 

Thanks in advance,

Marta

? ?
Re: Dynamic audience not refreshed?
by ? ? - Wednesday, 12 March 2014, 6:46 AM
 

Not every cron job runs when you execute cron. Some things have their own schedule and I believe Audience assignment will wait for up to six hours.

Marta Santamaria
Re: Dynamic audience not refreshed?
by Marta Santamaria - Wednesday, 12 March 2014, 10:29 AM
 

Thanks, Alan,

I've been waiting for more than 6 hours (in fact, for more than one day) and the audience doesn't contain the users who have finished the program. Any idea?

 

Thanks again,

Marta

? ?
Re: Dynamic audience not refreshed?
by ? ? - Wednesday, 12 March 2014, 7:31 PM
 

Hi Marta,

I believe there may be a bug in the Audience Program Completion rule when you only have one program selected. I'll investigate further.

A dynamic audience should pick up the currently-completed users as soon as you add and approve the rule, then if the Audience Sync enrolment plugin is enabled (Site Administration -> Plugins -> Enrolments) then that should run and sync the audience members once an hour.

? ?
Re: Dynamic audience not refreshed?
by ? ? - Thursday, 13 March 2014, 4:16 AM
 

Hi all,

I could reproduce the problem in one of our systems and it looks like a bug to me.

What I found playing around in the DB is that it seems to be connected to the additional DB-entries for coursesets in the prog_completion table. When a user completes a program with one course set in it there are two entries in the DB table - as opposed to one entry for a completed course in the respective table. If I'm not mistaken the same function is used for creating the SQL where-clause for programs and courses.

I hope that helps.

All the best,

Tobias

? ?
Re: Dynamic audience not refreshed?
by ? ? - Thursday, 13 March 2014, 3:34 PM
 

Thanks Tobias,

Yeah my investigations led me to the same place, overall program completion is stored on the record where coursesetid=0, status=1 and timecompleted>0 but the current audience rules only check for timecompleted across all coursesets, so programs with multiple coursesets may go a bit wrong.

I have a patch in review for testing so hopefully this will get fixed in one of the upcoming point releases.

Marta Santamaria
Re: Dynamic audience not refreshed?
by Marta Santamaria - Friday, 14 March 2014, 1:16 AM
 

Hi Ciaran and Tobias,

Audience Sync was enabled. So, as you point out it seems a bug.

We're waiting for the patch.

Thank you,

Marta

? ?
Re: Dynamic audience not refreshed?
by ? ? - Monday, 17 March 2014, 9:08 PM
 

A fix for this issue was included in today's (18 March 2014) release of Totara 2.5.10

Marta Santamaria
Re: Dynamic audience not refreshed?
by Marta Santamaria - Friday, 21 March 2014, 5:27 AM
 

Thank you, Ciaran, now it works!

? ?
Re: Dynamic audience not refreshed?
by ? ? - Monday, 7 April 2014, 7:05 PM
 

A fix for this issue was included in today's (8th April 2014) release of Totara 2.4.19

? ?
Re: Dynamic audience not refreshed?
by ? ? - Monday, 21 April 2014, 8:52 PM
 

A fix for this issue was included in today's (22nd April 2014) release of Totara 2.2.28