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

Make question_edit_form more suitable for inheritance

XMLWordPrintable

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

      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

        1. liste_answers.txt
          150 kB
          Pierre Pichet
        2. shortanswer_form.patch
          4 kB
          Oleg Sychev

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

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.