我有一个moodle
页面,我正在尝试使用重定向重定向到另一个页面,如下所示:
redirect("page2.php?cId=".$cid);
我重定向到另一页,但在重定向时我正在查看以下内容:
看起来很乱。我想避免这种情况。
此处当前页面有moodle页眉和页脚,page2.php
没有moodle
页眉和页脚
如何避免此“继续”页面?
答案 0 :(得分:0)
您需要修改moodle / lib中的outputrenderers.php文件。 查找redirect_message公共函数,您将看到一行如下所示:
$output .= '<div class="continuebutton">(<a href="'. $encodedurl .'">'. get_string('continue') .'</a>)</div>';
使用get_string从lang / en / moodle.php i18n文件中选择另一个字符串,或者将它们全部删除。例如,如果您想对更具信息性的消息进行硬编码:
$output .= '<div class="continuebutton">(<a href="'. $encodedurl .'">Please click here if you are not automatically redirected within '.$delay.' seconds</a>)</div>';