You are here

function qformat_blackboard_6::process_matching_responses in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/question/format/blackboard_6/format.php \qformat_blackboard_6::process_matching_responses()
1 call to qformat_blackboard_6::process_matching_responses()
qformat_blackboard_6::create_raw_question in includes/moodle/question/format/blackboard_6/format.php

File

includes/moodle/question/format/blackboard_6/format.php, line 471

Class

qformat_blackboard_6

Code

function process_matching_responses($bb_responses, &$responses) {
  foreach ($bb_responses as $bb_response) {
    $response = NULL;
    if (isset($bb_response['#']['conditionvar'][0]['#']['varequal'])) {
      $response->correct = $bb_response['#']['conditionvar'][0]['#']['varequal'][0]['#'];
      $response->ident = $bb_response['#']['conditionvar'][0]['#']['varequal'][0]['@']['respident'];
    }
    else {
      $response->correct = 'Broken Question?';
      $response->ident = 'Broken Question?';
    }
    $response->feedback = $bb_response['#']['displayfeedback'][0]['@']['linkrefid'];
    $responses[] = $response;
  }
}