You are here

function opigno_quiz_app_rules_quiz_get_property in Opigno Quiz App 7

Action: Get a property from a quiz.

File

./opigno_quiz_app.rules.inc, line 215
Rules hook definitions. Many of these should be moved back to the Quiz Rules module once it's ported.

Code

function opigno_quiz_app_rules_quiz_get_property($node, $property, $settings) {
  $value = db_select('quiz_node_properties', 'q')
    ->fields('q', array(
    $property,
  ))
    ->condition('q.nid', $node->nid)
    ->execute()
    ->fetchField();
  return array(
    'quiz_property' => $value,
  );
}