Moodle

Unicode headers missing - quiz and question bank

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: 1.8.4, 1.9, 2.0
  • Component/s: Unicode
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

It seems, that whole quiz and question engine in Moodle 1.8.2. missing Unicode headers. (It's especially painful with secure window quiz attempts, where student even can't change code page)
Notification page for administrators missing unicode header too.

P.S. We can't change default settings for apache because our server hosts many other projects too, besides Moodle. So please keep fixing.

  1. view_assign_without_bug.html
    20/Jul/07 9:44 PM
    18 kB
    Oleg Sychev
  2. view_quiz_bug.html
    20/Jul/07 9:44 PM
    17 kB
    Oleg Sychev
  1. screenshot-1.jpg
    211 kB
    31/Jul/07 7:50 PM

Activity

Hide
Yu Zhang added a comment -

Hi, could you please give me the exact pages (url) where utf8 header is not printed? print_header() should handle it.

Cheers,

Yu

Show
Yu Zhang added a comment - Hi, could you please give me the exact pages (url) where utf8 header is not printed? print_header() should handle it. Cheers, Yu
Hide
Yu Zhang added a comment -

I do see

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

In a quiz attempt in secure mode though, can you check in the db what is the lang of the particular course?

Cheers

Yu

Show
Yu Zhang added a comment - I do see <meta http-equiv="content-type" content="text/html; charset=utf-8" /> In a quiz attempt in secure mode though, can you check in the db what is the lang of the particular course? Cheers Yu
Hide
Oleg Sychev added a comment -

I am sorry, It isn't header, who makes the problem. It's coding of the user-defined text in the file. I attach two html pages, one from quiz engine and another from other module. User-defined text is in different code pages in them.

The problem isn't in db, for it affects course name and breadcrumb too, while they are not affected in another modules.

Changing course langugage doesn't affect the problem. As for files, it seems to affect all files in directories /mod/quiz/ and /question/

Show
Oleg Sychev added a comment - I am sorry, It isn't header, who makes the problem. It's coding of the user-defined text in the file. I attach two html pages, one from quiz engine and another from other module. User-defined text is in different code pages in them. The problem isn't in db, for it affects course name and breadcrumb too, while they are not affected in another modules. Changing course langugage doesn't affect the problem. As for files, it seems to affect all files in directories /mod/quiz/ and /question/
Hide
Yu Zhang added a comment -

Hi, sorry I opened up the files you attached and failed to notice anything unusual. Maybe you can attach a screenshot and circle which bit is not showing up correctly?

Is the content in your user defined file in unicode?

Show
Yu Zhang added a comment - Hi, sorry I opened up the files you attached and failed to notice anything unusual. Maybe you can attach a screenshot and circle which bit is not showing up correctly? Is the content in your user defined file in unicode?
Hide
Oleg Sychev added a comment -

Yes, this problem affects only pages, loaded from server. Saved pages are all right.
You can check problem on our site, http://edu.vstu.ru using login: debug and password: moodleteam Interface language will be english, but content in russian. Try to see any quiz in the course.

I consult specialists about this problem. We find, that all problematic html files contains some symbols before <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" string. For quiz module it is line break (0D 0A), for admin/index.php it is EF BB BF 0D 0A EF BB BF This, probably, mislead browsers (we tried IE and Opera and the problem affects both). Maybe removing this symbols will solve the problem.

Show
Oleg Sychev added a comment - Yes, this problem affects only pages, loaded from server. Saved pages are all right. You can check problem on our site, http://edu.vstu.ru using login: debug and password: moodleteam Interface language will be english, but content in russian. Try to see any quiz in the course. I consult specialists about this problem. We find, that all problematic html files contains some symbols before <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" string. For quiz module it is line break (0D 0A), for admin/index.php it is EF BB BF 0D 0A EF BB BF This, probably, mislead browsers (we tried IE and Opera and the problem affects both). Maybe removing this symbols will solve the problem.
Hide
Oleg Sychev added a comment -

Here is screenshot of the problematic page. Browser simply misunderstands the code page.

Show
Oleg Sychev added a comment - Here is screenshot of the problematic page. Browser simply misunderstands the code page.
Hide
Oleg Sychev added a comment -

The problems was in HTML texts of the page.. In Moodle 1.8.3. it was solved, so you can mark this issue as fixed now.

Show
Oleg Sychev added a comment - The problems was in HTML texts of the page.. In Moodle 1.8.3. it was solved, so you can mark this issue as fixed now.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: