This commit is contained in:
Sara Arjona
2024-12-11 08:57:09 +01:00
194 changed files with 268 additions and 22052 deletions
+1 -10
View File
@@ -42,8 +42,6 @@ final class bulk_update_test extends \advanced_testcase {
'assign-2' => ['assign', ['completion' => COMPLETION_TRACKING_MANUAL]],
'book-1' => ['book', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1]],
'book-2' => ['book', ['completion' => COMPLETION_TRACKING_MANUAL]],
'chat-1' => ['chat', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1]],
'chat-2' => ['chat', ['completion' => COMPLETION_TRACKING_MANUAL]],
'choice-1' => ['choice', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionsubmit' => 1]],
'choice-2' => ['choice', ['completion' => COMPLETION_TRACKING_MANUAL]],
'data-1' => ['data', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1]],
@@ -94,8 +92,6 @@ final class bulk_update_test extends \advanced_testcase {
],
],
'scorm-2' => ['scorm', ['completion' => COMPLETION_TRACKING_MANUAL]],
'survey-1' => ['survey', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionsubmit' => 1]],
'survey-2' => ['survey', ['completion' => COMPLETION_TRACKING_MANUAL]],
'url-1' => ['url', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1]],
'url-2' => ['url', ['completion' => COMPLETION_TRACKING_MANUAL]],
'wiki-1' => ['wiki', ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1]],
@@ -158,11 +154,6 @@ final class bulk_update_test extends \advanced_testcase {
protected function create_course_and_modules($modulenames) {
global $CFG, $PAGE;
// Chat and Survey modules are disabled by default, enable them for testing.
$manager = \core_plugin_manager::resolve_plugininfo_class('mod');
$manager::enable_plugin('chat', 1);
$manager::enable_plugin('survey', 1);
$CFG->enablecompletion = true;
$course = $this->getDataGenerator()->create_course(['enablecompletion' => 1], ['createsections' => true]);
$PAGE->set_course($course);
@@ -215,7 +206,7 @@ final class bulk_update_test extends \advanced_testcase {
],
'If at least one module does not support completionsubmit it can\'t be set' => [
[
'modulenames' => ['survey', 'wiki'],
'modulenames' => ['assign', 'wiki'],
'submitdata' => ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1, 'completionsubmit' => 1],
'validatedata' => [],
'cmdata' => ['completion' => COMPLETION_TRACKING_AUTOMATIC, 'completionview' => 1],