From: samhemelryk Date: Thu, 25 Jun 2009 04:04:01 +0000 (+0000) Subject: mod-survey MDL-19621 Fixed notices appearing in generated charts X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=48876da59e71a27465a6d88f5a36347712504a2f;p=moodle.git mod-survey MDL-19621 Fixed notices appearing in generated charts --- diff --git a/mod/survey/graph.php b/mod/survey/graph.php index 698e47b4f2..0e6757bded 100644 --- a/mod/survey/graph.php +++ b/mod/survey/graph.php @@ -55,11 +55,14 @@ $stractual = get_string("actual", "survey"); $stractualclass = get_string("actualclass", "survey"); - $stractualstudent = get_string("actualstudent", "survey", fullname($user)); - + $strpreferred = get_string("preferred", "survey"); $strpreferredclass = get_string("preferredclass", "survey"); - $strpreferredstudent = get_string("preferredstudent", "survey", fullname($user)); + + if ($sid || isset($user)) { + $stractualstudent = get_string("actualstudent", "survey", fullname($user)); + $strpreferredstudent = get_string("preferredstudent", "survey", fullname($user)); + } $virtualscales = false; //set default value for case clauses