From 53574b746a33a2a2678e4a96e2a399b01b185f98 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 18 Jun 2014 14:18:22 +0200 Subject: [PATCH] Minor - format code. --- .../lib/flatview_data_generator.class.php | 15 ++++++++--- .../block_evaluation_graph.class.php | 25 +++++++++---------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/main/gradebook/lib/flatview_data_generator.class.php b/main/gradebook/lib/flatview_data_generator.class.php index f53bae9522..f5db53e067 100755 --- a/main/gradebook/lib/flatview_data_generator.class.php +++ b/main/gradebook/lib/flatview_data_generator.class.php @@ -607,6 +607,8 @@ class FlatViewDataGenerator /** * Get actual array data evaluation/link scores + * @param int $session_id + * @return array */ public function get_evaluation_sumary_results ($session_id = null) { @@ -642,16 +644,21 @@ class FlatViewDataGenerator } } - // get evaluation sumary results (maximum, minimum and average of evaluations for all students) + /* Get evaluation summary results + (maximum, minimum and average of evaluations for all students) + */ $result = array(); - $maximum = $minimum = $average = 0; foreach ($data_by_item as $k => $v) { $average = round(array_sum($v)/count($v)); arsort($v); $maximum = array_shift($v); $minimum = array_pop($v); - $sumary_item = array('max'=>$maximum, 'min'=>$minimum, 'avg'=>$average); - $result[$k] = $sumary_item; + $summary= array( + 'max' => $maximum, + 'min' => $minimum, + 'avg' => $average + ); + $result[$k] = $summary; } return $result; diff --git a/plugin/dashboard/block_evaluation_graph/block_evaluation_graph.class.php b/plugin/dashboard/block_evaluation_graph/block_evaluation_graph.class.php index e71c8925b8..b9898cb797 100755 --- a/plugin/dashboard/block_evaluation_graph/block_evaluation_graph.class.php +++ b/plugin/dashboard/block_evaluation_graph/block_evaluation_graph.class.php @@ -1,16 +1,6 @@