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

code for upgrading from 1.5 db structure in report.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.7
    • Fix Version/s: 2.1
    • Component/s: Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      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

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                jamiesensei Jamie Pratt
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Jul/11