Merge branch 'MDL-59801-master-fix1' of http://github.com/damyon/moodle

This commit is contained in:
Andrew Nicols
2017-08-31 14:12:31 +08:00
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -532,7 +532,7 @@ class behat_forms extends behat_base {
* @param string $item
*/
public function i_click_on_item_in_the_autocomplete_list($item) {
$xpathtarget = "//ul[@class='form-autocomplete-suggestions']//*[contains(.,'" . $item . "')]";
$xpathtarget = "//ul[@class='form-autocomplete-suggestions']//*[contains(concat('|', string(.), '|'),'|" . $item . "|')]";
$this->execute('behat_general::i_click_on', [$xpathtarget, 'xpath_element']);
+2 -4
View File
@@ -282,11 +282,9 @@ class core_user_renderer extends plugin_renderer_base {
// Filter options for role.
$roleseditable = has_capability('moodle/role:assign', $context);
$roles = [];
$roles = role_fix_names(get_profile_roles($context), $context, ROLENAME_ALIAS, true);
if ($roleseditable) {
$roles = get_assignable_roles($context, ROLENAME_ALIAS);
} else {
$roles = role_fix_names(get_profile_roles($context), $context, ROLENAME_ALIAS, true);
$roles += get_assignable_roles($context, ROLENAME_ALIAS);
}
$criteria = get_string('role');
$roleoptions = [];