MDL-36255 core_grade: fix to ensure correct context used for filters
authorJake Dallimore <jake@moodle.com>
Wed, 22 Aug 2018 08:20:36 +0000 (16:20 +0800)
committerJake Dallimore <jake@moodle.com>
Wed, 22 Aug 2018 09:55:50 +0000 (17:55 +0800)
commit7e93539cf624ba9a95308fcfeaf54acc246d42ec
tree6fb0844d895faf3083a6e32ed558a7ec043b7c5a
parentd5bf22ecd1eb04d2e0dc3fa5f269a54af057a21b
MDL-36255 core_grade: fix to ensure correct context used for filters

Some grade object (outcomes,scales) can be created at site or course
context, so this patch just makes sure we use the respective context
when applying format_string to the name in the get_name() function.
grade/edit/scale/index.php
lib/datalib.php
lib/grade/grade_category.php
lib/grade/grade_outcome.php
lib/grade/grade_scale.php