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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.3
    • 1.6.4, 1.7, 1.8
    • Questions
    • None
    • php5 - this is soon going to be the default php environment for new servers, isn't it?
    • MOODLE_16_STABLE
    • 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

            timhunt Tim Hunt
            atmanning Arthur Manning
            Nobody Nobody
            Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7/Nov/06