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, '', '']));
    }