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

Make question_edit_form more suitable for inheritance

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • 1.9.3
    • Questions
    • None
    • MOODLE_19_STABLE
    • Easy

    Description

      I'm glad to say, this is the last sub-task there for now.

      Well, the matter turns out more complicated. A goal is to create a default implementation of definition_inner function which can suit all questions with repeated answers blanks (at least to override with a parent call); it'll get particulars of questions answer's blank as an array from a special function, overrided in a question.

      Also there will be relevant set_data and validation things.

      Benefits:

      • huge code duplication reducing (6 qtypes can benefit from it)
      • less qtype-specific strings hardcoded in relevant classes, so qtypes forms are more open to inheritance
      • 5 less repeat_elements calls, so less code to modify for MDL-17064

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              oa_sychev Oleg Sychev
              Nobody Nobody
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: