fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments)

This commit is contained in:
gbateson
2008-06-07 01:40:01 +00:00
parent 21a6060f3d
commit 92bb71dcec
+1 -1
View File
@@ -1805,7 +1805,7 @@ function hotpot_convert_navbutton_url($baseurl, $reference, $url, $course, $stri
$url = hotpot_convert_url($baseurl, $reference, $url, false);
// is this a $url for another hotpot in this course ?
if (preg_match("|^$baseurl(.*)$|", $url, $matches)) {
if (preg_match("|^".preg_quote($baseurl)."(.*)$|", $url, $matches)) {
if ($records = get_records_select('hotpot', "course='$course' AND reference='".$matches[1]."'")) {
$ids = array_keys($records);
$url = "$CFG->wwwroot/mod/hotpot/view.php?hp=".$ids[0];