Skip to content

Instantly share code, notes, and snippets.

@gthomas2
gthomas2 / data_generator.patch
Last active March 17, 2017 16:24
Modify moodle data_generator to add cover images via unsplash
diff --git a/lib/testing/generator/data_generator.php b/lib/testing/generator/data_generator.php
index cf191f5..301885b 100644
--- a/lib/testing/generator/data_generator.php
+++ b/lib/testing/generator/data_generator.php
@@ -420,7 +420,29 @@ EOD;
}
$course = create_course((object)$record);
- context_course::instance($course->id);
+