Best practice forum (Archived)

La discussione è stata rimossa.

 
L'intervento è stato rimosso
Tuesday, 12 November 2013, 10:41
Il contenuto di questo intervento è stato rimosso, non è più possibile visualizzarlo.
Wesley Holden
Re: I'm pretty sure this is a bug
di Wesley Holden - Tuesday, 12 November 2013, 11:23
 

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
di Nathan Lewis - Tuesday, 12 November 2013, 12:35
Gruppo 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
di Wesley Holden - Tuesday, 12 November 2013, 18:07
 

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

L'intervento è stato rimosso
Tuesday, 12 November 2013, 18:37
Il contenuto di questo intervento è stato rimosso, non è più possibile visualizzarlo.
Nathan Lewis
Re: I'm pretty sure this is a bug
di Nathan Lewis - Tuesday, 12 November 2013, 18:39
Gruppo 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
di David Curry (Core Developer) - Monday, 25 November 2013, 19:17
Gruppo 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