Best practice forum (Archived)

This forum discussion has been removed

 
This forum post has been removed
Tuesday, 12 November 2013, 10:41 AM
The content of this forum post has been removed and can no longer be accessed.
Wesley Holden
Re: I'm pretty sure this is a bug
by Wesley Holden - Tuesday, 12 November 2013, 11:23 AM
 

See below for the debug screenshot from 2.5.0. I've duplicated this one in 2.5.1 as well. The error only seems to occur when accessing a position that is a child of another; the highest in the hierarchy doesn't get the error.

Thanks!


Nathan Lewis
Re: I'm pretty sure this is a bug
by Nathan Lewis - Tuesday, 12 November 2013, 12:35 PM
Group Totara

Hi Lori.

This is an easy one. "mod" is a reserved word in some databases. We'll get a patch in to the next release. Until then, if you want to fix it manually then open totara/hierarchy/prefix/goal/lib.php and in the function "check_parent_assignments" change the three instances of the word "mod" to "module". When done, it should look like this:

            $sql = "SELECT ga.*, g.fullname, module.fullname as parentname
                    FROM {{$table}} ga
                    LEFT JOIN {goal} g
                        ON g.id = ga.goalid
                    LEFT JOIN {{$prefix}} module
                        ON ga.{$field} = module.id
                    WHERE ga.{$field} = ?
                    AND ga.includechildren = 1";

Let me know if you'd prefer that I send you a patch.

Nathan

Wesley Holden
Re: I'm pretty sure this is a bug
by Wesley Holden - Tuesday, 12 November 2013, 6:07 PM
 

Thanks Nathan! I can do the manual edit; Liz, would the patch be helpful for you in the meantime?

This forum post has been removed
Tuesday, 12 November 2013, 6:37 PM
The content of this forum post has been removed and can no longer be accessed.
Nathan Lewis
Re: I'm pretty sure this is a bug
by Nathan Lewis - Tuesday, 12 November 2013, 6:39 PM
Group Totara

Hi Liz.

A new thread(s) is probably a good idea.

Nathan

David Curry (Core Developer)
Re: I'm pretty sure this is a bug
by David Curry (Core Developer) - Monday, 25 November 2013, 7:17 PM
Group Totara

Hey Everyone,

Just to let you know that Nathan's fix was included in todays release of Totara 2.5.2, and if you haven't made a small code customisation to fix it you can upgrade to the latest 2.5 to fix the issue.

Cheers,
David