From 48876da59e71a27465a6d88f5a36347712504a2f Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Thu, 25 Jun 2009 04:04:01 +0000 Subject: [PATCH] mod-survey MDL-19621 Fixed notices appearing in generated charts --- mod/survey/graph.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.39.5