Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons…

… on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments)
  • Loading branch information...
commit 376a031f4c01495b5afd4a1981bbff6c9584491c 1 parent 2c450e8
gbateson authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/hotpot/lib.php
2  mod/hotpot/lib.php
View
@@ -1807,7 +1807,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];
Please sign in to comment.
Something went wrong with that request. Please try again.