db_importer.txt 1.4 KB

123456789101112131415161718192021222324252627282930
  1. INSERT INTO `mdl_gradeimporter_submissiontype` (`id`, `name`, `info`)
  2. VALUES
  3. (1, 'Prova', 'Avaliação de alunos'),
  4. (2, 'Exercicio', 'Exercicio de alunos');
  5. INSERT INTO `mdl_gradeimporter_submission` (`id`, `gradeimporter`, `type`, `gradebook`, `timecreated`, `timemodified`, `usermodified`, `name`, `info`, `position`, `visibility`)
  6. VALUES
  7. (1, 1, 1, X'31', 0, 0, 0, 'P1', 'Prova aplicada no dia 14/12/19', 0, X'31'),
  8. (2, 1, 1, X'31', 0, 0, 0, 'P2', 'Prova aplicada no dia 17/12/19', 0, X'31'),
  9. (3, 1, 1, X'31', 0, 0, 0, 'P3', 'Prova aplicada no dia 18/12/19', 0, X'31'),
  10. (3, 1, 2, X'31', 0, 0, 0, 'E1', 'Prova aplicada no dia 14/12/19', 0, X'31'),
  11. (4, 1, 2, X'31', 0, 0, 0, 'E2', 'Prova aplicada no dia 17/12/19', 0, X'31');
  12. INSERT INTO `mdl_gradeimporter_feedback` (`id`, `submissionid`, `studentid`, `grade`, `comment`, `fileid`, `usermodified`, `timecreated`, `timemodified`)
  13. VALUES
  14. (1, 1, 2, 7.00, 'Muito bem', 100, 0, 0, 0),
  15. (2, 2, 2, 8.00, 'Mais pra bom', 100, 0, 0, 0),
  16. (3, 3, 2, 5.00, 'Mais pra ruim', 100, 0, 0, 0),
  17. (4, 4, 2, 6.00, 'Mais pra ruim', 100, 0, 0, 0),
  18. (5, 1, 2, 6.00, 'Mais pra ruim', 100, 0, 0, 0),
  19. (6, 2, 2, 5.00, 'Mais pra ruim', 100, 0, 0, 0);
  20. SELECT *
  21. FROM mdl_gradeimporter_feedback gf
  22. JOIN mdl_gradeimporter_submission gs
  23. ON gf.submissionid = gs.id
  24. JOIN mdl_gradeimporter_submissiontype gst
  25. ON gs.type = gst.id
  26. WHERE gf.studentid = ?