original_string: public function get_document_recordset($modifiedfrom = 0, \context $context = null) {
          global $DB;
  
          list ($contextjoin, $contextparams) = $this->get_course_level_context_restriction_sql($context, 'c');
          if ($contextjoin === null) {
              return null;
          }
  
          $comparetext = $DB->sql_compare_text('cs.summary', 1);
  
          return $DB->get_recordset_sql("
                  SELECT cs.id,
                         cs.course,
                         cs.section,
                         cs.name,
                         cs.summary,
                         cs.summaryformat,
                         cs.timemodified
                    FROM {course_sections} cs
                    JOIN {course} c ON c.id = cs.course
            $contextjoin
                   WHERE cs.timemodified >= ?
                     AND (cs.name != ? OR $comparetext != ?)
                ORDER BY cs.timemodified ASC", array_merge($contextparams, [$modifiedfrom, '', '']));
      }
code: public function get_document_recordset($modifiedfrom = 0, \context $context = null) {
          global $DB;
  
          list ($contextjoin, $contextparams) = $this->get_course_level_context_restriction_sql($context, 'c');
          if ($contextjoin === null) {
              return null;
          }
  
          $comparetext = $DB->sql_compare_text('cs.summary', 1);
  
          return $DB->get_recordset_sql("
                  SELECT cs.id,
                         cs.course,
                         cs.section,
                         cs.name,
                         cs.summary,
                         cs.summaryformat,
                         cs.timemodified
                    FROM {course_sections} cs
                    JOIN {course} c ON c.id = cs.course
            $contextjoin
                   WHERE cs.timemodified >= ?
                     AND (cs.name != ? OR $comparetext != ?)
                ORDER BY cs.timemodified ASC", array_merge($contextparams, [$modifiedfrom, '', '']));
      }
code_tokens: public function get_document_recordset ( $ modifiedfrom = 0 , \ context $ context = null ) { global $ DB ; list ( $ contextjoin , $ contextparams ) = $ this -> get_course_level_context_restriction_sql ( $ context , 'c' ) ; if ( $ contextjoin === null ) { return null ; } $ comparetext = $ DB -> sql_compare_text ( 'cs.summary' , 1 ) ; return $ DB -> get_recordset_sql ( "
                  SELECT cs.id,
                         cs.course,
                         cs.section,
                         cs.name,
                         cs.summary,
                         cs.summaryformat,
                         cs.timemodified
                    FROM {course_sections} cs
                    JOIN {course} c ON c.id = cs.course
            $contextjoin
                   WHERE cs.timemodified >= ?
                     AND (cs.name != ? OR $comparetext != ?)
                ORDER BY cs.timemodified ASC" , array_merge ( $ contextparams , [ $ modifiedfrom , '' , '' ] ) ) ; }
docstring: Returns recordset containing required data for indexing course sections.
  
  @param int $modifiedfrom timestamp
  @param \context|null $context Restriction context
  @return \moodle_recordset|null Recordset or null if no change possible
docstring_tokens: Returns recordset containing required data for indexing course sections .