$repeatno = 5;
}
+ $repeateloptions = array();
+ $repeateloptions['limit'] = array(
+ 'default'=>0,
+ 'type'=>PARAM_INT,
+ 'disabledif'=>array('limitanswers', 'eq', 0));
+ $repeateloptions['option'] = array(
+ 'type'=>PARAM_TEXT,
+ 'helpbutton'=>array('options', get_string('modulenameplural', 'choice'), 'choice'));
+ $repeateloptions['optionid'] = array('type'=>PARAM_INT);
+
$this->repeat_elements($repeatarray, $repeatno,
- array('limit'=> array('default'=>0,
- 'type'=>PARAM_INT,
- 'disabledif'=>array('limitanswers', 'eq', 0)),
-
- 'option' => array('type'=>PARAM_TEXT,
- 'helpbutton'=>array('options', get_string('modulenameplural', 'choice'), 'choice')),
- 'optionid' => array('type'=>PARAM_INT)),
- 'option_repeats', 'option_add_fields', 3);
+ $repeateloptions, 'option_repeats', 'option_add_fields', 3);
$this->_feedbacks = array();
}
$numfeedbacks = max(count($this->_feedbacks) * 1.5, 5);
+
+ $repeateloptions = array();
+ $repeateloptions ['feedbacktext'] = array('type'=>PARAM_TEXT);
+ $repeateloptions ['feedbackboundaries'] = array('type'=>PARAM_TEXT);
+
$nextel=$this->repeat_elements($repeatarray, $numfeedbacks-1,
- array('feedbacktext'=> array('type'=>PARAM_TEXT),
- 'feedbackboundaries' => array('type'=>PARAM_TEXT)),
- 'boundary_repeats', 'boundary_add_fields', 3);
+ $repeateloptions, 'boundary_repeats', 'boundary_add_fields', 3);
//put some extra elements in before the button
$insertEl = &MoodleQuickForm::createElement('text', "feedbacktext[$nextel]", get_string('feedback', 'quiz'));