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.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

Step definitions to generate database fixtures for the data privacy tool.

Copyright: 2018 Jun Pataleta
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 334 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 lib/phpunit/classes/util.php
 lib/behat/behat_base.php

Defines 1 class


Class: behat_tool_dataprivacy  - X-Ref

Step definitions to generate database fixtures for the data privacy tool.

the_following_data_categories_exist($elementname, TableNode $data)   X-Ref
Creates the specified element. More info about available elements in https://moodledev.io/general/development/tools/behat.

param: string    $elementname The name of the entity to add
param: TableNode $data

i_set_the_site_category_and_purpose($category, $purpose)   X-Ref
Sets the data category and data storage purpose for the site.

param: string $category The ID of the category to be set for the instance.
param: string $purpose The ID of the purpose to be set for the instance.

i_set_the_category_and_purpose_for_course_category($name, $category, $purpose)   X-Ref
Sets the data category and data storage purpose for a course category instance.

param: string $name The instance name. It should match the name or the idnumber.
param: string $category The ID of the category to be set for the instance.
param: string $purpose The ID of the purpose to be set for the instance.

i_set_the_category_and_purpose_for_course($name, $category, $purpose)   X-Ref
Sets the data category and data storage purpose for a course instance.

param: string $name The instance name. It should match the fullname or the shortname, or the idnumber.
param: string $category The ID of the category to be set for the instance.
param: string $purpose The ID of the purpose to be set for the instance.

i_set_the_category_and_purpose_for_activity($name, $type, $coursename, $category, $purpose)   X-Ref
Sets the data category and data storage purpose for a course instance.

param: string $name The instance name. It should match the name of the activity.
param: string $type The activity type. E.g. assign, quiz, forum, etc.
param: string $coursename The course name. It should match the fullname or the shortname, or the idnumber.
param: string $category The ID of the category to be set for the instance.
param: string $purpose The ID of the purpose to be set for the instance.

i_set_the_category_and_purpose_for_block($name, $coursename, $category, $purpose)   X-Ref
Sets the data category and data storage purpose for a course instance.

param: string $name The instance name. It should match the name of the block. (e.g. online_users)
param: string $coursename The course name. It should match the fullname or the shortname, or the idnumber.
param: string $category The ID of the category to be set for the instance.
param: string $purpose The ID of the purpose to be set for the instance.

set_category_and_purpose($contextid, $categoryname, $purposename)   X-Ref
Sets the category and purpose for a context instance.

param: int $contextid The context ID.
param: int $categoryname The category name.
param: int $purposename The purpose name.

i_create_a_dataprivacy_request_for($type, $username)   X-Ref
Create a dataprivacy request.

param: string $type The type of request to create (delete, or export)
param: string $username The username to create for

i_approve_a_dataprivacy_request_for($type, $username)   X-Ref
Approve a dataprivacy request.

param: string $type The type of request to create (delete, or export)
param: string $username The username to create for