Query SQL Moodle

Asked

Viewed 567 times

0

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

Student Name | Course | Evaluation 1 | Evaluation 2 | Evaluation n | Final grade

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

Link

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

Remembering that each one is on a different table, someone who works with Moodle, would know to tell me?

  • Where’s the scam? You don’t have it in the Moodle documentation?

  • It was good to be more complete in the question, inform the keys of each table, the names of the tables that each field meets for better understanding.

  • Tables are mdl_course (Stores all courses), mdl_role_assignments (Lists students enrolled in courses), mdl_grade_items (Extracts the list of evaluations), mdl_grade_grades (Extract the list of grades from all reviews). basically are these, I found a link that would help https://moodlesql.blogspot.com.br/2011/01/reportario-completo-de-nota-de-um-curso.html?showComment=1490279643106#c5971733205604944253 However, is for a specific course, i want for all courses I own in my table

  • This should not be in the comments, but in the question. If you can edit and detail better.

  • I edited it, thank you

2 answers

0


0

I have no knowledge in Moodle, but I put together something on top of what you went through and the examples in Moodle, you have to see the table 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
  • @Rafael Augusto, if the answer helped you, could brand it, so it would help other users. Hugs!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.