| Línea 41... |
Línea 41... |
| 41 |
* PHPUnit tests for privacy provider.
|
41 |
* PHPUnit tests for privacy provider.
|
| 42 |
*
|
42 |
*
|
| 43 |
* @copyright 2020 Catalyst IT
|
43 |
* @copyright 2020 Catalyst IT
|
| 44 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
44 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
| 45 |
*/
|
45 |
*/
|
| 46 |
class provider_test extends provider_testcase {
|
46 |
final class provider_test extends provider_testcase {
|
| 47 |
use \quizaccess_seb_test_helper_trait;
|
47 |
use \quizaccess_seb_test_helper_trait;
|
| Línea 48... |
Línea 48... |
| 48 |
|
48 |
|
| 49 |
/**
|
49 |
/**
|
| 50 |
* Setup the user, the quiz and ensure that the user is the last user to modify the SEB quiz settings.
|
50 |
* Setup the user, the quiz and ensure that the user is the last user to modify the SEB quiz settings.
|
| Línea 106... |
Línea 106... |
| 106 |
// test that the data exporter is correctly limiting its selection to
|
106 |
// test that the data exporter is correctly limiting its selection to
|
| 107 |
// the quiz and not anything with the same instance id.
|
107 |
// the quiz and not anything with the same instance id.
|
| 108 |
// (note this is only effective with databases not using fed (+1000) sequences
|
108 |
// (note this is only effective with databases not using fed (+1000) sequences
|
| 109 |
// per table, like postgres and mysql do, rendering this useless. In any
|
109 |
// per table, like postgres and mysql do, rendering this useless. In any
|
| 110 |
// case better to have the situation covered by some DBs,
|
110 |
// case better to have the situation covered by some DBs,
|
| 111 |
// like sqlsrv or oracle than by none).
|
111 |
// like sqlsrv than by none).
|
| 112 |
$this->getDataGenerator()->create_module('label', ['course' => $this->course->id]);
|
112 |
$this->getDataGenerator()->create_module('label', ['course' => $this->course->id]);
|
| Línea 113... |
Línea 113... |
| 113 |
|
113 |
|
| 114 |
$contextlist = provider::get_contexts_for_userid($this->user->id);
|
114 |
$contextlist = provider::get_contexts_for_userid($this->user->id);
|
| 115 |
$approvedcontextlist = new approved_contextlist(
|
115 |
$approvedcontextlist = new approved_contextlist(
|