original_string: 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']));
      }
code: 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']));
      }
code_tokens: 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' ] ) ) ; }
docstring: Returns a recordset with all required page information.
  
  @param int $modifiedfrom
  @param \context|null $context Optional context to restrict scope of returned results
  @return moodle_recordset|null Recordset (or null if no results)
docstring_tokens: Returns a recordset with all required page information .