Best practice forum (Archived)

Cette discussion de forum a été supprimée

 
Ce message du forum a été supprimé
Tuesday 12 November 2013, 10:41
Le contenu de ce message de forum a été supprimé et n'est plus accessible.
? ?
Re: I'm pretty sure this is a bug
par ? ?, 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
par Nathan Lewis, Tuesday 12 November 2013, 12:35
Groupe 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

? ?
Re: I'm pretty sure this is a bug
par ? ?, 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?

Ce message du forum a été supprimé
Tuesday 12 November 2013, 18:37
Le contenu de ce message de forum a été supprimé et n'est plus accessible.
Nathan Lewis
Re: I'm pretty sure this is a bug
par Nathan Lewis, Tuesday 12 November 2013, 18:39
Groupe 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
par David Curry (Core Developer), Monday 25 November 2013, 19:17
Groupe 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