MDL-8913 use proper returned reference assignment for forms elements (PHP4 trouble); merged from MOODLE_18_STABLE

This commit is contained in:
skodak
2007-03-15 12:42:39 +00:00
parent eaef30e776
commit b4c46a8b0f
4 changed files with 5 additions and 5 deletions
@@ -114,7 +114,7 @@ class question_edit_calculated_form extends question_edit_form {
$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);
@@ -67,7 +67,7 @@ class question_edit_numerical_form extends question_edit_form {
$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);
+1 -1
View File
@@ -46,7 +46,7 @@ class user_edit_form extends moodleform {
// 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 {
+2 -2
View File
@@ -65,7 +65,7 @@ class user_editadvanced_form extends moodleform {
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('');
}
@@ -78,7 +78,7 @@ class user_editadvanced_form extends moodleform {
// 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 {