mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'MDL-64570-35-fix1' of git://github.com/damyon/moodle into MOODLE_35_STABLE
This commit is contained in:
commit
6fb045026e
2 changed files with 5 additions and 6 deletions
|
@ -1543,11 +1543,8 @@ function user_edit_map_field_purpose($userid, $fieldname) {
|
|||
);
|
||||
|
||||
$purpose = '';
|
||||
if (!$currentuser) {
|
||||
// Do not set a purpose.
|
||||
$purpose = '';
|
||||
}
|
||||
if (isset($validmappings[$fieldname])) {
|
||||
// Only set a purpose when editing your own user details.
|
||||
if ($currentuser && isset($validmappings[$fieldname])) {
|
||||
$purpose = ' autocomplete="' . $validmappings[$fieldname] . '" ';
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
|
||||
|
||||
use Behat\Mink\Exception\ExpectationException as ExpectationException;
|
||||
|
||||
/**
|
||||
* Steps definitions for users.
|
||||
*
|
||||
|
@ -83,7 +85,7 @@ class behat_user extends behat_base {
|
|||
|
||||
$value = $fld->get_attribute('autocomplete');
|
||||
if ($value == $purpose) {
|
||||
throw new ExpectationException('The "' . $field . '" field does have purposea "' . $purpose . '"', $this->getSession());
|
||||
throw new ExpectationException('The "' . $field . '" field does have purpose "' . $purpose . '"', $this->getSession());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue