mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
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:
parent
f9c4681520
commit
19e8492299
@ -1973,7 +1973,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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user