Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 216 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

backup_test:: (4 methods):
  setUp()
  backup_course()
  restore_course()
  test_backup_restore()


Class: backup_test  - X-Ref

Question comment backup and restore unit tests.

setUp()   X-Ref
Set up


backup_course(\stdClass $course)   X-Ref
Makes a backup of the course.

param: \stdClass $course The course object.
return: string Unique identifier for this backup.

restore_course(string $backupid, string $fullname, string $shortname, int $categoryid)   X-Ref
Restores a backup that has been made earlier.

param: string $backupid The unique identifier of the backup.
param: string $fullname Full name of the new course that is going to be created.
param: string $shortname Short name of the new course that is going to be created.
param: int $categoryid The course category the backup is going to be restored in.
return: int The new course id.

test_backup_restore()   X-Ref
Test comments attached to questions persist
across the backup and restore process.