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

GIFT export with numerical question does not save percentage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2, 1.8.3, 1.9
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      When exporting numerical question ot GIFT format, percentage of correctness is not saved. For example this question is imported correctly:

      ::question::[html]This year is{#
      =2007:0
      =%90%2007:1#Almost
      }

      However, export gives:

      ::question::[html]This year is{#
      =2007:0
      =2007:1#Almost
      }

      In my installation this helps:

      1. $Id: format.php,v 1.15.2.4 2007/07/21 07:38:02 thepurpleblob Exp $

      fikar@kirp20: moodle/question/format/gift/
      $ diff format.php format.php.1
      610,613d609
      < if ($answer->fraction != '1')

      { < $perc = $answer->fraction * 100; < $expout .= "\t=%".$perc."%".$answer->answer.":".(float)$answer->tolerance."#".$this->repchar( $answer->feedback )."\n"; < }

      else

      { 615d610 < }

        Attachments

          Activity

            People

            • Assignee:
              howardsmiller Howard Miller
              Reporter:
              fikar Miroslav Fikar
              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: