mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Merge branch 'MDL-39606-master-int' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
509c81cf07
@ -183,6 +183,7 @@ class question_dataset_dependent_items_form extends question_wizard_form {
|
||||
$answer->answer);
|
||||
$mform->addElement('text', 'tolerance['.$key.']',
|
||||
get_string('tolerance', 'qtype_calculated'));
|
||||
$mform->setType('tolerance['.$key.']', PARAM_RAW);
|
||||
$mform->setAdvanced('tolerance['.$key.']', true);
|
||||
$mform->addElement('select', 'tolerancetype['.$key.']',
|
||||
get_string('tolerancetype', 'qtype_numerical'),
|
||||
|
@ -145,10 +145,11 @@ class qtype_numerical_edit_form extends question_edit_form {
|
||||
$unitfields = array($mform->createElement('group', 'units',
|
||||
get_string('unitx', 'qtype_numerical'), $this->unit_group($mform), null, false));
|
||||
|
||||
$repeatedoptions['unit']['disabledif'] =
|
||||
array('unitrole', 'eq', qtype_numerical::UNITNONE);
|
||||
$repeatedoptions['multiplier']['disabledif'] =
|
||||
array('unitrole', 'eq', qtype_numerical::UNITNONE);
|
||||
$repeatedoptions['unit']['disabledif'] = array('unitrole', 'eq', qtype_numerical::UNITNONE);
|
||||
$repeatedoptions['unit']['type'] = PARAM_NOTAGS;
|
||||
$repeatedoptions['multiplier']['disabledif'] = array('unitrole', 'eq', qtype_numerical::UNITNONE);
|
||||
$repeatedoptions['multiplier']['type'] = PARAM_NUMBER;
|
||||
|
||||
$mform->disabledIf('addunits', 'unitrole', 'eq', qtype_numerical::UNITNONE);
|
||||
|
||||
if (isset($this->question->options->units)) {
|
||||
@ -184,12 +185,11 @@ class qtype_numerical_edit_form extends question_edit_form {
|
||||
*/
|
||||
protected function unit_group($mform) {
|
||||
$grouparray = array();
|
||||
$grouparray[] = $mform->createElement('text', 'unit', get_string('unit', 'quiz'),
|
||||
array('type'=>PARAM_NOTAGS, 'size'=>10));
|
||||
$grouparray[] = $mform->createElement('text', 'unit', get_string('unit', 'quiz'), array('size'=>10));
|
||||
$grouparray[] = $mform->createElement('static', '', '', ' ' .
|
||||
get_string('multiplier', 'quiz').' ');
|
||||
$grouparray[] = $mform->createElement('text', 'multiplier',
|
||||
get_string('multiplier', 'quiz'), array('type'=>PARAM_NUMBER, 'size'=>10));
|
||||
get_string('multiplier', 'quiz'), array('size'=>10));
|
||||
|
||||
return $grouparray;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user