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

Design way to save and retrieve file for backup with file API

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Hub
    • Labels:
      None
    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      I tried to save a backup in the system context with fileaera='hub_backup'. However I discovered than I can't do that. The file API doesn't let me retrieve a "system context" fileinfo if the fileaera is not null.

      get_file_info_system()
      :
      if (is_null($filearea)) {
                  return new file_info_system($this);
              }
              //TODO: question files browsing
       
              return null;

      I need to save a file in system context because the context cannot be course/user/module. These are the only available context.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jerome Jérôme Mouneyrac
              Reporter:
              jerome Jérôme Mouneyrac
              Tester:
              Nobody
              Participants:
              Component watchers:
              David Mudrák (@mudrd8mz), Helen Foster
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: