function _quiz_get_terms in Quiz 7.5
Same name and namespace in other branches
- 6.4 quiz.module \_quiz_get_terms()
- 7.6 quiz.module \_quiz_get_terms()
- 7 quiz.module \_quiz_get_terms()
- 7.4 quiz.module \_quiz_get_terms()
Get data for all terms belonging to a Quiz with categorized random questions.
Parameters
int $vid: Version id for the quiz.
Return value
array Array with all terms that belongs to the quiz as objects.
Related topics
3 calls to _quiz_get_terms()
- quiz_update_max_score_properties in ./
quiz.module - Updates the max_score property on the specified quizzes.
- _quiz_build_categorized_question_list in ./
quiz.module - Builds the questionlist for quizzes with categorized random questions.
- _quiz_categorized_existing_terms_form in ./
quiz.admin.inc
File
- ./
quiz.module, line 2528 - quiz.module Main file for the Quiz module.
Code
function _quiz_get_terms($vid) {
$sql = 'SELECT td.name, qt.*
FROM {quiz_terms} qt
JOIN {taxonomy_term_data} td ON qt.tid = td.tid
WHERE qt.vid = :vid
ORDER BY qt.weight';
return db_query($sql, array(
':vid' => $vid,
))
->fetchAll();
}