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

code for upgrading from 1.5 db structure in report.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.7
    • 2.1
    • Quiz
    • None
    • MOODLE_18_STABLE
    • MOODLE_21_STABLE

    Description

      The following code is executed every time a report is viewed :

      // Upgrade any attempts that have not yet been upgraded to the
      // Moodle 1.5 model (they will not yet have the timestamp set)
      if ($attempts = $DB->get_records_sql("SELECT a.*".
      " FROM

      {quiz_attempts}

      a,

      {question_states}

      s".
      " WHERE a.quiz = ? AND s.attempt = a.uniqueid AND s.timestamp = 0", array($quiz->id))) {
      foreach ($attempts as $attempt)

      { quiz_upgrade_states($attempt); }

      }

      It is in mod/quiz/report.php.

      I think it needs to be removed from HEAD and can possibly be removed from 1.9 and 1.8 too?

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              jamiesensei Jamie Pratt
              Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1/Jul/11