public function process_action(question_attempt_pending_step $pendingstep)
 {
     if ($pendingstep->has_behaviour_var('helpme')) {
         return $this->process_helpme($pendingstep);
     } else {
         return parent::process_action($pendingstep);
     }
 }
 public function process_action(question_attempt_pending_step $pendingstep)
 {
     if ($pendingstep->has_behaviour_var('precheck')) {
         return $this->process_submit($pendingstep, PRECHECK);
     } else {
         return parent::process_action($pendingstep);
     }
 }
 public function process_action(question_attempt_pending_step $pendingstep)
 {
     $result = null;
     // Process hint button press.
     foreach ($this->question->hints_available_for_student($pendingstep->get_qt_data()) as $hintkey) {
         $hintkey = $this->adjust_hintkey($hintkey);
         if ($pendingstep->has_behaviour_var($hintkey . 'btn')) {
             $result = $this->process_hint($pendingstep, $hintkey);
         }
     }
     // Proces all actions.
     if ($result === null) {
         $result = parent::process_action($pendingstep);
     }
     // Compute variables to show question it should render it's hint buttons.
     if (!$this->qa->get_state()->is_finished()) {
         $pendingstep->set_behaviour_var('_nonresp_hintbtns', true);
         $response = $pendingstep->get_qt_data();
         if ($this->question->is_complete_response($response)) {
             $pendingstep->set_behaviour_var('_resp_hintbtns', true);
         }
     }
     return $result;
 }