Scusate che vuol dire:

$SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id";