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

code for upgrading from 1.5 db structure in report.php

XMLWordPrintable

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

      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?

            timhunt Tim Hunt
            jamiesensei Jamie Pratt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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