Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Classes | |
class | ouwiki_change_range |
Represents a changed area of file and where it is located in the two source files. More... | |
class | ouwiki_changes |
A more logical representation of the results from ouwiki_internal_diff() More... | |
class | ouwiki_line |
Class representing one 'line' of HTML content for the purpose of text comparison. More... | |
class | ouwiki_word |
Represents single word for html comparison. More... | |
Functions | |
ouwiki_diff ($file1, $file2) | |
Runs diff and interprets results into ouwiki_changes object. | |
ouwiki_diff_add_markers ($html, $words, $markerclass, $beforetext, $aftertext) | |
Adds HTML span elements to $html around the words listed in $words. | |
ouwiki_diff_find_last (&$V, &$E, $hash) | |
ouwiki_diff_html ($html1, $html2) | |
Compares two HTML files. | |
ouwiki_diff_html_to_lines ($content) | |
Prepares XHTML content for text difference comparison. | |
ouwiki_diff_internal_flip ($diff, $count2) | |
Flips around the array returned by ouwiki_diff_internal so that it refers to lines from the other file. | |
ouwiki_diff_merge (&$K, &$k, $i, &$E, $p, &$candidates) | |
ouwiki_diff_sort_v ($a, $b) | |
ouwiki_diff_words ($lines1, $lines2) | |
Compares two files based initially on lines and then on words within the lines that differ. | |
Variables | |
for($i=1;$i<=$m;$i++) | $candidates =array() |
$candidates [0] =new StdClass | |
$candidates [1] =new StdClass | |
$E =array() | |
$E [0] =new StdClass | |
*author s marshall open ac uk *license | $file2 |
for($i=1;$i<=$m;$i++) | $index =$K[$k] |
for($i=1;$i<=$m;$i++) | $J =array() |
$K =array() | |
$K [0] =0 | |
$K [1] =1 | |
$k =0 | |
$m =count($file1) | |
for($j=1;$j<=$n;$j++) | $P =array() |
if($n==0) | $V =array() |
$candidates[0] | a =0 |
$candidates[0] | b =0 |
*author s marshall open ac uk *license | http |
$E[0] | last =true |
$candidates[0] | previous =null |
$E[0] | serial =0 |