public function get_document_recordset($modifiedfrom = 0, \context $context = null) {
        global $DB;

        list ($contextjoin, $contextparams) = $this->get_context_restriction_sql(
                $context, 'wiki', 'w');
        if ($contextjoin === null) {
            return null;
        }

        $sql = "SELECT p.*, w.id AS wikiid, w.course AS courseid, s.groupid AS groupid
                  FROM {wiki_pages} p
                  JOIN {wiki_subwikis} s ON s.id = p.subwikiid
                  JOIN {wiki} w ON w.id = s.wikiid
          $contextjoin
                 WHERE p.timemodified >= ?
                   AND w.wikimode = ?
              ORDER BY p.timemodified ASC";
        return $DB->get_recordset_sql($sql, array_merge($contextparams,
                [$modifiedfrom, 'collaborative']));
    }