original_string: public function get_supported_orders(\context $context) {
          $orders = parent::get_supported_orders($context);
  
          // If not within a course, no other kind of sorting supported.
          $coursecontext = $context->get_course_context(false);
          if ($coursecontext) {
              // Within a course or activity/block, support sort by location.
              $orders['location'] = get_string('order_location', 'search',
                      $context->get_context_name());
          }
  
          return $orders;
      }
code: public function get_supported_orders(\context $context) {
          $orders = parent::get_supported_orders($context);
  
          // If not within a course, no other kind of sorting supported.
          $coursecontext = $context->get_course_context(false);
          if ($coursecontext) {
              // Within a course or activity/block, support sort by location.
              $orders['location'] = get_string('order_location', 'search',
                      $context->get_context_name());
          }
  
          return $orders;
      }
code_tokens: public function get_supported_orders ( \ context $ context ) { $ orders = parent :: get_supported_orders ( $ context ) ; // If not within a course, no other kind of sorting supported. $ coursecontext = $ context -> get_course_context ( false ) ; if ( $ coursecontext ) { // Within a course or activity/block, support sort by location. $ orders [ 'location' ] = get_string ( 'order_location' , 'search' , $ context -> get_context_name ( ) ) ; } return $ orders ; }
docstring: Solr supports sort by location within course contexts or below.
  
  @param \context $context Context that the user requested search from
  @return array Array from order name => display text
docstring_tokens: Solr supports sort by location within course contexts or below .