Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-17229 Shortanswer questiontype refactoring
  3. MDL-29095

question_type::initialise_question_instance should use extra_question_fields to get data from $questiondata->options

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2
    • Fix Version/s: 2.1.3
    • Component/s: Questions
    • Testing Instructions:
      Hide

      1) Create a shortanswer question with usecase on
      2) Re-edit it to ensure usecase value is showed correctly on the edit form
      3) Try question in the preview, changing case of the correct answer, so you are sure case is taken into account
      4) Repeat these steps with usecase off.

      Show
      1) Create a shortanswer question with usecase on 2) Re-edit it to ensure usecase value is showed correctly on the edit form 3) Try question in the preview, changing case of the correct answer, so you are sure case is taken into account 4) Repeat these steps with usecase off.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Now question creation become more complicated, but there are no reason to use extra_question_fields() in get_question_options and not use it in initialise_question_instance. Otherwise it prevents extra_question_fields() from functioning properly.

      Shortanswer question should rely on extra_question_fields() instead of hardcoding $usecase there.

      That's actually quite easy, so please do. Preg question type class still inherited from shortanswer, and it has quite more extra question fields.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                7 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11