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

edit numercial options are not tested correctly before setting the defaults when editing a question with no answer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      When there is no answer in a question using the numerical options (numerical, calculated ...) the function get_question_options(&$question) return without setting default values for numerical options.

      When editing the question, the code setting the default_values
      if (isset($question->options)){
      $default_values['unitgradingtypes'] = 1 ;

      should be replaced by
      if (isset($question->options->unitgradingtypes)){
      $default_values['unitgradingtypes'] = 1 ;
      and so on...

        Attachments

          Activity

            People

            Assignee:
            ppichet Pierre Pichet
            Reporter:
            ppichet Pierre Pichet
            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:
              25/Dec/10