-
Bug
-
Resolution: Fixed
-
Major
-
2.5.2, 2.6
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
MOODLE_25_STABLE
-
Hi There Moodle Community,
greetings from Poland,
This is my first bug report and first words ever, so on start I want to say that I appreciate great work on each moodle version, thanks.
Essays works good before migration from 2.1 to 2.2 to 2.5.2, here's a really obscure bug I've tried to debug in the code, but for me it's unreasonable how in the student answer form can come md5(empty_string) each time student not finishing, did anyone report this bug before me, i can not identify to other essays bugs i'm searching 2 days?
This is $qubaold chunk of dump from startattempt.php with 1 saved attempt, each next attempt not finished was affected:
[2]=>
object(question_attempt)#875 (16) {
["id":protected]=>
string(6) "189680"
["usageid":protected]=>
string(5) "29970"
["slot":protected]=>
string(1) "2"
["behaviour":protected]=>
object(qbehaviour_manualgraded)#873 (2) {
["qa":protected]=>
RECURSION
["question":protected]=>
object(qtype_essay_question)#877 (28) {
["responseformat"]=>
string(5) "plain"
["responsefieldlines"]=>
string(1) "5"
["attachments"]=>
string(1) "0"
["graderinfo"]=>
string(0) ""
["graderinfoformat"]=>
string(1) "1"
["responsetemplate"]=>
string(0) ""
["responsetemplateformat"]=>
string(1) "1"
["id"]=>
string(6) "678863"
["category"]=>
string(5) "36011"
["contextid"]=>
string(5) "70840"
["parent"]=>
string(1) "0"
["qtype"]=>
object(qtype_essay)#879 (1) {
["fileoptions":protected]=>
array(3)
}
["name"]=>
string(4) "Qu 2"
["questiontext"]=>
string(222) "
Write about a decision you have made using the impulsive decision making style.
"
["questiontextformat"]=>
string(1) "1"
["generalfeedback"]=>
string(0) ""
["generalfeedbackformat"]=>
string(1) "1"
["defaultmark"]=>
float(1)
["length"]=>
string(1) "1"
["penalty"]=>
float(0)
["stamp"]=>
string(29) "10.0.0.75+120809082933+Vt1VhU"
["version"]=>
string(29) "localhost+131107152846+1egS9P"
["hidden"]=>
string(1) "0"
["timecreated"]=>
string(10) "1344500973"
["timemodified"]=>
string(10) "1383838126"
["createdby"]=>
string(1) "4"
["modifiedby"]=>
string(3) "178"
["hints"]=>
array(0) {
}
}
}
["question":protected]=>
object(qtype_essay_question)#877 (28) {
["responseformat"]=>
string(5) "plain"
["responsefieldlines"]=>
string(1) "5"
["attachments"]=>
string(1) "0"
["graderinfo"]=>
string(0) ""
["graderinfoformat"]=>
string(1) "1"
["responsetemplate"]=>
string(0) ""
["responsetemplateformat"]=>
string(1) "1"
["id"]=>
string(6) "678863"
["category"]=>
string(5) "36011"
["contextid"]=>
string(5) "70840"
["parent"]=>
string(1) "0"
["qtype"]=>
object(qtype_essay)#879 (1) {
["fileoptions":protected]=>
array(3) { ["subdirs"]=> bool(true) ["maxfiles"]=> int(-1) ["maxbytes"]=> int(0) }
}
["name"]=>
string(4) "Qu 2"
["questiontext"]=>
string(222) "
Write about a decision you have made using the impulsive decision making style.
"
["questiontextformat"]=>
string(1) "1"
["generalfeedback"]=>
string(0) ""
["generalfeedbackformat"]=>
string(1) "1"
["defaultmark"]=>
float(1)
["length"]=>
string(1) "1"
["penalty"]=>
float(0)
["stamp"]=>
string(29) "10.0.0.75+120809082933+Vt1VhU"
["version"]=>
string(29) "localhost+131107152846+1egS9P"
["hidden"]=>
string(1) "0"
["timecreated"]=>
string(10) "1344500973"
["timemodified"]=>
string(10) "1383838126"
["createdby"]=>
string(1) "4"
["modifiedby"]=>
string(3) "178"
["hints"]=>
array(0) {
}
}
["variant":protected]=>
int(1)
["maxmark":protected]=>
float(1)
["minfraction":protected]=>
float(0)
["questionsummary":protected]=>
string(79) "WRITE ABOUT A DECISION YOU HAVE MADE USING THE IMPULSIVE DECISION MAKING STYLE."
["responsesummary":protected]=>
string(28) "buying stuff wthout thinking"
["rightanswer":protected]=>
NULL
["steps":protected]=>
array(3) {
[0]=>
object(question_attempt_step_read_only)#872 (7) {
["id":"question_attempt_step":private]=>
string(6) "412477"
["state":"question_attempt_step":private]=>
object(question_state_complete)#124 (0) {
}
["fraction":"question_attempt_step":private]=>
NULL
["timecreated":"question_attempt_step":private]=>
string(10) "1383824346"
["userid":"question_attempt_step":private]=>
string(3) "178"
["data":"question_attempt_step":private]=>
array(2) {
["answer"]=>
object(question_file_loader)#867 (4) { ["step":protected]=> *RECURSION* ["name":protected]=> string(6) "answer" ["value":protected]=> string(80) "buying stuff wthout thinking" ["contextid":protected]=> string(5) "70872" }
["answerformat"]=>
string(1) "2"
}
["files":"question_attempt_step":private]=>
array(0) {
}
}
[1]=>
object(question_attempt_step_read_only)#868 (7) {
["id":"question_attempt_step":private]=>
string(6) "412579"
["state":"question_attempt_step":private]=>
object(question_state_complete)#124 (0) {
}
["fraction":"question_attempt_step":private]=>
NULL
["timecreated":"question_attempt_step":private]=>
string(10) "1383902908"
["userid":"question_attempt_step":private]=>
string(3) "178"
["data":"question_attempt_step":private]=>
array(2) {
["answer"]=>
object(question_file_loader)#865 (4) { ["step":protected]=> *RECURSION* ["name":protected]=> string(6) "answer" ["value":protected]=> string(28) "buying stuff wthout thinking" ["contextid":protected]=> string(5) "70872" }
["answerformat"]=>
string(1) "2"
}
["files":"question_attempt_step":private]=>
array(0) {
}
}
[2]=>
object(question_attempt_step_read_only)#864 (7) {
["id":"question_attempt_step":private]=>
string(6) "412583"
["state":"question_attempt_step":private]=>
object(question_state_needsgrading)#125 (0) {
}
["fraction":"question_attempt_step":private]=>
NULL
["timecreated":"question_attempt_step":private]=>
string(10) "1383902947"
["userid":"question_attempt_step":private]=>
string(3) "178"
["data":"question_attempt_step":private]=>
array(1) { ["-finish"]=> string(1) "1" }
["files":"question_attempt_step":private]=>
array(0) {
}
}
}
["autosavedstep":protected]=>
NULL
["flagged":protected]=>
string(1) "0"
["observer":protected]=>
object(question_engine_unit_of_work)#149 (7) {
["quba":protected]=>
RECURSION
["modified":protected]=>
bool(false)
["attemptsmodified":protected]=>
array(0) {
}
["attemptsadded":protected]=>
array(0) {
}
["stepsadded":protected]=>
array(0) {
}
["stepsmodified":protected]=>
array(0) {
}
["stepsdeleted":protected]=>
array(0) {
}
}
["timemodified"]=>
string(10) "1383902948"
}
This is $quba based on $qubaold
[2]=>
object(question_attempt)#955 (15) {
["id":protected]=>
NULL
["usageid":protected]=>
string(10) "3tGIJzgU6r"
["slot":protected]=>
int(2)
["behaviour":protected]=>
object(qbehaviour_manualgraded)#984 (2) {
["qa":protected]=>
RECURSION
["question":protected]=>
object(qtype_essay_question)#881 (28) {
["responseformat"]=>
string(5) "plain"
["responsefieldlines"]=>
string(1) "5"
["attachments"]=>
string(1) "0"
["graderinfo"]=>
string(0) ""
["graderinfoformat"]=>
string(1) "1"
["responsetemplate"]=>
string(0) ""
["responsetemplateformat"]=>
string(1) "1"
["id"]=>
string(6) "678863"
["category"]=>
string(5) "36011"
["contextid"]=>
string(5) "70840"
["parent"]=>
string(1) "0"
["qtype"]=>
object(qtype_essay)#883 (1) {
["fileoptions":protected]=>
array(3) { ["subdirs"]=> bool(true) ["maxfiles"]=> int(-1) ["maxbytes"]=> int(0) }
}
["name"]=>
string(4) "Qu 2"
["questiontext"]=>
string(222) "
Write about a decision you have made using the impulsive decision making style.
"
["questiontextformat"]=>
string(1) "1"
["generalfeedback"]=>
string(0) ""
["generalfeedbackformat"]=>
string(1) "1"
["defaultmark"]=>
float(1)
["length"]=>
string(1) "1"
["penalty"]=>
float(0)
["stamp"]=>
string(29) "10.0.0.75+120809082933+Vt1VhU"
["version"]=>
string(29) "localhost+131107152846+1egS9P"
["hidden"]=>
string(1) "0"
["timecreated"]=>
string(10) "1344500973"
["timemodified"]=>
string(10) "1383838126"
["createdby"]=>
string(1) "4"
["modifiedby"]=>
string(3) "178"
["hints"]=>
array(0) {
}
}
}
["question":protected]=>
object(qtype_essay_question)#881 (28) {
["responseformat"]=>
string(5) "plain"
["responsefieldlines"]=>
string(1) "5"
["attachments"]=>
string(1) "0"
["graderinfo"]=>
string(0) ""
["graderinfoformat"]=>
string(1) "1"
["responsetemplate"]=>
string(0) ""
["responsetemplateformat"]=>
string(1) "1"
["id"]=>
string(6) "678863"
["category"]=>
string(5) "36011"
["contextid"]=>
string(5) "70840"
["parent"]=>
string(1) "0"
["qtype"]=>
object(qtype_essay)#883 (1) {
["fileoptions":protected]=>
array(3)
}
["name"]=>
string(4) "Qu 2"
["questiontext"]=>
string(222) "
Write about a decision you have made using the impulsive decision making style.
"
["questiontextformat"]=>
string(1) "1"
["generalfeedback"]=>
string(0) ""
["generalfeedbackformat"]=>
string(1) "1"
["defaultmark"]=>
float(1)
["length"]=>
string(1) "1"
["penalty"]=>
float(0)
["stamp"]=>
string(29) "10.0.0.75+120809082933+Vt1VhU"
["version"]=>
string(29) "localhost+131107152846+1egS9P"
["hidden"]=>
string(1) "0"
["timecreated"]=>
string(10) "1344500973"
["timemodified"]=>
string(10) "1383838126"
["createdby"]=>
string(1) "4"
["modifiedby"]=>
string(3) "178"
["hints"]=>
array(0) {
}
}
["variant":protected]=>
int(1)
["maxmark":protected]=>
float(1)
["minfraction":protected]=>
int(0)
["questionsummary":protected]=>
string(79) "WRITE ABOUT A DECISION YOU HAVE MADE USING THE IMPULSIVE DECISION MAKING STYLE."
["responsesummary":protected]=>
NULL
["rightanswer":protected]=>
NULL
["steps":protected]=>
array(1) {
[0]=>
object(question_attempt_step)#983 (7) {
["id":"question_attempt_step":private]=>
NULL
["state":"question_attempt_step":private]=>
object(question_state_complete)#124 (0) {
}
["fraction":"question_attempt_step":private]=>
NULL
["timecreated":"question_attempt_step":private]=>
int(1383907590)
["userid":"question_attempt_step":private]=>
string(3) "178"
["data":"question_attempt_step":private]=>
array(2) {
["answer"]=>
object(question_file_saver)#981 (4)
["answerformat"]=>
string(1) "2"
}
["files":"question_attempt_step":private]=>
array(0) {
}
}
}
["autosavedstep":protected]=>
NULL
["flagged":protected]=>
bool(false)
["observer":protected]=>
object(question_usage_null_observer)#865 (0) {
}
}
The response to this question in student saved last response is resulting wrong, fake string:
buying stuff wthout thinking<!-- File hash: d41d8cd98f00b204e9800998ecf8427e -->
I'll be here all day today, if someone could help, or even identify this bug related to ones before, please let me know about,
Best regards
Michael
- is a regression caused by
-
MDL-39980 Files lost from essays when doing each attempt builds on last
-
- Closed
-