Outils pour utilisateurs

Outils du site


local:moodlescript:language:restorecourse

MoodleScript: RESTORE COURSE

MoodleScript Script Engine

Effect

Restores a course from an available archive.

Syntax

  RESTORE COURSE <courseidentifier> IN <categoryidentifier> FROM <source> HAVING
  shortname: <shortname>
  fullname: <fullname>
  summary: <summary>
  idnumber: <idnumber>
  visible: <visible>
  order: last

Minimal instruction:

  RESTORE COURSE FROM FILE <filepath> IN <categoryidentifier> HAVING
  shortname: <shortname>
  fullname: <fullname>

Examples

  RESTORE COURSE idnumber:Gabarit IN idnumber:CAT_NOUVEAUX_COURS FROM backup HAVING
  summary: A new course to restore from an existing archive
  idnumber: COPIEDECOURS
  shortname: COPIEDECOURS
  fullname: :coursefullname
  visible: 1
  RESTORE COURSE FROM FILE /var/archives/moodle/gabarit_de_cours.mbz IN id:32 HAVING
  shortname: COPIEDECOURS
  fullname: :coursefullname

Minimal invocation

  • RESTORE COURSE shortname:GABARIT IN idnumber:CAT_NOUVEAU_COURS

Specific attributes

  • courseidentifier: A course identifier that holds a restorable archive.
  • categoryidentifier: A course category identifier where the course is to be restored
  • source: An identification of the source that holds the backup. In the general case this is “course”, or the name of a plugin hosting its own course backups (such as “publishflow” for example).
  • filepath: The path to a Moodle archive stored locally on the server disk.
  • fullname (required): Full name of the course.
  • shortname (required): Short name of the course.

Default values

  • visible : 1

Impact on the execution stack context

At the end of the restore, sets the current course identifier (courseid) to the restored course and the current category identifier to the target category (coursecatid).

Back to the language index - Back to the component index

local/moodlescript/language/restorecourse.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki