Permalink
Browse files

MDL-30760 question engine: fix regression.

Grrr! textlib API is completely different in 2.1 for no good reason.
Thanks to the various testers who caught this.
  • Loading branch information...
1 parent d875953 commit 66a0a5815e92d1f4922702374d3b6620cc7db67a @timhunt timhunt committed with stronk7 Dec 22, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 question/engine/datalib.php
@@ -89,9 +89,9 @@ public function insert_question_attempt(question_attempt $qa, $context) {
$record->minfraction = $qa->get_min_fraction();
$record->flagged = $qa->is_flagged();
$record->questionsummary = $qa->get_question_summary();
- if (textlib::strlen($record->questionsummary) > question_bank::MAX_SUMMARY_LENGTH) {
+ if (textlib_get_instance()->strlen($record->questionsummary) > question_bank::MAX_SUMMARY_LENGTH) {
// It seems some people write very long quesions! MDL-30760
- $record->questionsummary = textlib::substr($record->questionsummary,
+ $record->questionsummary = textlib_get_instance()->substr($record->questionsummary,
0, question_bank::MAX_SUMMARY_LENGTH - 3) . '...';
}
$record->rightanswer = $qa->get_right_answer_summary();

0 comments on commit 66a0a58

Please sign in to comment.