fixed a few more property_exists()s

This commit is contained in:
Petr Skoda 2010-09-17 19:20:39 +00:00
parent 653f91f948
commit c20b001bf4
2 changed files with 3 additions and 3 deletions

View File

@ -457,7 +457,7 @@ if ($formdata = $mform->is_cancelled()) {
}
}
}
if ((array_key_exists($column, $existinguser) and array_key_exists($column, $user)) or in_array($column, $PRF_FIELDS)) {
if ((property_exists($column, $existinguser) and property_exists($column, $user)) or in_array($column, $PRF_FIELDS)) {
if ($updatetype == 3 and $existinguser->$column !== '') {
//missing == non-empty only
continue;

View File

@ -521,7 +521,7 @@ if ($mform->is_cancelled()) {
foreach($outcomes as $outcome) {
$elname = 'outcome_'.$outcome->id;
if (array_key_exists($elname, $fromform) and $fromform->$elname) {
if (property_exists($elname, $fromform) and $fromform->$elname) {
// so we have a request for new outcome grade item?
if ($items) {
foreach($items as $item) {
@ -580,7 +580,7 @@ if ($mform->is_cancelled()) {
}
$PAGE->set_heading($course->fullname);
$PAGE->set_title($streditinga);
$PAGE->set_title($streditinga);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();