Fix message see BT#9429

1.10.x
Julio Montoya 10 years ago
parent e5294466a4
commit 7e40244821
  1. 32
      main/gradebook/lib/fe/flatviewtable.class.php

@ -84,25 +84,35 @@ class FlatViewTable extends SortableTable
}
/**
*
* Display gradebook graphs
*/
public function display_graph_by_resource()
{
$headerName = $this->datagen->get_header_names();
$total_users = $this->datagen->get_total_users_count();
if ($this->datagen->get_total_items_count() > 0 && $total_users > 0) {
//Removing first name
array_shift($headerName);
//Removing last name
array_shift($headerName);
$displayscore = ScoreDisplay::instance();
$customdisplays = $displayscore->get_custom_score_display_settings();
if (is_array($customdisplays) && count(($customdisplays))) {
if (empty($customdisplays)) {
echo get_lang('ToViewGraphScoreRuleMustBeEnabled');
return '';
}
$user_results = $this->datagen->get_data_to_graph2(false);
//if (empty($this->datagen->get_total_items_count()) || empty($total_users)) {
if (empty($user_results) || empty($total_users)) {
echo get_lang('NoResults');
return '';
}
// Removing first name
array_shift($headerName);
// Removing last name
array_shift($headerName);
$pre_result = $new_result = array();
foreach ($user_results as $result) {
for ($i = 0; $i < count($headerName); $i++) {
@ -304,12 +314,6 @@ class FlatViewTable extends SortableTable
}
$i++;
}
} else {
echo get_lang('ToViewGraphScoreRuleMustBeEnabled');
}
} else {
echo get_lang('NoResults');
}
}
/**

Loading…
Cancel
Save