Browse Source

Consulta pelo banco de dados

Felipe-cavalieri 5 years ago
parent
commit
dd81be3ff4
1 changed files with 15 additions and 11 deletions
  1. 15 11
      view.php

+ 15 - 11
view.php

@@ -54,19 +54,23 @@ $heading = get_string('displayingview', 'gradeimporter', $gradeimporter->name);
 echo $output->heading($heading);
 
 //tabela com as notas vem aqui
-echo 'parte principal do importador de notas';
+echo 'parte principal do importador de notas Z';
 
 require_once($CFG->libdir . '/tablelib.php');
-
-$data = array();
-$data["Prova"] = array();
-$data["Prova"][] = array("P1", "7", "fulanoP1.pdf");
-$data["Prova"][] = array("P2", "7", "fulanoP2.pdf");
-$data["Prova"][] = array("P3", "7", "fulanoP3.pdf");
-$data["Exercicio"][] = array("E1", "-", "fulanoE1.pdf.pdf");
-$data["Exercicio"][] = array("E2", "-", "fulanoE2.pdf.pdf");
-$data["teste"][] = array("E1", "-", "fulanoE1.pdf.pdf");
-$data["teste"][] = array("E2", "-", "fulanoE2.pdf.pdf");
+require_once(dirname(__FILE__).'/locallib.php');
+use \gradeimporter\feedback;
+
+// $data = array();
+// $data["Prova"] = array();
+// $data["Prova"][] = array("P1", "7", "fulanoP1.pdf");
+// $data["Prova"][] = array("P2", "7", "fulanoP2.pdf");
+// $data["Prova"][] = array("P3", "7", "fulanoP3.pdf");
+// $data["Exercicio"][] = array("E1", "-", "fulanoE1.pdf.pdf");
+// $data["Exercicio"][] = array("E2", "-", "fulanoE2.pdf.pdf");
+// $data["teste"][] = array("E1", "-", "fulanoE1.pdf.pdf");
+// $data["teste"][] = array("E2", "-", "fulanoE2.pdf.pdf");
+
+$data = feedback::get_comments();
 
 $table = new html_table();
 $table->attributes['class'] = 'generaltable mod_index';