Best practice forum (Archived)

Este foro de discusión ha sido eliminado.

 
Esta publicación en el foro ha sido eliminada.
Tuesday, 12 de November de 2013, 10:41
El contenido de esta publicación del foro se ha eliminado y ya no se puede acceder a él.
Wesley Holden
Re: I'm pretty sure this is a bug
de Wesley Holden - Tuesday, 12 de November de 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
de Nathan Lewis - Tuesday, 12 de November de 2013, 12:35
Grupo 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
de Wesley Holden - Tuesday, 12 de November de 2013, 18:07
 

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

Esta publicación en el foro ha sido eliminada.
Tuesday, 12 de November de 2013, 18:37
El contenido de esta publicación del foro se ha eliminado y ya no se puede acceder a él.
Nathan Lewis
Re: I'm pretty sure this is a bug
de Nathan Lewis - Tuesday, 12 de November de 2013, 18:39
Grupo 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
de David Curry (Core Developer) - Monday, 25 de November de 2013, 19:17
Grupo 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