diff --git a/course/category.php b/course/category.php
index 1da4ce5d50f..7751058d787 100644
--- a/course/category.php
+++ b/course/category.php
@@ -435,8 +435,11 @@ if (!$courses) {
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '
| ';
echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
- echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
- $PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
+ echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid', 'class' => 'autosubmit'));
+ $PAGE->requires->yui_module('moodle-core-formautosubmit',
+ 'M.core.init_formautosubmit',
+ array(array('selectid' => 'movetoid', 'nothing' => $category->id))
+ );
echo '';
echo ' |
';
}
diff --git a/course/search.php b/course/search.php
index 1dda021206c..0022d5a7d76 100644
--- a/course/search.php
+++ b/course/search.php
@@ -375,8 +375,11 @@ if ($courses) {
echo "