|
|
|
@ -178,7 +178,7 @@ class FlatViewTable extends SortableTable |
|
|
|
include_once(api_get_path(LIBRARY_PATH).'pchart/pData.class.php'); |
|
|
|
include_once(api_get_path(LIBRARY_PATH).'pchart/pData.class.php'); |
|
|
|
include_once(api_get_path(LIBRARY_PATH).'pchart/pChart.class.php'); |
|
|
|
include_once(api_get_path(LIBRARY_PATH).'pchart/pChart.class.php'); |
|
|
|
include_once(api_get_path(LIBRARY_PATH).'pchart/pCache.class.php'); |
|
|
|
include_once(api_get_path(LIBRARY_PATH).'pchart/pCache.class.php'); |
|
|
|
echo '<pre>'; |
|
|
|
|
|
|
|
$header_name = $this->datagen->get_header_names(); |
|
|
|
$header_name = $this->datagen->get_header_names(); |
|
|
|
$total_users = $this->datagen->get_total_users_count(); |
|
|
|
$total_users = $this->datagen->get_total_users_count(); |
|
|
|
$img_file = ''; |
|
|
|
$img_file = ''; |
|
|
|
@ -192,14 +192,14 @@ class FlatViewTable extends SortableTable |
|
|
|
$customdisplays = $displayscore->get_custom_score_display_settings(); |
|
|
|
$customdisplays = $displayscore->get_custom_score_display_settings(); |
|
|
|
if (is_array($customdisplays) && count(($customdisplays))) { |
|
|
|
if (is_array($customdisplays) && count(($customdisplays))) { |
|
|
|
|
|
|
|
|
|
|
|
$user_results = ($this->datagen->get_data_to_graph2()); |
|
|
|
$user_results = ($this->datagen->get_data_to_graph2()); |
|
|
|
$pre_result = $new_result = array(); |
|
|
|
$pre_result = $new_result = array(); |
|
|
|
//print_r($user_results); |
|
|
|
//print_r($user_results); |
|
|
|
$DataSet = new pData; |
|
|
|
$DataSet = new pData; |
|
|
|
//filling the Dataset |
|
|
|
//filling the Dataset |
|
|
|
foreach($user_results as $result) { |
|
|
|
foreach($user_results as $result) { |
|
|
|
//print_r($result); |
|
|
|
//print_r($result); |
|
|
|
for($i=0; $i< count($header_name); $i++) { |
|
|
|
for($i=0; $i< count($header_name); $i++) { |
|
|
|
$pre_result[$i+3][]=$result[$i+1]; |
|
|
|
$pre_result[$i+3][]=$result[$i+1]; |
|
|
|
$pre_result_pie[$i+3][] = $result[$i+1][0]; |
|
|
|
$pre_result_pie[$i+3][] = $result[$i+1][0]; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -214,6 +214,7 @@ class FlatViewTable extends SortableTable |
|
|
|
$show_draw = false; |
|
|
|
$show_draw = false; |
|
|
|
$resource_list = array(); |
|
|
|
$resource_list = array(); |
|
|
|
$pre_result2 = array(); |
|
|
|
$pre_result2 = array(); |
|
|
|
|
|
|
|
//print_r($pre_result); exit; |
|
|
|
foreach($pre_result as $key=>$res_array) { |
|
|
|
foreach($pre_result as $key=>$res_array) { |
|
|
|
rsort($res_array); |
|
|
|
rsort($res_array); |
|
|
|
$pre_result2[] = $res_array; |
|
|
|
$pre_result2[] = $res_array; |
|
|
|
@ -243,7 +244,8 @@ class FlatViewTable extends SortableTable |
|
|
|
//print_r($resource_list); exit; |
|
|
|
//print_r($resource_list); exit; |
|
|
|
$i = 1; |
|
|
|
$i = 1; |
|
|
|
$j = 0; |
|
|
|
$j = 0; |
|
|
|
// here----------------------------------- |
|
|
|
// here----------------------------------- |
|
|
|
|
|
|
|
//print_r($resource_list); |
|
|
|
foreach($resource_list as $key=>$resource) { |
|
|
|
foreach($resource_list as $key=>$resource) { |
|
|
|
$new_resource_list = $new_resource_list_name = array(); |
|
|
|
$new_resource_list = $new_resource_list_name = array(); |
|
|
|
$DataSet = new pData; |
|
|
|
$DataSet = new pData; |
|
|
|
@ -251,7 +253,7 @@ class FlatViewTable extends SortableTable |
|
|
|
//$new_resource_list[]=$cant; |
|
|
|
//$new_resource_list[]=$cant; |
|
|
|
//$new_resource_list_name[]=$name; |
|
|
|
//$new_resource_list_name[]=$name; |
|
|
|
$DataSet->AddPoint($cant,"Serie".$j); |
|
|
|
$DataSet->AddPoint($cant,"Serie".$j); |
|
|
|
$DataSet->SetSerieName($name,"Serie".$j); |
|
|
|
$DataSet->SetSerieName(strip_tags($name),"Serie".$j); |
|
|
|
$j++; |
|
|
|
$j++; |
|
|
|
} |
|
|
|
} |
|
|
|
//print_r($pre_result); print_r($header_name); |
|
|
|
//print_r($pre_result); print_r($header_name); |
|
|
|
|