[svn r19949] logic changes - allow see stats of total colum - (partial FS#4073)

skala
Isaac Flores 17 years ago
parent 6afd711c20
commit 5cdadaa2e7
  1. 2
      main/gradebook/lib/fe/displaygradebook.php
  2. 8
      main/gradebook/lib/fe/flatviewtable.class.php
  3. 8
      main/gradebook/lib/flatview_data_generator.class.php

@ -135,7 +135,7 @@ class DisplayGradebook
*/ */
function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) { function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) {
$header = '<div class="actions">'; $header = '<div class="actions">';
$header .= '<a href="'.$_SESSION['gradebook_dest'].'?'.api_get_cidreq().'">'. Display::return_icon('folder_document.gif') . get_lang('FolderView') . '</a>'; $header .= '<a href="'.$_SESSION['gradebook_dest'].'?'.api_get_cidreq().'">'. Display::return_icon('folder_document.gif',get_lang('FolderView')) . get_lang('FolderView') . '</a>';
// $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/file_pdf.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>'; // $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '"><img src=../img/file_pdf.gif alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';

@ -186,7 +186,6 @@ class FlatViewTable extends SortableTable
if ($this->datagen->get_total_items_count()>0 && $total_users > 0 ) { if ($this->datagen->get_total_items_count()>0 && $total_users > 0 ) {
array_shift($header_name); array_shift($header_name);
array_shift($header_name); array_shift($header_name);
array_pop($header_name);
$displayscore= ScoreDisplay :: instance(); $displayscore= ScoreDisplay :: instance();
$customdisplays = $displayscore->get_custom_score_display_settings(); $customdisplays = $displayscore->get_custom_score_display_settings();
@ -194,7 +193,6 @@ class FlatViewTable extends SortableTable
$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);
$DataSet = new pData; $DataSet = new pData;
//filling the Dataset //filling the Dataset
foreach($user_results as $result) { foreach($user_results as $result) {
@ -204,7 +202,6 @@ class FlatViewTable extends SortableTable
$pre_result_pie[$i+3][] = $result[$i+1][0]; $pre_result_pie[$i+3][] = $result[$i+1][0];
} }
} }
/*$display_list = array(); /*$display_list = array();
foreach( $customdisplays as $display) { foreach( $customdisplays as $display) {
$display_list[] = $display['display']; $display_list[] = $display['display'];
@ -215,6 +212,7 @@ class FlatViewTable extends SortableTable
$resource_list = array(); $resource_list = array();
$pre_result2 = array(); $pre_result2 = array();
//print_r($pre_result); exit; //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;
@ -259,7 +257,9 @@ class FlatViewTable extends SortableTable
//print_r($pre_result); print_r($header_name); //print_r($pre_result); print_r($header_name);
// Dataset definition // Dataset definition
$DataSet->AddAllSeries(); $DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie(); $DataSet->SetAbsciseLabelSerie('');
$DataSet->SetXAxisName(get_lang('GradebookSkillsRanking'));
$DataSet->SetYAxisName(get_lang('Students'));
$show_draw = true; $show_draw = true;
// Cache definition // Cache definition
$Cache = new pCache(); $Cache = new pCache();

@ -235,10 +235,16 @@ class FlatViewDataGenerator
$score_denom=($score[1]==0) ? 1 : $score[1]; $score_denom=($score[1]==0) ? 1 : $score[1];
$score_final = round(($score[0] / $score_denom) * 100,2); $score_final = round(($score[0] / $score_denom) * 100,2);
$row[] = array ($score_final, strip_tags($scoredisplay->display_score($score,SCORE_DIV_PERCENT, SCORE_ONLY_CUSTOM))); $row[] = array ($score_final, strip_tags($scoredisplay->display_score($score,SCORE_DIV_PERCENT, SCORE_ONLY_CUSTOM)));
} }
$total_score=array($item_value,$item_total); $total_score=array($item_value,$item_total);
$score_final = round(($item_value / $item_total) * 100,2); $score_final = round(($item_value / $item_total) * 100,2);
$row[] = $score_final; $row[] =array ($score_final, strip_tags($scoredisplay->display_score($score,SCORE_DIV_PERCENT, SCORE_ONLY_CUSTOM)));
//$total_score=array($item_value,$item_total);
//$score_final = round(($item_value / $item_total) * 100,2);
//$row[] = $score_final;
//var_dump($score_final);
//var_dump($row);
$data[] = $row; $data[] = $row;
} }
return $data; return $data;

Loading…
Cancel
Save