Best practice forum (Archived)
Cette discussion de forum a été supprimée
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!
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
Thanks Nathan! I can do the manual edit; Liz, would the patch be helpful for you in the meantime?