original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Return criteria parameters
  
  @param int $critid Criterion ID
  @return array
docstring_tokens: Return criteria parameters