检测到Moodle编码错误

时间:2015-06-25 07:57:39

标签: php moodle

我的moodle给了我这个错误: "检测到编码错误,必须由程序员修复:传递给moodle_page :: set_state的无效状态。我们处于状态0并且请求状态3."

我google了一下,但无法找到这个错误的确切解决方案。我以前从未见过它。如果您需要有关代码或文件的任何额外信息,请务必告诉我。

1 个答案:

答案 0 :(得分:3)

如果调用$OUTPUT->footer()$OUTPUT->header()未调用/** The state of the page before it has printed the header **/ const STATE_BEFORE_HEADER = 0; /** The state the page is in temporarily while the header is being printed **/ const STATE_PRINTING_HEADER = 1; /** The state the page is in while content is presumably being printed **/ const STATE_IN_BODY = 2; /** * The state the page is when the footer has been printed and its function is * complete. */ const STATE_DONE = 3; ,则会发生这种情况。该页面应处于以下状态之一:

$CFG->debug = E_ALL | E_STRICT;
$CFG->debugdisplay = true;

可能是一些自定义代码。打开调试到开发人员级别以找出位置。在你的config.php中添加

var func = function (dimension) {
  var element,
      minSize = "min-" + dimension,
      maxSize = "max-" + dimension;           

  element = jQuery('<div>');
  element.css({
    maxSize: "",
    minSize: ""
  });

};

func();