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

Import of Blackboard 5 questions error due to php5 variable handling (replace $q = $defaultq with $q = clone $defaultq)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.3
    • Fix Version/s: 1.6.4, 1.7, 1.8
    • Component/s: Questions
    • Labels:
      None
    • Environment:
      php5 - this is soon going to be the default php environment for new servers, isn't it?
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      PHP5 seems to treat variable assignment in a fundamentally different way when copying a variable. ex.: $question = $defaultq in questions/format/blackboard/format.php
      $defaultq is passed in as a parameter to several functions in format.php

      the solution seems to be making a slight adjustment to the line intended to make a copy of the default question passed in.
      $question = clone $defaultq; // fixed in several places

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            atmanning Arthur Manning
            Tester:
            Nobody
            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:
              7/Nov/06