diff --git a/admin/roles/assign.php b/admin/roles/assign.php
index 576ef1710d1..c161c253afb 100755
--- a/admin/roles/assign.php
+++ b/admin/roles/assign.php
@@ -364,10 +364,10 @@
/// Print a form to swap roles, and a link back to the all roles list.
echo '
';
- $select = html_select::make_popup_form($baseurl, 'roleid', $nameswithcounts, 'switchrole', $roleid);
- $select->set_label(get_string('assignanotherrole', 'role'));
- $select->nothinglabel = false;
- echo $OUTPUT->select($select);
+
+ $select = new single_select(new moodle_url($baseurl), 'roleid', $nameswithcounts, $roleid, null);
+ $select->label = get_string('assignanotherrole', 'role');
+ echo $OUTPUT->render($select);
echo '
' . get_string('backtoallroles', 'role') . '
';
echo '
';
diff --git a/admin/roles/override.php b/admin/roles/override.php
index 90ed07b937f..bf3710fee2d 100755
--- a/admin/roles/override.php
+++ b/admin/roles/override.php
@@ -226,10 +226,9 @@
/// Print a form to swap roles, and a link back to the all roles list.
echo '';
- $select = html_select::make_popup_form($baseurl, 'roleid', $nameswithcounts, 'switchrole', $roleid);
- $select->set_label(get_string('overrideanotherrole', 'role'));
- $select->nothinglabel = false;
- echo $OUTPUT->select($select);
+ $select = new single_select(new moodle_url($baseurl), 'roleid', $nameswithcounts, $roleid, null);
+ $select->label = get_string('overrideanotherrole', 'role');
+ echo $OUTPUT->render($select);
echo '
' . get_string('backtoallroles', 'role') . '
';
echo '
';