I am experiencing a strange behaviour. In my code
- Code: Select all
function initiateEditor()
{
$TEST_ID = $_REQUEST['test_id'];
$tableColumns['id'] = array('display_text' => 'ID', 'perms' => 'X');
$tableColumns['student_id'] = array('display_text' => 'Nome', 'req'=> 'true', 'perms' => 'EVCTXQM', 'join' => array('table' => 'tg_students', 'column' => 'id', 'display_mask' => "tg_students.name", 'type' => 'left'));
$tableColumns['test_id'] = array('display_text' => 'Test', 'perms' => '');
$tableColumns['classe_id'] = array('display_text' => 'Classe', 'req'=> 'true', 'perms' => 'EVCTXQM', 'join' => array('table' => 'tg_classi', 'column' => 'id', 'display_mask' => "concat(tg_classi.anno, ' ', tg_classi.nome)", 'type' => 'left'),);
$tableColumns['punti'] = array('display_text' => 'Punti', 'req'=> 'true', 'perms' => 'EVCTXQM');
$tableColumns['maxpunti'] = array('display_text' => 'Max', 'req'=> 'true', 'perms' => 'EVCTXQM');
$tableColumns['voto'] = array('display_text' => 'Voto/10', 'req'=> 'true', 'perms' => 'EVCTXQM');
$tableColumns['esito'] = array('display_text' => 'Risposta/Esatta', 'req'=> 'true', 'perms' => 'EVCTXQM', 'textarea' => array('rows' => 10, 'cols' => 50), 'on_add_fun' => array(&$this,'checkFormatDomanda'), 'on_edit_fun' => array(&$this,'checkFormatDomanda'));
$tableName = 'tg_student_test';
$primaryCol = 'id';
$errorFun = array(&$this,'logError');
$permissions = 'XEDQUI';
require_once('php/AjaxTableEditor.php');
$this->Editor = new AjaxTableEditor($tableName,$primaryCol,$errorFun,$permissions,$tableColumns);
$this->Editor->setConfig('tableInfo','cellpadding="1" width="600" class="mateTable"');
$this->Editor->setConfig('tableTitle','Riepilogo Test');
$this->Editor->setConfig('sqlFilters',"test_id = '$TEST_ID'");
}
everythings work as expected on the screen but the export button produce an empty file.
If I remove the line
$this->Editor->setConfig('sqlFilters',"test_id = '$TEST_ID'");
then the export function works .
Is it normal?
Thank you,
Luigi