[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/ -> restore_test.php (summary)

Course restore tests.

Copyright: 2016 Frédéric Massart - FMCorz.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 324 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_course_restore_testcase:: (15 methods):
  backup_course()
  create_role_with_caps()
  restore_course()
  restore_to_existing_course()
  restore_to_new_course()
  test_restore_existing_idnumber_in_new_course()
  test_restore_non_existing_idnumber_in_new_course()
  test_restore_existing_idnumber_in_existing_course()
  test_restore_non_existing_idnumber_in_existing_course()
  test_restore_idnumber_in_existing_course_without_permissions()
  test_restore_course_info_in_new_course()
  test_restore_course_info_in_existing_course()
  test_restore_course_shortname_in_existing_course_without_permissions()
  test_restore_course_fullname_in_existing_course_without_permissions()
  test_restore_course_summary_in_existing_course_without_permissions()


Class: core_course_restore_testcase  - X-Ref

Course restore testcase.

backup_course($courseid, $userid = 2)   X-Ref
Backup a course and return its backup ID.

param: int $courseid The course ID.
param: int $userid The user doing the backup.
return: string

create_role_with_caps($caps, $perm)   X-Ref
Create a role with capabilities and permissions.

param: string|array $caps Capability names.
param: int $perm Constant CAP_* to apply to the capabilities.
return: int The new role ID.

restore_course($backupid, $courseid, $userid)   X-Ref
Restore a course.

param: int $backupid The backup ID.
param: int $courseid The course ID to restore in, or 0.
param: int $userid The ID of the user performing the restore.
return: stdClass The updated course object.

restore_to_existing_course($backupid, $courseid, $userid = 2)   X-Ref
Restore a course to an existing course.

param: int $backupid The backup ID.
param: int $courseid The course ID to restore in.
param: int $userid The ID of the user performing the restore.
return: stdClass The updated course object.

restore_to_new_course($backupid, $userid = 2)   X-Ref
Restore a course to a new course.

param: int $backupid The backup ID.
param: int $userid The ID of the user performing the restore.
return: stdClass The new course object.

test_restore_existing_idnumber_in_new_course()   X-Ref
No description

test_restore_non_existing_idnumber_in_new_course()   X-Ref
No description

test_restore_existing_idnumber_in_existing_course()   X-Ref
No description

test_restore_non_existing_idnumber_in_existing_course()   X-Ref
No description

test_restore_idnumber_in_existing_course_without_permissions()   X-Ref
No description

test_restore_course_info_in_new_course()   X-Ref
No description

test_restore_course_info_in_existing_course()   X-Ref
No description

test_restore_course_shortname_in_existing_course_without_permissions()   X-Ref
No description

test_restore_course_fullname_in_existing_course_without_permissions()   X-Ref
No description

test_restore_course_summary_in_existing_course_without_permissions()   X-Ref
No description



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1