original_string: private function print_diff_content() {
          global $CFG, $OUTPUT, $PAGE;
  
          $pageid = $this->page->id;
          $total = wiki_count_wiki_page_versions($pageid) - 1;
  
          $oldversion = wiki_get_wiki_page_version($pageid, $this->compare);
  
          $newversion = wiki_get_wiki_page_version($pageid, $this->comparewith);
  
          if ($oldversion && $newversion) {
  
              $oldtext = format_text(file_rewrite_pluginfile_urls($oldversion->content, 'pluginfile.php', $this->modcontext->id, 'mod_wiki', 'attachments', $this->subwiki->id));
              $newtext = format_text(file_rewrite_pluginfile_urls($newversion->content, 'pluginfile.php', $this->modcontext->id, 'mod_wiki', 'attachments', $this->subwiki->id));
              list($diff1, $diff2) = ouwiki_diff_html($oldtext, $newtext);
              $oldversion->diff = $diff1;
              $oldversion->user = wiki_get_user_info($oldversion->userid);
              $newversion->diff = $diff2;
              $newversion->user = wiki_get_user_info($newversion->userid);
  
              echo $this->wikioutput->diff($pageid, $oldversion, $newversion, array('total' => $total));
          } else {
              print_error('versionerror', 'wiki');
          }
      }
code: private function print_diff_content() {
          global $CFG, $OUTPUT, $PAGE;
  
          $pageid = $this->page->id;
          $total = wiki_count_wiki_page_versions($pageid) - 1;
  
          $oldversion = wiki_get_wiki_page_version($pageid, $this->compare);
  
          $newversion = wiki_get_wiki_page_version($pageid, $this->comparewith);
  
          if ($oldversion && $newversion) {
  
              $oldtext = format_text(file_rewrite_pluginfile_urls($oldversion->content, 'pluginfile.php', $this->modcontext->id, 'mod_wiki', 'attachments', $this->subwiki->id));
              $newtext = format_text(file_rewrite_pluginfile_urls($newversion->content, 'pluginfile.php', $this->modcontext->id, 'mod_wiki', 'attachments', $this->subwiki->id));
              list($diff1, $diff2) = ouwiki_diff_html($oldtext, $newtext);
              $oldversion->diff = $diff1;
              $oldversion->user = wiki_get_user_info($oldversion->userid);
              $newversion->diff = $diff2;
              $newversion->user = wiki_get_user_info($newversion->userid);
  
              echo $this->wikioutput->diff($pageid, $oldversion, $newversion, array('total' => $total));
          } else {
              print_error('versionerror', 'wiki');
          }
      }
code_tokens: private function print_diff_content ( ) { global $ CFG , $ OUTPUT , $ PAGE ; $ pageid = $ this -> page -> id ; $ total = wiki_count_wiki_page_versions ( $ pageid ) - 1 ; $ oldversion = wiki_get_wiki_page_version ( $ pageid , $ this -> compare ) ; $ newversion = wiki_get_wiki_page_version ( $ pageid , $ this -> comparewith ) ; if ( $ oldversion && $ newversion ) { $ oldtext = format_text ( file_rewrite_pluginfile_urls ( $ oldversion -> content , 'pluginfile.php' , $ this -> modcontext -> id , 'mod_wiki' , 'attachments' , $ this -> subwiki -> id ) ) ; $ newtext = format_text ( file_rewrite_pluginfile_urls ( $ newversion -> content , 'pluginfile.php' , $ this -> modcontext -> id , 'mod_wiki' , 'attachments' , $ this -> subwiki -> id ) ) ; list ( $ diff1 , $ diff2 ) = ouwiki_diff_html ( $ oldtext , $ newtext ) ; $ oldversion -> diff = $ diff1 ; $ oldversion -> user = wiki_get_user_info ( $ oldversion -> userid ) ; $ newversion -> diff = $ diff2 ; $ newversion -> user = wiki_get_user_info ( $ newversion -> userid ) ; echo $ this -> wikioutput -> diff ( $ pageid , $ oldversion , $ newversion , array ( 'total' => $ total ) ) ; } else { print_error ( 'versionerror' , 'wiki' ) ; } }
docstring: Given two versions of a page, prints a page displaying the differences between them.
  
  @global object $CFG
  @global object $OUTPUT
  @global object $PAGE
docstring_tokens: Given two versions of a page prints a page displaying the differences between them .