Best practice forum (Archived)

Cron error when groups_add_member() function

 
Pablo Piquemilh
Cron error when groups_add_member() function
بواسطة Tuesday, 24 September 2013, 3:28 PM - Pablo Piquemilh
مجموعة Partners

Hello , We have an error when we execute the cron : Fatal error: Call to undefined function groups_add_member() in /home/academia/public_html/enrol/cohort/locallib.php on line 361 The cron stops and can not be completed, how I can fix this?

What we have seen is that this behavior appears when we have configured out before the Cron runs, Goups & Grouping in different course and we enroll users using a dynamic cohort to the course and we suscribe that cohort to the respective Group. Then Cron stops with the error mentioned at the top of this message.

This still happened on a Totara LMS Versión 2.4.1 (Build: 20130514.00).

 

Thanks

Pablo

me
Re: Cron error when groups_add_member() function
بواسطة Tuesday, 24 September 2013, 7:22 PM - George Angus
مجموعة Totara

Hi Pablo,

Can you save the entire output of Cron and email it to me?

Thanks,

George.

Pablo Piquemilh
Re: Cron error when groups_add_member() function
بواسطة Wednesday, 25 September 2013, 6:09 PM - Pablo Piquemilh
مجموعة Partners

Thanks George, I´m sending you the entire output tomorrow morning.

Pablo

Pablo Piquemilh
Re: Cron error when groups_add_member() function
بواسطة Thursday, 26 September 2013, 12:09 PM - Pablo Piquemilh
مجموعة Partners

I'm sending you the complete output.

David Curry (Core Developer)
Re: Cron error when groups_add_member() function
بواسطة Thursday, 26 September 2013, 3:44 PM - David Curry (Core Developer)
مجموعة Totara

Hey Pablo,

I've had a look into this and you're right if you have an audience sync set to automatically add to a group the cron has issues, thankfully this one is an easy fix. I've got a patchset in review but if you want you can make the changes locally for now, it's only a one line fix.

If you access the code in dirroot/enrol/cohort/locallib.php you'll see the follwing
28 require_once($CFG->dirroot . '/enrol/locallib.php');
29 require_once($CFG->dirroot . '/totara/cohort/lib.php');
Just add the following line below that
require_once($CDF->dirroot . '/group/lib.php');
And run the cron again, everything should be back up and working.

Cheers,
David

لقد تمت إزالة مشاركة المنتدى هذه
Monday, 30 September 2013, 10:30 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها