MDL-30760 question engine: fix (one more, hope last) regression
This commit is contained in:
@@ -245,9 +245,9 @@ class question_engine_attempt_upgrader {
|
||||
$qa = $qas[$questionid];
|
||||
$qa->questionusageid = $attempt->uniqueid;
|
||||
$qa->slot = $i;
|
||||
if (textlib::strlen($qa->questionsummary) > question_bank::MAX_SUMMARY_LENGTH) {
|
||||
if (textlib_get_instance()->strlen($qa->questionsummary) > question_bank::MAX_SUMMARY_LENGTH) {
|
||||
// It seems some people write very long quesions! MDL-30760
|
||||
$qa->questionsummary = textlib::substr($qa->questionsummary,
|
||||
$qa->questionsummary = textlib_get_instance()->substr($qa->questionsummary,
|
||||
0, question_bank::MAX_SUMMARY_LENGTH - 3) . '...';
|
||||
}
|
||||
$this->insert_record('question_attempts', $qa);
|
||||
|
||||
Reference in New Issue
Block a user