Exemplo n.º 1
0
 /**
  * Get the right field name to fetch a stat for these attempts that is calculated for more than one $whichattempts (count or
  * avg).
  *
  * @param string $field name of field
  * @return int|float
  */
 protected function get_field($field)
 {
     $fieldname = quiz_statistics_calculator::using_attempts_string_id($this->whichattempts) . $field;
     return $this->{$fieldname};
 }