Skip to content

Commit

Permalink
better code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesensei committed Dec 28, 2006
1 parent b6d15dd commit ebff6e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
19 changes: 11 additions & 8 deletions mod/choice/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@ function definition() {
$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);



Expand Down
9 changes: 6 additions & 3 deletions mod/quiz/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,13 @@ function definition() {
$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'));
Expand Down

0 comments on commit ebff6e2

Please sign in to comment.