mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
better code formatting
This commit is contained in:
parent
b6d15ddef9
commit
ebff6e2c5e
@ -35,15 +35,18 @@ class mod_choice_mod_form extends moodleform_mod {
|
|||||||
$repeatno = 5;
|
$repeatno = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->repeat_elements($repeatarray, $repeatno,
|
$repeateloptions = array();
|
||||||
array('limit'=> array('default'=>0,
|
$repeateloptions['limit'] = array(
|
||||||
'type'=>PARAM_INT,
|
'default'=>0,
|
||||||
'disabledif'=>array('limitanswers', 'eq', 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);
|
||||||
|
|
||||||
'option' => array('type'=>PARAM_TEXT,
|
$this->repeat_elements($repeatarray, $repeatno,
|
||||||
'helpbutton'=>array('options', get_string('modulenameplural', 'choice'), 'choice')),
|
$repeateloptions, 'option_repeats', 'option_add_fields', 3);
|
||||||
'optionid' => array('type'=>PARAM_INT)),
|
|
||||||
'option_repeats', 'option_add_fields', 3);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,10 +219,13 @@ class mod_quiz_mod_form extends moodleform_mod {
|
|||||||
$this->_feedbacks = array();
|
$this->_feedbacks = array();
|
||||||
}
|
}
|
||||||
$numfeedbacks = max(count($this->_feedbacks) * 1.5, 5);
|
$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,
|
$nextel=$this->repeat_elements($repeatarray, $numfeedbacks-1,
|
||||||
array('feedbacktext'=> array('type'=>PARAM_TEXT),
|
$repeateloptions, 'boundary_repeats', 'boundary_add_fields', 3);
|
||||||
'feedbackboundaries' => array('type'=>PARAM_TEXT)),
|
|
||||||
'boundary_repeats', 'boundary_add_fields', 3);
|
|
||||||
|
|
||||||
//put some extra elements in before the button
|
//put some extra elements in before the button
|
||||||
$insertEl = &MoodleQuickForm::createElement('text', "feedbacktext[$nextel]", get_string('feedback', 'quiz'));
|
$insertEl = &MoodleQuickForm::createElement('text', "feedbacktext[$nextel]", get_string('feedback', 'quiz'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user