Skip to content

Commit

Permalink
Merge branch 'MDL-59801-master-fix1' of http://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 31, 2017
2 parents 4bd649d + d29be32 commit f33afd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/tests/behat/behat_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public function i_select_from_the_singleselect($option, $singleselect) {
* @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']);

Expand Down
6 changes: 2 additions & 4 deletions user/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,9 @@ public function unified_filter($course, $context, $filtersapplied) {

// 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 = [];
Expand Down

0 comments on commit f33afd1

Please sign in to comment.