Best practice forum (Archived)

Program NOT completing

 
? ?
Program NOT completing
by ? ? - Sunday, 27 November 2011, 9:57 PM
 

Hi,

I've created a Program with mandatory 2 courses and tested it by going through as a learner user. I can complete the 2 courses successfully, but the program status doesn't ever update and won't complete.

Currently we are using v1.1.3

thanks,

-Ira


Simon Coggins
Re: Program NOT completing
by Simon Coggins - Sunday, 27 November 2011, 11:01 PM
Group Totara

Hi Ira,

Program completion, like course completion runs on the cron, so it has to run before the progress is updated. Unfortunately currently the program management cron only runs once every day, so if it's already run that day, you may have to wait 24 hours.

Could you check again later and see if it updates?

Simon

This forum post has been removed
Monday, 28 November 2011, 12:19 AM
The content of this forum post has been removed and can no longer be accessed.
? ?
Re: Program NOT completing
by ? ? - Monday, 28 November 2011, 2:07 PM
 

Hi,

I checked it again today and it has completed. Is there any way to change this? or at a minimum change the time when it schedules?

The program we are testing will be going out to 12,000 users and it will cause lots of headaches/confusion if all of them have to wait potentially 24hrs for program completion...

-Ira

Simon Coggins
Re: Program NOT completing
by Simon Coggins - Monday, 28 November 2011, 2:35 PM
Group Totara

It can be changed by modifying the following line in /local/program/cron.php (L55):

$dailycron = 60 * 60 * 24; // one day

This gives the minimum number of seconds between runs - if you change it to 0 it will run on every cron run.

The reason we haven't changed this yet is that we have some concerns around performance of the program management cron - there are situations where the cron can generate a lot of database queries and that might impact on site performance.

We do want to change it at some point but as yet we haven't had time to look into the performance issues so we've left it as it is for now.

Simon

This forum post has been removed
Thursday, 5 January 2012, 8:06 AM
The content of this forum post has been removed and can no longer be accessed.
? ?
Re: Program NOT completing
by ? ? - Sunday, 8 January 2012, 2:43 PM
 

Hi Danielle,

I've just tried a quick test, a program with two coursesets, two courses in the first set and one in the second. It seemed to work as expected for me, but admittedly it was a pretty straightforward simple test.

Can you go over and detail the steps you took to set up your program to help us to reproduce the bug? Common problems to look out for would be the completion criteria that are set on individual activities within each course; and also that there is some sort of overall course completion criteria set (via the Completion link in the Course Administration block).

It would be easy to miss something here when setting up the courses in the coursesets, for example some activity that has completion criteria that aren't being met, or a missing/incorrect overall course completion criteria which is never being triggered - so the course is never marked as complete by the cronjob, and therefore the courseset never gets marked as complete. This may be a bug that requires a particular combination of completion criteria to be in place before it shows up, so the more information you can provide the easier it'll be for me to track this one down

Thanks,

Ciaran

This forum post has been removed
Monday, 9 January 2012, 1:04 AM
The content of this forum post has been removed and can no longer be accessed.
? ?
Re: Program NOT completing
by ? ? - Monday, 9 January 2012, 12:36 PM
 

Hi Dani,

We noticed the IE7 styling issue ourselves just before Christmas and a fix for that should be going out in the next release this week, but thanks for pointing it out anyway.

We've looked at this again, and really it does seem to come down to that 24-hour delay. The normal cronjob simply skips the program management completion checking for 24 hours after the last time it checked, so it wouldn't matter how often you run the cron within that 24 hour period, it'll still just ignore any subsequent program course, courseset etc completions. And as you noticed if you tell it to run the program completion check in every cron run then it works.

It is not ideal of course, and it is on the list of things to do, to refactor the code involved to remove performance bottlenecks on large sites. The only reason it does things with this 24-hour delay is because the current checks are very expensive in terms of database resources and really do cause performance problems for large live customers.

In the interim until we release a fix I'm afraid the only workaround is to set $dailycron to 0 in local/program/cron.php so that the program checks run all the time, though be aware of potential performance issues.

Sorry if this isn't of much help!

Thanks,

Ciaran

This forum post has been removed
Sunday, 11 March 2012, 8:29 PM
The content of this forum post has been removed and can no longer be accessed.
Craig Eves
Re: Program NOT completing
by Craig Eves (Totara Support) - Monday, 12 March 2012, 4:14 PM
Group Totara

Hi Sonia

As well as enabling the completion on the face to face activity the course needs to know what activities need to be completed to complete the course.

To do this select the course > Administration > Completions > Activities completed and make sure the Face to face is ticked.

The other thing to note is that the course completion does not happen as soon as the activity is completed. The course completion processes are run periodically to ease the load on the server, this is set usually to run nightly but depends on your site.

Craig

This forum post has been removed
Monday, 12 March 2012, 5:49 PM
The content of this forum post has been removed and can no longer be accessed.
Craig Eves
Re: Program NOT completing
by Craig Eves (Totara Support) - Monday, 12 March 2012, 6:57 PM
Group Totara

Hi Sonia

If manual completion is enabled and the self completion block is ticked then they will show on the report when the 'daily' course completion script is run.

If it doesn't another possibility is  there is a course dependency set , this means  dependent course needs to be completed first before the course can be completed.