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

function xmldb_quiz_upgrade() is missing the global $db definition

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      In the file /mod/quiz/db/upgrade.php the function xmldb_quiz_upgrade() sets the debug to false before calling assignment_update_grades() to avoid excess debug information that might halt the client. However, this has no effect as the $db is not in the global definition.

      Suggested fix, change
      global $CFG, $THEME;
      to
      global $CFG, $THEME, $db;
      in the beginning of the function.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              samulik Samuli Karevaara
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08