diff --git a/lib/weblib.php b/lib/weblib.php index 37abd3b4bc4..adbbdf7be9b 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5094,11 +5094,11 @@ function editorhelpbutton(){ */ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext=false, $text='', $return=false, $imagetext='') { - global $CFG, $course; + global $CFG, $COURSE; // fix for MDL-7734 - if (!empty($course->lang)) { - $forcelang = $course->lang; + if (!empty($COURSE->lang)) { + $forcelang = $COURSE->lang; } else { $forcelang = ''; }