Skip to content

Instantly share code, notes, and snippets.

@brodock
Created July 11, 2012 19:34
Show Gist options
  • Save brodock/3092672 to your computer and use it in GitHub Desktop.
Save brodock/3092672 to your computer and use it in GitHub Desktop.
Relatorio Header
public function default_table($dadostabela, $css_class, $header) {
// TODO: Verificar como vai funcionar permissões para visualização dos relatórios
//$bulkoperations = has_capability('moodle/course:bulkmessaging', CONTEXT_SYSTEM);
//criacao da tabela
$table = new report_unasus_table();
$table->attributes['class'] = "relatorio-unasus $css_class generaltable";
$table->tablealign = 'center';
$header = array();
$header['Módulo 1'] = array('Atividade 1', 'Atividade 2', 'Atividade 3');
$header['Módulo 2'] = array('Atividade 1','Atividade 2','Atividade 3','Atividade 4');
$header_keys = array_keys($header);
if (is_array($header[$header_keys[0]])) { // Double Header
$table->build_double_header($header);
} else {
$table->build_single_header($header);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment