original_string: protected function get_per_answer_fields($mform, $label, $gradeoptions,
              &$repeatedoptions, &$answersoption) {
          $repeated = array();
          $answeroptions = array();
          $answeroptions[] = $mform->createElement('text', 'answer',
                  $label, array('size' => 40));
          $answeroptions[] = $mform->createElement('select', 'fraction',
                  get_string('grade'), $gradeoptions);
          $repeated[] = $mform->createElement('group', 'answeroptions',
                   $label, $answeroptions, null, false);
          $repeated[] = $mform->createElement('editor', 'feedback',
                  get_string('feedback', 'question'), array('rows' => 5), $this->editoroptions);
          $repeatedoptions['answer']['type'] = PARAM_RAW;
          $repeatedoptions['fraction']['default'] = 0;
          $answersoption = 'answers';
          return $repeated;
      }
code: protected function get_per_answer_fields($mform, $label, $gradeoptions,
              &$repeatedoptions, &$answersoption) {
          $repeated = array();
          $answeroptions = array();
          $answeroptions[] = $mform->createElement('text', 'answer',
                  $label, array('size' => 40));
          $answeroptions[] = $mform->createElement('select', 'fraction',
                  get_string('grade'), $gradeoptions);
          $repeated[] = $mform->createElement('group', 'answeroptions',
                   $label, $answeroptions, null, false);
          $repeated[] = $mform->createElement('editor', 'feedback',
                  get_string('feedback', 'question'), array('rows' => 5), $this->editoroptions);
          $repeatedoptions['answer']['type'] = PARAM_RAW;
          $repeatedoptions['fraction']['default'] = 0;
          $answersoption = 'answers';
          return $repeated;
      }
code_tokens: protected function get_per_answer_fields ( $ mform , $ label , $ gradeoptions , & $ repeatedoptions , & $ answersoption ) { $ repeated = array ( ) ; $ answeroptions = array ( ) ; $ answeroptions [ ] = $ mform -> createElement ( 'text' , 'answer' , $ label , array ( 'size' => 40 ) ) ; $ answeroptions [ ] = $ mform -> createElement ( 'select' , 'fraction' , get_string ( 'grade' ) , $ gradeoptions ) ; $ repeated [ ] = $ mform -> createElement ( 'group' , 'answeroptions' , $ label , $ answeroptions , null , false ) ; $ repeated [ ] = $ mform -> createElement ( 'editor' , 'feedback' , get_string ( 'feedback' , 'question' ) , array ( 'rows' => 5 ) , $ this -> editoroptions ) ; $ repeatedoptions [ 'answer' ] [ 'type' ] = PARAM_RAW ; $ repeatedoptions [ 'fraction' ] [ 'default' ] = 0 ; $ answersoption = 'answers' ; return $ repeated ; }
docstring: Get the list of form elements to repeat, one for each answer.
  @param object $mform the form being built.
  @param $label the label to use for each option.
  @param $gradeoptions the possible grades for each answer.
  @param $repeatedoptions reference to array of repeated options to fill
  @param $answersoption reference to return the name of $question->options
  field holding an array of answers
  @return array of form fields.
docstring_tokens: Get the list of form elements to repeat one for each answer .