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

True/False imported from Blackboard all True

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.3
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Linux
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE

      Description

      When importing quizes in the Bb6+ format moodle fails to correctly recognise the value of the correct answer for True/False questions, defaulting all correct answers to True. A comment in the code seems to assume that order determines the proper value, but the value is encoded in the xml. The following patch fixed the problem for me.

      diff --git a/question/format/blackboard_6/format.php b/question/format/blackboard_6/format.php

      index af27295..c935140 100644

      — a/question/format/blackboard_6/format.php

      +++ b/question/format/blackboard_6/format.php

      @@ -525,7 +525,7 @@ function process_tf($quest, &$questions)

      $question->name = $question->questiontext;

      // first choice is true, second is false.

      • if ($quest->responses[0]->fraction == 1) {

      + if ($quest->responses[0]>fraction == 1 && $quest>responses[0]->ident[0] == 'true')

      { $correct = true; }

      else {

        Attachments

          Activity

            People

            Assignee:
            howardsmiller Howard Miller
            Reporter:
            imported Imported
            Tester:
            Nobody Nobody
            Participants:
            Component watchers:
            Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/Oct/06