Best practice forum (Archived)

Dynamic audience not refreshed?

 
SantamariaMarta
Dynamic audience not refreshed?
SantamariaMarta 发表于 2014年03月12日 Wednesday 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?
?? 发表于 2014年03月12日 Wednesday 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.

SantamariaMarta
Re: Dynamic audience not refreshed?
SantamariaMarta 发表于 2014年03月12日 Wednesday 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?
?? 发表于 2014年03月12日 Wednesday 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.

PilsTobias
Re: Dynamic audience not refreshed?
PilsTobias 发表于 2014年03月13日 Thursday 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?
?? 发表于 2014年03月13日 Thursday 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.

SantamariaMarta
Re: Dynamic audience not refreshed?
SantamariaMarta 发表于 2014年03月14日 Friday 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?
?? 发表于 2014年03月17日 Monday 21:08
 

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

SantamariaMarta
Re: Dynamic audience not refreshed?
SantamariaMarta 发表于 2014年03月21日 Friday 05:27
 

Thank you, Ciaran, now it works!

??
Re: Dynamic audience not refreshed?
?? 发表于 2014年04月7日 Monday 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?
?? 发表于 2014年04月21日 Monday 20:52
 

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