Details
Description
On page /grade/report/grader/index.php?id=2 (grader report) some assignments titles are missing.
E.g. shorten_text('<a href="http://edu.krasu.ru/mod/assignment/grade.php?id=3235">?????????????? ??????? ? ?????? 12 (80 ??????)</a>') equals <a href="http://edu.krasu.ru/mod/assignment/grade....</a>.
Problem in lib/moodlelib.php/shorten_text(). It doesn't 's process national characters correctly. I fix it by replace line:
$content_length = strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
to line:
$content_length = mb_strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); // mb_strlen!
and line:
$truncate .= substr($line_matchings[2], 0, $left+$entities_length);
to line:
$truncate .= mb_substr($line_matchings[2], 0, $left+$entities_length); // mb_substr!
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
I don't think this is an issue anymore.