Restoring file aliases: Difference between revisions

From MoodleDocs
(Added the info and the flowchart)
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Reusing activities}}
{{Reusing activities}}
Course and activity backup files can contain an alias or shortcut, as described in the section 'Creating an alias/shortcut' in [[Working with files]]. The referenced file can be an external file (such as a file stored in [[Dropbox]]) or a file stored in Moodle (such as a file in another activity or course or in a user's [[Private files]] area).


Since Moodle 2.3, course and activity backup files can contain ''aliases'' - i.e. special files that behave as a reference or a link to another file. The referenced file can be an external file (such as one stored at Dropbox) or a file stored in Moodle (such as a file in other activity/course or in some user's Private files area).
During the restore process, Moodle does its best to try and restore the aliases correctly. However, there are many factors involved, most notably:


During the restore process, Moodle does its best to try and restore the aliases correctly. However, there are many factors involved depending on the type of restore, the location of the referenced file etc.). The following flowchart documents the implemented behaviour.
* Is the restore happening on the same site that the backup comes from?
* What repository type was used to create the alias in the original course? In other words, what is the location of the referenced file?
* Is the referenced file an external file?
* Does the backup file contain the referenced file and if so, is that file selected to be restored, too?
 
In some situations it's just not possible to restore aliases and so they are skipped.
 
The following flowchart documents the implemented behaviour.


[[Image:file-aliases-restore-flowchart.png|left|thumb|File aliases restore flowchart]]
[[Image:file-aliases-restore-flowchart.png|left|thumb|File aliases restore flowchart]]
<br clear="all" />
<br clear="all" />


Note that this logic is applied whenever the restore process is executed. Apart from the obvious case of restoring an MBZ file, the backup and restore is also involved in
Note that this logic is applied whenever the restore process is executed, in other words in all the following situations:


* [[Import course data|importing course data]] from another course
* [[Course restore]]
* [[Course homepage#Editing elements on your course homepage|duplicating an activity]] in a course using the x2 icon
* [[Activity restore]]
* deploying a community course via the [[Community finder block]]
* [[Import course data|Importing course data]] from another course
* Cloning a resource or activity using the x2 icon
* Restoring a course which has been downloaded from a hub via the [[Community finder block]]


==See also==


* MDL-33430
[[es:Restaurar alias de archivo]]
{{stub}}
[[de:Datei-Aliase wiederherstellen]]

Latest revision as of 11:44, 12 June 2017

Course and activity backup files can contain an alias or shortcut, as described in the section 'Creating an alias/shortcut' in Working with files. The referenced file can be an external file (such as a file stored in Dropbox) or a file stored in Moodle (such as a file in another activity or course or in a user's Private files area).

During the restore process, Moodle does its best to try and restore the aliases correctly. However, there are many factors involved, most notably:

  • Is the restore happening on the same site that the backup comes from?
  • What repository type was used to create the alias in the original course? In other words, what is the location of the referenced file?
  • Is the referenced file an external file?
  • Does the backup file contain the referenced file and if so, is that file selected to be restored, too?

In some situations it's just not possible to restore aliases and so they are skipped.

The following flowchart documents the implemented behaviour.

File aliases restore flowchart


Note that this logic is applied whenever the restore process is executed, in other words in all the following situations: