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

Refactor file_save_draft_area_files to separate out the file_rewrite_urls_to_pluginfile bit

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Files API
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Again, this is something I need in the question engine code.

      I need to rewrite the draft file URLs in the student's response before the files are actually saved to the database. (Becuase if the response has not changed, we don't save it - and you can only test whether the response has changed after you remove the draft area id.)

      Therefore, I want to separate out the bit at the end of file_save_draft_area_files to be a separate function. Of course, file_save_draft_area_files will call the new function, so that the behaviour does not change.

      I also think it is just nicer to put this specific bit of processing into a separate function.

        Gliffy Diagrams

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Tester:
              Petr Skoda
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/May/11