Best practice forum (Archived)

该论坛讨论已删除

 
该论坛帖子已被删除
2013年11月12日 Tuesday 10:41
该论坛帖子的内容已被删除,无法再访问。
??
Re: I'm pretty sure this is a bug
?? 发表于 2013年11月12日 Tuesday 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!


LewisNathan
Re: I'm pretty sure this is a bug
LewisNathan 发表于 2013年11月12日 Tuesday 12:35
小组 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
?? 发表于 2013年11月12日 Tuesday 18:07
 

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

该论坛帖子已被删除
2013年11月12日 Tuesday 18:37
该论坛帖子的内容已被删除,无法再访问。
LewisNathan
Re: I'm pretty sure this is a bug
LewisNathan 发表于 2013年11月12日 Tuesday 18:39
小组 Totara

Hi Liz.

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

Nathan

Curry (Core Developer)David
Re: I'm pretty sure this is a bug
Curry (Core Developer)David 发表于 2013年11月25日 Monday 19:17
小组 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