diff --git a/search/index.php b/search/index.php index 638aff738b5..02f7ea83666 100644 --- a/search/index.php +++ b/search/index.php @@ -76,9 +76,10 @@ if ($contextid) { $customdata['withincourseid'] = $coursecontext->instanceid; } - // Get available ordering options from search engine. - $customdata['orderoptions'] = $search->get_engine()->get_supported_orders($context); } +// Get available ordering options from search engine. +$customdata['orderoptions'] = $search->get_engine()->get_supported_orders($context); + $mform = new \core_search\output\form\search(null, $customdata); $data = $mform->get_data();