Feature #272 - The Gradebook: More formatting for a file before changing it.

skala
Ivan Tcholakov 16 years ago
parent b29a8fcab6
commit 455a238c50
  1. 11
      main/gradebook/gradebook_flatview.php

@ -20,8 +20,7 @@ api_block_anonymous_users();
block_students(); block_students();
if (isset ($_POST['submit']) && isset ($_POST['keyword'])) { if (isset ($_POST['submit']) && isset ($_POST['keyword'])) {
header('Location: ' . api_get_self() . '?selectcat=' . Security::remove_XSS($_GET['selectcat']) header('Location: '.api_get_self().'?selectcat='.Security::remove_XSS($_GET['selectcat']).'&search='.Security::remove_XSS($_POST['keyword']));
. '&search=' . Security::remove_XSS($_POST['keyword']));
exit; exit;
} }
@ -114,9 +113,6 @@ if (isset ($_GET['exportpdf'])) {
$clear_send_printable_data[]=$clear_printable_data; $clear_send_printable_data[]=$clear_printable_data;
$clear_printable_data=array(); $clear_printable_data=array();
} }
/*var_dump($printable_data[1]);
var_dump('--------------');
var_dump($clear_send_printable_data);*/
export_pdf($pdf,$clear_send_printable_data,$printable_data[0],$format); export_pdf($pdf,$clear_send_printable_data,$printable_data[0],$format);
exit; exit;
} }
@ -203,9 +199,8 @@ Display :: display_footer();
function get_printable_data($users,$alleval, $alllinks) { function get_printable_data($users,$alleval, $alllinks) {
$datagen = new FlatViewDataGenerator ($users, $alleval, $alllinks); $datagen = new FlatViewDataGenerator ($users, $alleval, $alllinks);
$offset = (isset($_GET['offset'])?$_GET['offset']:'0'); $offset = isset($_GET['offset']) ? $_GET['offset'] : '0';
$count = (($offset+10) > $datagen->get_total_items_count()) ? $count = (($offset + 10) > $datagen->get_total_items_count()) ? ($datagen->get_total_items_count() - $offset) : 10;
($datagen->get_total_items_count()-$offset) : 10;
$header_names = $datagen->get_header_names($offset, $count); $header_names = $datagen->get_header_names($offset, $count);
$data_array = $datagen->get_data(FlatViewDataGenerator :: FVDG_SORT_LASTNAME, 0, null, $offset, $count, true); $data_array = $datagen->get_data(FlatViewDataGenerator :: FVDG_SORT_LASTNAME, 0, null, $offset, $count, true);
$newarray = array(); $newarray = array();

Loading…
Cancel
Save