Línea 39... |
Línea 39... |
39 |
*
|
39 |
*
|
40 |
* @package qtype_multichoice
|
40 |
* @package qtype_multichoice
|
41 |
* @copyright 2021 The Open university
|
41 |
* @copyright 2021 The Open university
|
42 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
42 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
43 |
*/
|
43 |
*/
|
44 |
class provider_test extends \core_privacy\tests\provider_testcase {
|
44 |
final class provider_test extends \core_privacy\tests\provider_testcase {
|
45 |
// Include the privacy helper which has assertions on it.
|
45 |
// Include the privacy helper which has assertions on it.
|
Línea 46... |
Línea 46... |
46 |
|
46 |
|
47 |
public function test_get_metadata(): void {
|
47 |
public function test_get_metadata(): void {
|
48 |
$collection = new \core_privacy\local\metadata\collection('qtype_multichoice');
|
48 |
$collection = new \core_privacy\local\metadata\collection('qtype_multichoice');
|
Línea 89... |
Línea 89... |
89 |
/**
|
89 |
/**
|
90 |
* Create an array of valid user preferences for the multiple choice question type.
|
90 |
* Create an array of valid user preferences for the multiple choice question type.
|
91 |
*
|
91 |
*
|
92 |
* @return array Array of valid user preferences.
|
92 |
* @return array Array of valid user preferences.
|
93 |
*/
|
93 |
*/
|
94 |
public function user_preference_provider() {
|
94 |
public static function user_preference_provider(): array {
|
95 |
return [
|
95 |
return [
|
96 |
'default mark 2' => ['defaultmark', 2, 2],
|
96 |
'default mark 2' => ['defaultmark', 2, 2],
|
97 |
'penalty 33.33333%' => ['penalty', 0.3333333, '33.33333%'],
|
97 |
'penalty 33.33333%' => ['penalty', 0.3333333, '33.33333%'],
|
98 |
'single/multiple radio buttons' => ['single', 1, 'One answer only'],
|
98 |
'single/multiple radio buttons' => ['single', 1, 'One answer only'],
|
99 |
'single/multiple checkboxes' => ['single', 0, 'Multiple answers allowed'],
|
99 |
'single/multiple checkboxes' => ['single', 0, 'Multiple answers allowed'],
|