I'm trying to get the information of the mdl_quiz table and then generating an array with the names of the quizzes of a certain course. I can't figure out the get_records or get_records_select functions yet.
I have try it with this code:
$sql = "SELECT name
WHERE course = 2";
$quizzes_name = $DB->get_records_sql($sql, array($assignmentname));
and with this other one:
$quizzname = $DB->get_records_select('quiz', 'name WHERE course = 2');
Could someone tell me what I'm doing wrong or missing? Thanks