Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/admin/webservice/forms.php

    r136 r1331  
    158158        $errors = parent::validation($data, $files);
    159159
     160        // Add field validation check for duplicate name.
     161        if ($webservice = $DB->get_record('external_services', array('name' => $data['name']))) {
     162            if (empty($data['id']) || $webservice->id != $data['id']) {
     163                $errors['name'] = get_string('nameexists', 'webservice');
     164            }
     165        }
     166
    160167        // Add field validation check for duplicate shortname.
    161168        // Allow duplicated "empty" shortnames.
     
    191198            //retrieve full function information (including the description)
    192199            $function = external_function_info($functionname);
    193             $functions[$functionid] = $function->name . ':' . $function->description;
     200            if (empty($function->deprecated)) {
     201                $functions[$functionid] = $function->name . ':' . $function->description;
     202            } else {
     203                // Exclude the deprecated ones.
     204                unset($functions[$functionid]);
     205            }
    194206        }
    195207
Note: See TracChangeset for help on using the changeset viewer.