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

Deprecate qformat_xml import_files

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • DEV backlog
    • 2.5
    • Questions
    • MOODLE_25_STABLE

      I don't know for what future Moodle version this can be targeted and how it needs to be announced so that developers are given the time to upgrade their code ?
      Now that Moodle XML question import is using draftfiles we should push all qtype authors to upgrade their code.
      I have done it for my own qtypes and it is quite easy.

      • First thing to note is that you only need to do it if your qtype has one or more specific fileareas (many qtypes don't have any)
      • apart my own qtypes, among all the qtypes I have installed on my Moodle test sites (and I have quite a few ) the only ones using import_files are Tim's stack and Jamie's ddimageortext and varnumunit.

      For all my qtypes, all I had to do was to replace some lines by a proper call to $format->import_text_with_files in the import_from_xml function.

      In the 2.2, 2.3, 2.4 Moodle branchs this function was added after initial release (for the 2.4 branch for instance it was added in Moodle 2.4.1) so I don't think we should push developers to do the change for these branchs because it would means to support different versions of the plugins for each branch !!
      But for Moodle 2.5 it will be available from the begining os it is quite doable to use it in a plugin version for Moodle 2.5.

      As I said, I create this issue just to fix a calendar for the future.

      Something can already be done now: suppress all those useless 'files' => array() and $myvar['files'] = array() that are in a lot of places

            Unassigned Unassigned
            jmvedrine Jean-Michel Vedrine
            Tim Hunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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