$repeatsatstart = $countunits + 1;
$this->repeat_elements($repeated, $repeatsatstart, array(), 'nounits', 'addunits', 2, get_string('addmoreunitblanks', 'qtype_calculated', '{no}'));
- $firstunit = $mform->getElement('multiplier[0]');
+ $firstunit =& $mform->getElement('multiplier[0]');
$firstunit->freeze();
$firstunit->setValue('1.0');
$firstunit->setPersistantFreeze(true);
$repeatsatstart = $countunits + 2;
$this->repeat_elements($repeated, $repeatsatstart, array(), 'nounits', 'addunits', 2, get_string('addmoreunitblanks', 'qtype_numerical'));
- $firstunit = $mform->getElement('multiplier[0]');
+ $firstunit =& $mform->getElement('multiplier[0]');
$firstunit->freeze();
$firstunit->setValue('1.0');
$firstunit->setPersistantFreeze(true);
// print picture
if (!empty($CFG->gdversion)) {
- $image_el = $mform->getElement('currentpicture');
+ $image_el =& $mform->getElement('currentpicture');
if ($user and $user->picture) {
$image_el->setValue(print_user_picture($user->id, SITEID, $user->picture, 64,true,false,'',true));
} else {
if (!empty($USER->newadminuser)) {
$mform->addRule('newpassword', get_string('required'), 'required', null, 'client');
- $email_el = $mform->getElement('email');
+ $email_el =& $mform->getElement('email');
if ($email_el->getValue() == 'root@localhost') {
$email_el->setValue('');
}
// print picture
if (!empty($CFG->gdversion)) {
- $image_el = $mform->getElement('currentpicture');
+ $image_el =& $mform->getElement('currentpicture');
if ($user and $user->picture) {
$image_el->setValue(print_user_picture($user->id, SITEID, $user->picture, 64, true, false, '', true));
} else {