SQL Query Moodle

0

I have a problem, and I do not have much SQL knowledge to set up a Query of this, that returns exactly that, I'm working with Moodle, and I need to return with a query, as following information.

Student Name | Contact Us | Rating 1 | Review 2 | Evaluation n | Final Note

The tables are mdl_course (Stores all courses), mdl_role_assignments (Lists students enrolled in courses), mdl_grade_items of the evaluations), mdl_grade_grades (Extract the note list from all evaluations). basically these are, I found a link that would help

a>

However, it is for a specific course, I want for all the courses I have in my table

Remembering that each one is in a different table, someone who works with Moodle, could you tell me?

    
asked by anonymous 23.03.2017 / 15:51

2 answers

0

You can use JOIN to get the tables you need, it would be nice to take a look just to learn.

link

    
17.05.2017 / 21:35
0

I have no knowledge of Moodle , but I put something on top of what you went through and the examples in Moodle , you have to see the tables keys to mount SQL .

SELECT
   rs.nome_aluno,
   c.curso,
   gi.avaliacao,
   ggrades.nota_final
FROM mdl_role_assignmets rs
INNER JOIN mdl_course c on c.id da tabela = rs.id da tabela dos alunos
INNER JOIN mdl_grade_items gi on gi.id da tabela = c.id da tabela cursos
INNER JOIN mdl_grade_grades ggrades on ggrades.id da tabela = gi.id da tabela avaliacoes
    
23.03.2017 / 17:10