Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-6336

After utf8-migration unserializing of old essay fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.6.3
    • 1.6.1
    • Language, Lesson
    • None
    • MySQL 5.0.22, PHP 4.3.10, Apache 1.3.33, Debian Linux
    • MySQL
    • MOODLE_16_STABLE
    • MOODLE_16_STABLE

      After upgrade from 1.5.2+ to 1.6.1 and utf8-migration, essays writen before upgrade and therefore migrated do not get show to users (inc. admin). Turning on debug show a message:
      Notice: unserialize(): Error at offset 909 of 1110 bytes in /var/www/moodle/mod/lesson/view.php on line 1672.

      All pre-migration essays throw that error. New essays seem to work. In the db the attempts look to be fine. Not truncated or anything obvious. Essays are writen in Finnish, so there are a lot of non-ascii characters in them.

      Seem fairly obvious that unserialize can handle "useranswer" strings that have gone through utf8-migration. However, the error must be rather subtle, because the "useranswer" strings do seem identical.

      Here's the "useranswer" field of lesson_attempt table for the same attempt at the error message above.
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      O:8:"stdClass":5:

      {s:4:"sent";i:1;s:6:"graded";i:1;s:5:"score";i:0;s:6:"answer";s:823:"Ensimmäinen askel kohti sähköistä arkistoa on viitearkisto. Siinä on sähköisessä muodossa vain viitetiedot ja varsinaiset dokumentit ovat paperilla. Tämä soveltuu parhaiten, jos kaikkien tietojen siirto sähköiseen muotoon vaatisi liikaa resursseja. Esim. kirjastojen hakukoneet ovat viitearkistoja. Sähköinen tekstiarkisto sisältää dokumenttien tekstit sähköisessä muodossa. Kuvat ovat tallennettu erikseen kuvatietokannaksi. tämä sopii silloin, jos arkistoitavasta tiedosta suurin osa on tekstiä. esim. kirjanpidon aineistot ovat näitä tekstiarkistoja. Sähköinen dokumenttiaineisto perustu kokonaisten dokumenttien käsittelyjärjestelmään. Dokumenttiarkistojen tieto tallennetaan yleensä kuvamuodossa. Tiedonhaku perustuu näytöltä luettavassa muodossa olevaan hakemistoon, joka sisältää jäsentelyn arkiston tiedoista.";s:8:"response";s:130:"Ok, hyvä vastaus! Lisäksi olisit voinut vielä pohtia kunkin arkistotason soveltumista taloushallinnon aineistojen säilyttämiseen.";}

      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

            lazyfish Yu Zhang
            flambergius Jussi Hannunen
            Nobody Nobody
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.