original_string: public function get_course_formatted_name($course, $options = array()) {
          $options = (array)$options;
          if (!isset($options['context'])) {
              $options['context'] = context_course::instance($course->id);
          }
          $name = format_string(get_course_display_name_for_list($course), true, $options);
          if (!empty($this->searchcriteria['search'])) {
              $name = highlight($this->searchcriteria['search'], $name);
          }
          return $name;
      }
code: public function get_course_formatted_name($course, $options = array()) {
          $options = (array)$options;
          if (!isset($options['context'])) {
              $options['context'] = context_course::instance($course->id);
          }
          $name = format_string(get_course_display_name_for_list($course), true, $options);
          if (!empty($this->searchcriteria['search'])) {
              $name = highlight($this->searchcriteria['search'], $name);
          }
          return $name;
      }
code_tokens: public function get_course_formatted_name ( $ course , $ options = array ( ) ) { $ options = ( array ) $ options ; if ( ! isset ( $ options [ 'context' ] ) ) { $ options [ 'context' ] = context_course :: instance ( $ course -> id ) ; } $ name = format_string ( get_course_display_name_for_list ( $ course ) , true , $ options ) ; if ( ! empty ( $ this -> searchcriteria [ 'search' ] ) ) { $ name = highlight ( $ this -> searchcriteria [ 'search' ] , $ name ) ; } return $ name ; }
docstring: Returns course name as it is configured to appear in courses lists formatted to course context
  
  @param core_course_list_element $course
  @param array|stdClass $options additional formatting options
  @return string
docstring_tokens: Returns course name as it is configured to appear in courses lists formatted to course context