Мнения, написани от Tim Hunt

Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers

Turning that into something a bit more readable:

SELECT question bankentryid, MAX(version) AS latest version FROM mdl_question versions WHERE questionbankentryid IN (?,?,?,?,?,?,?) GROUP BY questionbankentryid
-- line 1611 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
-- line 159 of /question/type/questionbase.php: call to core_question\output\question_version_info::populate_latest_versions()
-- line 63 of /question/classes/output/question_version_info.php: call to question_definition->__get()
-- line 268 of /question/bank/previewquestion/preview.php: call to core_question\output\question_version_info->__construct() [array ( 0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => NULL, 6 => '1713497', )]

Error code: dmlreadexception×Descartar esta notificación Trazado de la pila (stack): line 497 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 1364 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 1611 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 83 of /question/classes/output/question_version_info.php: call to moodle_database->get_records_sql_menu()
line 159 of /question/type/questionbase.php: call to core_question\output\question_version_info::populate_latest_versions() line 63 of /question/classes/output/question_version_info.php: call to question_definition->__get()
line 268 of /question/bank/previewquestion/preview.php: call to core_question\output\question_version_info->__construct() moodle

That does not look like the complete error message. You have included a lot of the useful information, but it looks like you have left of the actual error message bit which I wuodl expect to see at the start of that. Something like "Unknow column question" or something.

Acutally, the space in the middle of 'question bankentryid' looks suspicious to me. It should not be there: https://github.com/moodle/moodle/blob/ab8a4dd8cb1689f2e20a67b8c6dc5675d04d1f9d/question/classes/output/question_version_info.php#L74 Is that just a copy-paste error?

 

Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers
you are wrong about this усмивка

It is possible to change the grading scheme on an existing quiz - even after it has been attempted. You can try here: https://qa.moodledemo.net/mod/quiz/edit.php?cmid=30
Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers
Just to be clear - this query is very low-level and technical, but it is showing you exactly how Moodle represents what is going on in the database. It takes time to learn to 'read' that, but once you do, you can see exactly what happened.

In that query, there are several rows for each question in the quiz attempt. All the rows with the same 'slot' number related to the sequence of actions performed on one question, which you will see have increasing sequencenumber. And for each action, qas.timecreated is when that action took place.

The first one will be the quiz attempt being started. To work out what the others are, you need to look at the 'state' columns, and hte name/value information, which is that submitted data (so, actually, there might be multiple rows for one sequencenumber.
Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers
Just to note, quite a lot of Behat steps do normalize-space on the things being compared - but not everything. The reliable way to be sure is to read the code. How the nice selectors you should be using in your tests gets turned into XPath behind the scenes is in lib/behat/classes/partial_named_selector.php and vendor/behat/mink/src/Selector/NamedSelector.php.

If you spot something wrong in the dev docs - particularly if it is something small, please take a moment to be a good community citizen, and suggest an improvement: https://moodledev.io/general/documentation/contributing#making-a-small-change