public function get_params($cid) {
        global $DB;
        $params = array();

        $records = $DB->get_records('badge_criteria_param', array('critid' => $cid));
        foreach ($records as $rec) {
            $arr = explode('_', $rec->name);
            $params[$arr[1]][$arr[0]] = $rec->value;
        }

        return $params;
    }
public function get_params($cid) {
        global $DB;
        $params = array();

        $records = $DB->get_records('badge_criteria_param', array('critid' => $cid));
        foreach ($records as $rec) {
            $arr = explode('_', $rec->name);
            $params[$arr[1]][$arr[0]] = $rec->value;
        }

        return $params;
    }
public function get_params ( $ cid ) { global $ DB ; $ params = array ( ) ; $ records = $ DB -> get_records ( 'badge_criteria_param' , array ( 'critid' => $ cid ) ) ; foreach ( $ records as $ rec ) { $ arr = explode ( '_' , $ rec -> name ) ; $ params [ $ arr [ 1 ] ] [ $ arr [ 0 ] ] = $ rec -> value ; } return $ params ; }
Return criteria parameters

@param int $critid Criterion ID
@return array
Return criteria parameters