Best practice forum (Archived)

Dynamic audience not refreshed?

 
Marta Santamaria
Dynamic audience not refreshed?
de Marta Santamaria - Wednesday, 12 de March de 2014, 03:02
 

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?
de ? ? - Wednesday, 12 de March de 2014, 06:46
 

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?
de Marta Santamaria - Wednesday, 12 de March de 2014, 10:29
 

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?
de ? ? - Wednesday, 12 de March de 2014, 19:31
 

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.

Tobias Pils
Re: Dynamic audience not refreshed?
de Tobias Pils - Thursday, 13 de March de 2014, 04:16
 

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?
de ? ? - Thursday, 13 de March de 2014, 15:34
 

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?
de Marta Santamaria - Friday, 14 de March de 2014, 01:16
 

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?
de ? ? - Monday, 17 de March de 2014, 21:08
 

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?
de Marta Santamaria - Friday, 21 de March de 2014, 05:27
 

Thank you, Ciaran, now it works!

? ?
Re: Dynamic audience not refreshed?
de ? ? - Monday, 7 de April de 2014, 19:05
 

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

? ?
Re: Dynamic audience not refreshed?
de ? ? - Monday, 21 de April de 2014, 20:52
 

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