protected function choose_hits(array $response) {
        $allhits = $this->get_all_hits($response);
        $chosenhits = array();
        foreach ($allhits as $placeno => $hits) {
            foreach ($hits as $itemno => $hit) {
                $choice = $this->get_right_choice_for($placeno);
                $choiceitem = "$choice $itemno";
                if (!in_array($choiceitem, $chosenhits)) {
                    $chosenhits[$placeno] = $choiceitem;
                    break;
                }
            }
        }
        return $chosenhits;
    }
protected function choose_hits(array $response) {
        $allhits = $this->get_all_hits($response);
        $chosenhits = array();
        foreach ($allhits as $placeno => $hits) {
            foreach ($hits as $itemno => $hit) {
                $choice = $this->get_right_choice_for($placeno);
                $choiceitem = "$choice $itemno";
                if (!in_array($choiceitem, $chosenhits)) {
                    $chosenhits[$placeno] = $choiceitem;
                    break;
                }
            }
        }
        return $chosenhits;
    }
protected function choose_hits ( array $ response ) { $ allhits = $ this -> get_all_hits ( $ response ) ; $ chosenhits = array ( ) ; foreach ( $ allhits as $ placeno => $ hits ) { foreach ( $ hits as $ itemno => $ hit ) { $ choice = $ this -> get_right_choice_for ( $ placeno ) ; $ choiceitem = "$choice $itemno" ; if ( ! in_array ( $ choiceitem , $ chosenhits ) ) { $ chosenhits [ $ placeno ] = $ choiceitem ; break ; } } } return $ chosenhits ; }
Choose hits to maximize grade where drop targets may have more than one hit and drop targets
can overlap.
@param array $response
@return array chosen hits
Choose hits to maximize grade where drop targets may have more than one hit and drop targets can overlap .