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

Shortanswer questiontype refactoring

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.3
    • None
    • Questions
    • None
    • MOODLE_19_STABLE

    Description

      Tim, I just found that I was stupid, and my plugin would be much less in size (and easier to maintain) if I used inheritance from shortanswer instead of editing it's copy.

      Hovewer, shortanswer question isn't designed very well for inheritance, it requires many code duplication to simple tasks. There is no way question edit form can be useful when inherited.

      I would like to refactor both shortanswer classes (after we deal with MDL-17064) either by creating functions that will allow injections of new things in critical points, or by defining some options (such as additional fields in blanks and main options area) via functions/variables. It'll help me and any other maintainers of derivative question types, and It'll help Moodle too, since numerical and calculated questions are inherited from shortanswer, and there is much code duplication in the case.

      Are you interested in it?

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              oa_sychev Oleg Sychev
              Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: